Skip to content

Commit 870d964

Browse files
Add node exporter (#53)
* Add node exporter * fix typo * remove v from version * fix cadvisor build * fix exporte build * add arg UPSTREAM_VERSION_NODE_EXPORTER * add arg UPSTREAM_VERSION_CADVISOR * add exporter prom (#54) --------- Co-authored-by: Marc Font <[email protected]>
1 parent b5a44df commit 870d964

File tree

20 files changed

+6096
-56
lines changed

20 files changed

+6096
-56
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
build_*
33

44
manager/node_modules/
5-
manager/dist/
5+
manager/dist/
6+
7+
staker-metrics/node_modules/
8+
staker-metrics/dist/

cadvisor/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ARG UPSTREAM_VERSION_CADVISOR
2+
3+
FROM gcr.io/cadvisor/cadvisor:${UPSTREAM_VERSION_CADVISOR}

dappnode_package.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
{
22
"name": "dms.dnp.dappnode.eth",
3-
"version": "1.0.1",
4-
"description": "This package privately and locally collects and displays metrics related to your dappnode and its packages. Based on Grafana and Prometheus. It is recommended to also install the package Node-Exporter if you want system metrics. You can find a guide on how to set up your monitoring system in the next link https://forum.dappnode.io/t/begginer-friendly-install-monitoring-system-on-dappnode-using-dms-package/623",
3+
"version": "2.0.0",
4+
"description": "This package privately and locally collects and displays metrics related to your dappnode and its packages. Based on Grafana and Prometheus. It is recommended to also install the package Node-Exporter if you want system metrics.",
55
"shortDescription": "DAppNode Monitoring Service",
66
"type": "service",
77
"upstream": [
8+
{
9+
"repo": "prometheus/node_exporter",
10+
"version": "v1.6.1",
11+
"arg": "UPSTREAM_VERSION_NODE_EXPORTER"
12+
},
13+
{
14+
"repo": "google/cadvisor",
15+
"version": "v0.47.1",
16+
"arg": "UPSTREAM_VERSION_CADVISOR"
17+
},
818
{
919
"repo": "prometheus/prometheus",
1020
"version": "2.52.0",
1121
"arg": "UPSTREAM_VERSION_PROMETHEUS"
1222
},
1323
{
1424
"repo": "grafana/grafana",
15-
"version": "11.0.0",
25+
"version": "11.1.0",
1626
"arg": "UPSTREAM_VERSION_GRAFANA"
1727
}
1828
],
@@ -23,7 +33,7 @@
2333
"DAppLion <[email protected]> (https://github.com/dapplion)"
2434
],
2535
"requirements": {
26-
"minimumDappnodeVersion": "0.2.39"
36+
"minimumDappnodeVersion": "0.2.90"
2737
},
2838
"categories": ["Monitoring"],
2939
"style": {
@@ -44,8 +54,5 @@
4454
"bugs": {
4555
"url": "https://github.com/dappnode/DMS/issues"
4656
},
47-
"dependencies": {
48-
"dappnode-exporter.dnp.dappnode.eth": "latest"
49-
},
5057
"license": "GPL-3.0"
5158
}

docker-compose.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
version: "3.4"
1+
version: "3.8"
22
services:
33
grafana:
44
build:
55
context: grafana
66
args:
7-
UPSTREAM_VERSION_GRAFANA: 11.0.0
7+
UPSTREAM_VERSION_GRAFANA: 11.1.0
88
image: "grafana.dms.dnp.dappnode.eth:1.0.1"
99
restart: always
1010
volumes:
1111
- "grafana_data:/var/lib/grafana"
12+
healthcheck:
13+
test: ["CMD", "curl", "-f", "http://localhost/api/health"]
14+
interval: 20s
15+
timeout: 10s
16+
retries: 5
1217
prometheus:
1318
build:
1419
context: prometheus
@@ -28,6 +33,40 @@ services:
2833
volumes:
2934
- "manager_data:/data"
3035
- "prometheus_file_sd:/prometheus_file_sd"
36+
depends_on:
37+
grafana:
38+
condition: service_healthy
39+
node-exporter:
40+
build:
41+
context: node_exporter
42+
args:
43+
UPSTREAM_VERSION_NODE_EXPORTER: v1.6.1
44+
restart: always
45+
volumes:
46+
- "/:/host:ro,rslave"
47+
command:
48+
- "--path.rootfs=/host"
49+
image: "node-exporter.dms.dnp.dappnode.eth:1.0.3"
50+
cadvisor:
51+
build:
52+
context: cadvisor
53+
args:
54+
UPSTREAM_VERSION_CADVISOR: v0.47.1
55+
restart: always
56+
volumes:
57+
- "/:/rootfs:ro"
58+
- "/var/run:/var/run:rw"
59+
- "/sys:/sys:ro"
60+
- "/var/lib/docker/:/var/lib/docker:ro"
61+
image: "cadvisor.dms.dnp.dappnode.eth:1.0.3"
62+
stakers-metrics:
63+
build:
64+
context: stakers-metrics
65+
dockerfile: Dockerfile
66+
restart: always
67+
image: "stakers-metrics.dms.dnp.dappnode.eth:1.0.3"
68+
environment:
69+
- DEBUG_MODE=false
3170
volumes:
3271
grafana_data: {}
3372
prometheus_data: {}

0 commit comments

Comments
 (0)