Prometheus snmp_exporter无法抓取设备

时间:2019-11-25 14:42:28

标签: snmp prometheus exporter

我无法让snmp_exporter刮擦任何设备。我创建了以下snmp.yml文件(为简洁起见已将其删除):

if_mib:
  version: 1
  auth:
    community: public
  timeout: 120s
  walk:
  - 1.3.6.1.2.1.2
  get:
  - 1.3.6.1.2.1.1.3.0
  - 1.3.6.1.2.1.31.1.1.1.6.40
  metrics:
  - name: sysUpTime
    oid: 1.3.6.1.2.1.1.3
    type: gauge
    help: The time (in hundredths of a second) since the network management portion
      of the system was last re-initialized. - 1.3.6.1.2.1.1.3
  - name: ifNumber
    oid: 1.3.6.1.2.1.2.1
    type: gauge
    help: The number of network interfaces (regardless of their current state) present
      on this system. - 1.3.6.1.2.1.2.1

如果我发出一个简单的snmpwalk:

snmpwalk -v1 -c public z.y.z.t 1.3.6.1.2.1.1.3.0

我得到即时回复。但是,如果我向snmp_exporter(port:9116)发出以下命令:

curl 'my_machine:9116/snmp?module=if_mib&target=x.y.z.t'

它“挂起”,并在30秒后收到“请求超时(30秒)”异常。

我正在运行以下组件:

Ubuntu 18.04 "Bionic"
go version: 1.13.4
snmp_exporter version: 0.15.0
prometheus version: 2.14.0

我在这里做什么错了?

0 个答案:

没有答案