synology-prometheus icon indicating copy to clipboard operation
synology-prometheus copied to clipboard

no data

Open ISeeTWizard opened this issue 2 years ago • 3 comments

Hi maybe you have an idea. I used your config, just put my synology IP My Synology are based on DSM 7 (maybe important)

When I now switch to the snmp_export interface on 9116 and put my ip addresse (not important if the local or remote synology) it simply doesn't work I get a timeout

level=info ts=2022-04-19T10:01:01.608Z caller=collector.go:224 module=synology target=192.168.178.22 msg="Error scraping target" err="scrape canceled (possible timeout) getting target 192.168.178.22"

And also I don't get any data within grafana

I tried the data from the node-exporter and here I can find data within my grafana and prometheus

maybe I'm doing something wrong??

All is running on a bridged network on my Synology NAS (no firewall)

Thanks for any ideas

ISeeTWizard avatar Apr 19 '22 10:04 ISeeTWizard

Hi, i am experiencing the same issue. Did you have any luck fixing this? @D4rkPh0en1x

sbehrendt81 avatar Apr 27 '22 21:04 sbehrendt81

I just got it to work. I manually configured and started the node-exporter container, using the host network. Data are flowing like charm

sbehrendt81 avatar Apr 27 '22 21:04 sbehrendt81

I'm having the same issue, the node-exporter works but not the snmp-exporter. Here is my docker-compose.yml (the prometheus and grafana servers are on another host, in the same network.):

version: "3.8"
services:
  node-exporter:
    privileged: true
    image: prom/node-exporter
    container_name: node-exporter
    restart: unless-stopped
    ports:
      - "9100:9100"
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
    command:
      - "--path.procfs=/host/proc"
      - "--path.sysfs=/host/sys"
      - "--collector.filesystem.ignored-mount-points"
      - "^/(rootfs/)?(dev|etc|host|proc|run|sys|volume1)($$|/)"

  snmp-exporter:
    image: prom/snmp-exporter
    container_name: snmp_exporter
    restart: unless-stopped
    volumes:
      - ./snmp-synology/snmp.yml:/etc/snmp_exporter/snmp.yml
    ports:
      - 9116:9116
    command:
      - "--config.file=/etc/snmp_exporter/snmp.yml"

The docker-compose seems to be ok:

root@R2D2:~# docker ps
CONTAINER ID   IMAGE                COMMAND                  CREATED          STATUS          PORTS                    NAMES
91a648267bb3   prom/snmp-exporter   "/bin/snmp_exporter …"   29 minutes ago   Up 26 minutes   0.0.0.0:9116->9116/tcp   snmp_exporter
c7d6070b991d   prom/node-exporter   "/bin/node_exporter …"   29 minutes ago   Up 26 minutes   0.0.0.0:9100->9100/tcp   node-exporter

Here is the prometheus.yml:

global:
  scrape_interval:     15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
    - targets: ['mini.home.priv:9090']

  - job_name: 'supervision'
    static_configs:
    - targets:
      - r2d2.home.priv:9100 # this is the synology, with the ip 192.168.12.252
      - mini.home.priv:9100

  - job_name: 'snmp-exporter'
    static_configs:
    - targets: ['192.168.12.252']
    metrics_path: /snmp
    params:
      module: [synology]
    relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - source_labels: [__param_target]
      regex: (.*)
      replacement: ${1}:9116
      target_label: __address__

And here is the logs:

level=info ts=2022-08-18T08:28:30.442Z caller=collector.go:224 module=synology target=192.168.12.252 msg="Error scraping target" err="scrape canceled (possible timeout) getting target 192.168.12.252"
level=info ts=2022-08-18T08:28:45.424Z caller=collector.go:224 module=synology target=192.168.12.252 msg="Error scraping target" err="scrape canceled (possible timeout) getting target 192.168.12.252"
[...]

Any idea ?

gbarre avatar Aug 18 '22 08:08 gbarre

same problem here

TiDjY35 avatar Dec 23 '22 08:12 TiDjY35

auth: community: synology

In the configuration of NAS.

image

problem solved

TiDjY35 avatar Dec 23 '22 09:12 TiDjY35