Docker compose metrics containers (#564)
* Prometheus container and configuration for testnet * Add graphana related configuration and container * Use metrics feature in testnet nodes * Grafana configuration files and datasources
This commit is contained in:
parent
16c97c07ec
commit
aa06080baa
@ -148,3 +148,29 @@ services:
|
|||||||
- /usr/local/bin/etcd
|
- /usr/local/bin/etcd
|
||||||
- --advertise-client-urls=http://etcd:2379
|
- --advertise-client-urls=http://etcd:2379
|
||||||
- --listen-client-urls=http://0.0.0.0:2379
|
- --listen-client-urls=http://0.0.0.0:2379
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
container_name: prometheus
|
||||||
|
image: prom/prometheus:latest
|
||||||
|
volumes:
|
||||||
|
- ./testnet/monitoring/prometheus-config.yml:/etc/prometheus/prometheus.yml:z
|
||||||
|
command:
|
||||||
|
- --config.file=/etc/prometheus/prometheus.yml
|
||||||
|
- --storage.tsdb.retention.time=7d
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9090:9090
|
||||||
|
restart: on-failure
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
container_name: grafana
|
||||||
|
image: grafana/grafana:latest
|
||||||
|
env_file:
|
||||||
|
- ./testnet/monitoring/grafana/plugins.env
|
||||||
|
volumes:
|
||||||
|
- ./testnet/monitoring/grafana/grafana.ini:/etc/grafana/grafana.ini
|
||||||
|
./testnet/monitoring/grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
|
||||||
|
ports:
|
||||||
|
- 9091:3000
|
||||||
|
restart: on-failure
|
||||||
|
depends_on:
|
||||||
|
- prometheus
|
||||||
|
@ -6,9 +6,9 @@ consensus:
|
|||||||
private_key: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
private_key: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||||
fountain_settings: null
|
fountain_settings: null
|
||||||
overlay_settings:
|
overlay_settings:
|
||||||
nodes: [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]]
|
nodes: ["0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000001"]
|
||||||
number_of_committees: 1
|
number_of_committees: 1
|
||||||
current_leader: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
current_leader: 0000000000000000000000000000000000000000000000000000000000000000
|
||||||
leader:
|
leader:
|
||||||
cur: 0
|
cur: 0
|
||||||
committee_membership: !Sad
|
committee_membership: !Sad
|
||||||
|
@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -yq \
|
|||||||
WORKDIR /nomos
|
WORKDIR /nomos
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN cargo build --release --all
|
RUN cargo build --release --all --features metrics
|
||||||
|
|
||||||
# NODE IMAGE ----------------------------------------------------------
|
# NODE IMAGE ----------------------------------------------------------
|
||||||
|
|
||||||
|
10
testnet/explorer_config.yaml
Normal file
10
testnet/explorer_config.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
log:
|
||||||
|
backend: "Stdout"
|
||||||
|
format: "Json"
|
||||||
|
level: "info"
|
||||||
|
|
||||||
|
api:
|
||||||
|
backend_settings:
|
||||||
|
address: 0.0.0.0:9090
|
||||||
|
cors_origins: []
|
||||||
|
|
11
testnet/monitoring/grafana/datasources.yaml
Normal file
11
testnet/monitoring/grafana/datasources.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
org_id: 1
|
||||||
|
url: http://prometheus:9090
|
||||||
|
is_default: true
|
||||||
|
version: 1
|
||||||
|
editable: true
|
51
testnet/monitoring/grafana/grafana.ini
Normal file
51
testnet/monitoring/grafana/grafana.ini
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
instance_name = nomos dashboard
|
||||||
|
|
||||||
|
;[dashboards.json]
|
||||||
|
;enabled = true
|
||||||
|
;path = /home/git/grafana/grafana-dashboards/dashboards
|
||||||
|
|
||||||
|
|
||||||
|
#################################### Auth ##########################
|
||||||
|
[auth]
|
||||||
|
disable_login_form = false
|
||||||
|
|
||||||
|
#################################### Anonymous Auth ##########################
|
||||||
|
[auth.anonymous]
|
||||||
|
# enable anonymous access
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
# specify organization name that should be used for unauthenticated users
|
||||||
|
;org_name = Public
|
||||||
|
|
||||||
|
# specify role for unauthenticated users
|
||||||
|
; org_role = Admin
|
||||||
|
org_role = Viewer
|
||||||
|
|
||||||
|
;[security]
|
||||||
|
;admin_user = ocr
|
||||||
|
;admin_password = ocr
|
||||||
|
|
||||||
|
;[users]
|
||||||
|
# disable user signup / registration
|
||||||
|
;allow_sign_up = false
|
||||||
|
|
||||||
|
# Set to true to automatically assign new users to the default organization (id 1)
|
||||||
|
;auto_assign_org = true
|
||||||
|
|
||||||
|
# Default role new users will be automatically assigned (if disabled above is set to true)
|
||||||
|
;auto_assign_org_role = Viewer
|
||||||
|
|
||||||
|
#################################### SMTP / Emailing ##########################
|
||||||
|
;[smtp]
|
||||||
|
;enabled = false
|
||||||
|
;host = localhost:25
|
||||||
|
;user =
|
||||||
|
;password =
|
||||||
|
;cert_file =
|
||||||
|
;key_file =
|
||||||
|
;skip_verify = false
|
||||||
|
;from_address = admin@grafana.localhost
|
||||||
|
|
||||||
|
;[emails]
|
||||||
|
;welcome_email_on_sign_up = false
|
||||||
|
|
1
testnet/monitoring/grafana/plugins.env
Normal file
1
testnet/monitoring/grafana/plugins.env
Normal file
@ -0,0 +1 @@
|
|||||||
|
GF_INSTALL_PLUGINS=grafana-worldmap-panel,grafana-piechart-panel,yesoreyeram-boomtheme-panel,briangann-gauge-panel,pierosavi-imageit-panel,bessler-pictureit-panel,vonage-status-panel
|
14
testnet/monitoring/prometheus-config.yml
Normal file
14
testnet/monitoring/prometheus-config.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
evaluation_interval: 15s
|
||||||
|
external_labels:
|
||||||
|
monitor: "Monitoring"
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: "libp2p"
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- bootstrap:18080
|
||||||
|
- libp2p_node_1:18080
|
||||||
|
- libp2p_node_2:18080
|
||||||
|
- libp2p_node_3:18080
|
@ -17,4 +17,4 @@ echo "CONSENSUS_PRIV_KEY: ${CONSENSUS_PRIV_KEY}"
|
|||||||
echo "DA_VOTER: ${DA_VOTER}"
|
echo "DA_VOTER: ${DA_VOTER}"
|
||||||
echo "OVERLAY_NODES: ${OVERLAY_NODES}"
|
echo "OVERLAY_NODES: ${OVERLAY_NODES}"
|
||||||
|
|
||||||
exec /usr/bin/nomos-node /etc/nomos/bootstrap_config.yaml
|
exec /usr/bin/nomos-node /etc/nomos/bootstrap_config.yaml --with-metrics
|
||||||
|
@ -33,4 +33,4 @@ echo "DA_VOTER: ${DA_VOTER}"
|
|||||||
echo "OVERLAY_NODES: ${OVERLAY_NODES}"
|
echo "OVERLAY_NODES: ${OVERLAY_NODES}"
|
||||||
echo "NET_INITIAL_PEERS: ${NET_INITIAL_PEERS}"
|
echo "NET_INITIAL_PEERS: ${NET_INITIAL_PEERS}"
|
||||||
|
|
||||||
exec /usr/bin/nomos-node /etc/nomos/libp2p_config.yaml
|
exec /usr/bin/nomos-node /etc/nomos/libp2p_config.yaml --with-metrics
|
||||||
|
@ -345,8 +345,6 @@ fn create_node_config(
|
|||||||
cors_origins: vec![],
|
cors_origins: vec![],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
#[cfg(feature = "metrics")]
|
|
||||||
metrics: Default::default(),
|
|
||||||
da: nomos_da::Settings {
|
da: nomos_da::Settings {
|
||||||
da_protocol: full_replication::Settings {
|
da_protocol: full_replication::Settings {
|
||||||
voter: id,
|
voter: id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user