diff --git a/docker-compose.yaml b/docker-compose.yaml index 8d37cbf..d912cf4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -29,18 +29,18 @@ services: GF_SERVER_ROOT_URL: ${GRAFANA_URL} GF_ANALYTICS_REPORTING_ENABLED: "false" GF_ANALYTICS_CHECK_FOR_UPDATES: "false" - GF_USERS_ALLOW_SIGN_UP: "false" - GF_USERS_ALLOW_ORG_CREATE: "false" - GF_AUTH_ANONYMOUS_ENABLED: "true" - GF_AUTH_BASIC_ENABLED: "false" - GF_AUTH_DISABLE_LOGIN_FORM: "true" + # GF_USERS_ALLOW_SIGN_UP: "false" + # GF_USERS_ALLOW_ORG_CREATE: "false" + # GF_AUTH_ANONYMOUS_ENABLED: "true" + # GF_AUTH_BASIC_ENABLED: "false" + # GF_AUTH_DISABLE_LOGIN_FORM: "true" volumes: - ./files/grafana/dashboards.yaml:/etc/grafana/provisioning/dashboards/default.yaml:ro - ./files/grafana/prometheus.yaml:/etc/grafana/provisioning/datasources/prometheus.yaml:ro - ./files/grafana/daemon_metrics.json:/var/lib/grafana/dashboards/daemon_metrics.json:ro - grafana:/var/lib/grafana - exporter: - container_name: exporter + monero-exporter: + container_name: monero-exporter build: context: dockerfiles dockerfile: monerod_exporter @@ -50,6 +50,19 @@ services: PORT: 8080 ports: - 127.0.0.1:8080:8080 + process-exporter: + container_name: process-exporter + image: ncabatoff/process-exporter:0.7.5 + restart: unless-stopped + volumes: + - /proc:/host/proc + - ./files/prometheus/process-exporter:/config/process-exporter:ro + privileged: true + ports: + - 127.0.0.1:9256:9256 + command: + process-exporter -procfs /host/proc -config.path /config/process-exporter + monerod: container_name: monerod build: diff --git a/files/grafana/prometheus.yaml b/files/grafana/prometheus.yaml index c80e238..69da110 100644 --- a/files/grafana/prometheus.yaml +++ b/files/grafana/prometheus.yaml @@ -1,9 +1,17 @@ apiVersion: 1 datasources: -- name: Prometheus +- name: monero-exporter type: prometheus - url: http://prometheus:9090 + url: http://monero-exporter:9090 access: proxy isDefault: true timeInterval: 10s + +datasources: +- name: process-exporter + type: prometheus + url: http://process-exporter:9256 + access: proxy + isDefault: false + timeInterval: 10s diff --git a/files/prometheus/process-exporter b/files/prometheus/process-exporter new file mode 100644 index 0000000..b68afb5 --- /dev/null +++ b/files/prometheus/process-exporter @@ -0,0 +1,4 @@ +process_names: + - name: "{{.Comm}}" + cmdline: + - '.+' diff --git a/files/prometheus/prometheus.yml b/files/prometheus/prometheus.yml index aadcb08..0547399 100644 --- a/files/prometheus/prometheus.yml +++ b/files/prometheus/prometheus.yml @@ -1,14 +1,14 @@ global: - scrape_interval: 30s - evaluation_interval: 60s + scrape_interval: 60s + evaluation_interval: 120s external_labels: - monitor: monerod-exporter + monitor: monero-exporter scrape_configs: - - job_name: "monerod-exporter" + - job_name: "monero-exporter" static_configs: - - targets: ["exporter:8080"] + - targets: ["monero-exporter:8080"] alerting: alertmanagers: