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
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 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.
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
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).
I am using the versions I wrote above, all services are working properly, I define an alert rule from the interface, for sending messages to the slack channel, but although I enter the values and other information correctly, the alerts do not reach the slack channel, I tested the slack channel url, there is no problem, the test message goes, but as I said, it does not send alarms for the values I specified.
I would like your help about this issue, thank you.
We donât offer support for Kapacitor anymore.
Iâm not sure why itâs not sending the alerts.
You could use Flux tasks with 2.x for sending alerts however. I recommend trying that.
Iâm a little new to this version and flux, my goal is to do this, to get data from the san switch using telegram with oid information, create a dashboard in influxdb and send notification to the slack channel at the values I specify, the only point Iâm stuck in the parts I mentioned is the part of sending alert to slack, I read the document you sent, I can send alerts to slack, but not as I want, at the end of the day, hereâs what I want to do;
At a value I specify, for example, if the memory goes above 70%, it should send me a critical message, when it goes below 70%, it should send an ok message, and it should be in the form of a properly descriptive txt and the value should be written in the message content. I would be very happy if there is an example about this or a document on how I need to do it step by step, thank you very much in advance.
one more information, I think I can explain in more detail from the screenshot, in the model2 screenshot I get a crit alert, but not a value.
In the model1 screenshot, although I set all the values, I donât get any alerts, for example no arrow alerts.
where am I doing wrong and missing.
Thank you very much.