Hi,
I installed telegraf and influxdb to get data from my san switches using oid, but despite all my attempts I cannot get data with snmp, when I test with snmpwalk I can get an output.
I have created a conf. file under the telegraf.d folder, I am forwarding the contents of my file and all other information, I would appreciate your help, thank you very much.
OS: Rocky Linux release 8.10 (Green Obsidian)
Telegraf 1.33.1 (git: HEAD@44f3a504)
InfluxDB version v2.7.11
[[inputs.snmp]]
agents = [âudp://1.1.1.2:161â]
version = 3
sec_name = âtestâ
sec_level = âauthPrivâ
auth_protocol = âSHA512â
auth_password = âxxxxxxxâ
priv_protocol = âAES256â
priv_password = âxxxxxxxâ
[[inputs.snmp.field]]
name = âcpuâ
oid = â1.3.6.1.4.1.1588.2.1.1.1.26.1â
Can you share a snmpwalk that works, omitting passwords is fine?
What you run telegraf with --test can you provide that output also?
snmpwalk -v3 -u monitor -l authPriv -a SHA512 -A xxxx -x AES256 -X xxxx 192.168.1.1 1.3.6.1.4.1.1588.2.1.1.1.26.1
SNMPv2-SMI::enterprises.1588.2.1.1.1.26.1.0 = INTEGER: 4
telegraf --test --config /etc/telegraf/telegraf.d/san_status.conf --debug
Loading config: /etc/telegraf/telegraf.d/san_status.conf
Starting Telegraf 1.33.1 brought to you by InfluxData the makers of InfluxDB
Available plugins: 236 inputs, 9 aggregators, 33 processors, 26 parsers, 63 outputs, 6 secret-stores
Loaded inputs: snmp
Loaded aggregators:
Loaded processors:
Loaded secretstores:
Outputs are not used in testing mode!
Tags enabled: host=
[agent] The default value of âskip_processors_after_aggregatorsâ will change to âtrueâ with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to âfalseâ!
[agent] Initializing plugins
DeprecationWarning: Value âagent_hostâ for option âagent_host_tagâ of plugin âinputs.snmpâ deprecated since version 1.29.0 and will be removed in 2.0.0: set to âsourceâ for consistent usage across plugins or safely ignore this message and continue to use the current value
[agent] Starting service inputs
[agent] Stopping service inputs
[agent] Input channel closed
[agent] Stopped Successfully
Can you share a copy of your config file, san_status.conf ?
1 Like
[[inputs.snmp]]
agents = [âudp://192.168.1.1:161â]
version = 3
sec_name = âmonitorâ
sec_level = âauthPrivâ
auth_protocol = âSHA512â
auth_password = âxxxxâ
priv_protocol = âAES256â
priv_password = âxxxxâ
[[inputs.snmp.field]]
name = âcpuâ
oid = â.1.3.6.1.4.1.1588.2.1.1.1.26.1â
Can you try each of these individually to see if you get any different of an output when running it with --test?
1.) Change agents to: agents = [â192.168.1.1â]
2.) Change oid to: oid = â1.3.6.1.4.1.1588.2.1.1.1.26.1â
3.) Change oid to: oid = â1.3.6.1.4.1.1588.2.1.1.1.26.1.0â
I donât expect the first option to make a difference, but just curious since I donât write our config files that way (even though itâs the example). The second removes the leading decimal. The third is removing the leading decimal and also adding the trailing .0 since thatâs what your walk attached to it when it did work.
1 Like
Output 1 and 2) agents = [â192.168.1.1â] oid = â1.3.6.1.4.1.1588.2.1.1.1.26.1â
telegraf --test --config /etc/telegraf/telegraf.d/sanstatus.conf --debug
Loading config: /etc/telegraf/telegraf.d/sanstatus.conf
Starting Telegraf 1.33.1 brought to you by InfluxData the makers of InfluxDB
Available plugins: 236 inputs, 9 aggregators, 33 processors, 26 parsers, 63 outputs, 6 secret-stores
Loaded inputs: snmp
Loaded aggregators:
Loaded processors:
Loaded secretstores:
Outputs are not used in testing mode!
Tags enabled: host=snmonitor
[agent] The default value of âskip_processors_after_aggregatorsâ will change to âtrueâ with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to âfalseâ!
[agent] Initializing plugins
DeprecationWarning: Value âagent_hostâ for option âagent_host_tagâ of plugin âinputs.snmpâ deprecated since version 1.29.0 and will be removed in 2.0.0: set to âsourceâ for consistent usage across plugins or safely ignore this message and continue to use the current value
[agent] Starting service inputs
[agent] Stopping service inputs
[agent] Input channel closed
[agent] Stopped Successfully
Output 3) agents = [â192.168.1.1â] oid = â1.3.6.1.4.1.1588.2.1.1.1.26.1.0â
telegraf --test --config /etc/telegraf/telegraf.d/sanstatus.conf --debug
Loading config: /etc/telegraf/telegraf.d/sanstatus.conf
Starting Telegraf 1.33.1 brought to you by InfluxData the makers of InfluxDB
Available plugins: 236 inputs, 9 aggregators, 33 processors, 26 parsers, 63 outputs, 6 secret-stores
Loaded inputs: snmp
Loaded aggregators:
Loaded processors:
Loaded secretstores:
Outputs are not used in testing mode!
Tags enabled: host=snmonitor
[agent] The default value of âskip_processors_after_aggregatorsâ will change to âtrueâ with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to âfalseâ!
[agent] Initializing plugins
DeprecationWarning: Value âagent_hostâ for option âagent_host_tagâ of plugin âinputs.snmpâ deprecated since version 1.29.0 and will be removed in 2.0.0: set to âsourceâ for consistent usage across plugins or safely ignore this message and continue to use the current value
[agent] Starting service inputs
snmp,agent_host=192.168.1.1,host=snmonitor swCpuUsage=4i 1738570750000000000
[agent] Stopping service inputs
[agent] Input channel closed
[agent] Stopped Successfully
Looks like the issue was the trailing .0 on the end of the OID to get a single OID response instead of a table like response (even when there is only 1 value in it).
thank you very much for your support, this was solved but now I am facing another problem