snmp_exporter: Error walking target, integer divided by zero

1,003 views
Skip to first unread message

Simon W

unread,
Jul 12, 2017, 7:14:46 AM7/12/17
to Prometheus Users
Hi,

Following problem:
I have a SAN Switch from which i want to get informations with the snmp_exporter. An snmpwalk from the server on which prometheus is installed works just fine but when I use the snmp_exporter I get the following error:

./snmp_exporter -log.level=debug -config.file=snmp.yml
INFO[0000] Starting snmp exporter (version=0.4.0, branch=master, revision=0a00acbf61971015b6475441d741ce59ad2ba26d)  source="main.go:99"
INFO[0000] Build context (go=go1.8.3, user=root@ea8b44ce07e1, date=20170606-13:39:44)  source="main.go:100"
INFO[0000] Listening on :9116                            source="main.go:143"
DEBU[0001] Scraping target 'XXXX' with module 'default'  source="main.go:77"
DEBU[0001] Walking target "XXXX" subtree "1.3.6.1.2.1.1.3"  source="collector.go:71"
ERRO[0001] Error scraping target XXXX: Error walking target XXXX: recover: runtime error: integer divide by zero  source="collector.go:126"
DEBU[0001] Scrape of target 'XXXX' with module 'default' took 0.006807 seconds  source="main.go:88"


The config in my snmp.yml file looks like this:
default:
  version: 3
  auth:
    username: XXXX
  walk:

The part in prometheus.yml:
  - job_name: 'san-switches'
    static_configs:
      - targets:
        - 'XXXX'   # SNMP device.
    metrics_path: /snmp
    params:
      module: [default]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9116  # SNMP exporter.


Anyone got an idea what the problem could be?

Regards,
Simon

Brian Brazil

unread,
Jul 12, 2017, 7:36:37 AM7/12/17
to Simon W, Prometheus Users
This is being tracked at https://github.com/prometheus/snmp_exporter/issues/185

Any debugging you do to help pin this down would be great.

Brian

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/9d79d62a-13e7-45d1-ab68-e12f0e2eb303%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Simon W

unread,
Jul 14, 2017, 3:37:17 AM7/14/17
to Prometheus Users
I know that the issue is already being tracked but this hasn't brought me to a solution yet. 
I have to use SNMPv3 because v2 & v1 are disabled on our switch, so using one of those is not an option.

Does nobody habe an idea what the problem could be? It looks like only me and one other guy have this issue.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.



--

moumita...@gmail.com

unread,
Jan 16, 2019, 5:43:21 AM1/16/19
to Prometheus Users
Hello experts,

I have the same error.
I have installed snmp exporter on same centsos 7 machine that has prometheus installed, but after staring snmp exporter, I m getting this error on screen until I kill the exporter process.
I am new to Prometheus, I shall really appreciate any help.

[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# ./snmp_exporter &[1] 24876[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# INFO[0000] Starting snmp exporter (version=0.6.0, branch=HEAD, revision=4388d6815791d6d616098f899110c9dca354028c) source="main.go:125"INFO[0000] Build context (go=go1.8.3, user=root@fd9cde4d0842, date=20170822-11:04:46) source="main.go:126"INFO[0000] Listening on :9116 source="main.go:205"^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# serINFO[0014] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:47276->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0029] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:51632->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0044] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:46459->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0059] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:32984->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0074] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:47966->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0089] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:56880->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0104] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:37946->10.142.0.3:161: read: connection refused source="collector.go:126"INFO[0119] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:58843->10.142.0.3:161: read: connection refused source="collector.go:126"^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# ^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# ^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# ^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# INFO[0134] Error scraping target 10.142.0.3: Error walking target 10.142.0.3: Error reading from UDP: read udp 10.142.0.3:39957->10.142.0.3:161: read: connection refused source="collector.go:126"^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# ^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# ^C[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]# pkill snmp[root@ansimaster-centos snmp_exporter-0.6.0.linux-amd64]#

Ben Kochie

unread,
Jan 16, 2019, 7:28:50 AM1/16/19
to moumita...@gmail.com, Prometheus Users
That is a different error.

Your target is refusing your SNMP requests. This is likely due to an incorrect authentication config or a firewall rule.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages