Closed ashkii7 closed 1 year ago
At a quick glance, I would think there is an issue with the v3 credintials or how telegraf handles them.
@Hipska any ideas?
Yeah probably, as the user tested the device directly with v3 and got response. I have no experience with v3.
I also see you stopped the test without waiting to finish. A second observation is the agents are configured differently for syno vs hik.
Tip: also set an alias for each snmp input, so you can see from which one eventual errors come..
@Hipska Hello, As suggested, I therefore configured the agents in the same way (ditto Hik) and I added in the Telegraf.conf file an "alias" instruction for each "inputs.snmp". But, always the same: no collection with the Syno part.
-----------------------------------------------------------------------------------------------------------------------
root@Maeva56:/volume1/docker/scripts_install/monitoring/telegraf# docker logs -f telegraf
2022-10-20T10:19:32Z I! Using config file: /etc/telegraf/telegraf.conf
2022-10-20T12:19:32+02:00 I! Starting Telegraf 1.24.2
2022-10-20T12:19:32+02:00 I! Available plugins: 222 inputs, 9 aggregators, 26 processors, 20 parsers, 57 outputs
2022-10-20T12:19:32+02:00 I! Loaded inputs: snmp (2x)
2022-10-20T12:19:32+02:00 I! Loaded aggregators:
2022-10-20T12:19:32+02:00 I! Loaded processors: converter strings
2022-10-20T12:19:32+02:00 I! Loaded outputs: influxdb_v2
2022-10-20T12:19:32+02:00 I! Tags enabled: host=telegraf
2022-10-20T12:19:32+02:00 I! [agent] Config: Interval:1m0s, Quiet:false, Hostname:"telegraf", Flush Interval:10s
2022-10-20T12:19:32+02:00 D! [agent] Initializing plugins
2022-10-20T12:19:33+02:00 D! [agent] Connecting outputs
2022-10-20T12:19:33+02:00 D! [agent] Attempting connection to [outputs.influxdb_v2]
2022-10-20T12:19:33+02:00 D! [agent] Successfully connected to outputs.influxdb_v2
2022-10-20T12:19:33+02:00 D! [agent] Starting service inputs
2022-10-20T12:19:43+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:19:53+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:20:03+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:20:14+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 80.744844ms
2022-10-20T12:20:14+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:20:23+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:20:33+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:20:43+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:20:53+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:21:03+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:21:05+02:00 D! [inputs.snmp::syno.snmp] Previous collection has not completed; scheduled collection skipped
2022-10-20T12:21:05+02:00 W! [inputs.snmp::syno.snmp] Collection took longer than expected; not complete after interval of 1m0s
2022-10-20T12:21:14+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 22.585474ms
2022-10-20T12:21:14+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:21:23+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:21:33+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:21:43+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:21:53+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:22:03+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:22:05+02:00 D! [inputs.snmp::syno.snmp] Previous collection has not completed; scheduled collection skipped
2022-10-20T12:22:05+02:00 W! [inputs.snmp::syno.snmp] Collection took longer than expected; not complete after interval of 1m0s
2022-10-20T12:22:13+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 10.382566ms
2022-10-20T12:22:13+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:22:23+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:22:33+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T12:22:43+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
I have no name!@telegraf:/$ telegraf --test
2022-10-20T10:23:49Z I! Using config file: /etc/telegraf/telegraf.conf
2022-10-20T12:23:49+02:00 I! Starting Telegraf 1.24.2
2022-10-20T12:23:49+02:00 I! Available plugins: 222 inputs, 9 aggregators, 26 processors, 20 parsers, 57 outputs
2022-10-20T12:23:49+02:00 I! Loaded inputs: snmp (2x)
2022-10-20T12:23:49+02:00 I! Loaded aggregators:
2022-10-20T12:23:49+02:00 I! Loaded processors: converter strings
2022-10-20T12:23:49+02:00 W! Outputs are not used in testing mode!
2022-10-20T12:23:49+02:00 I! Tags enabled: host=telegraf
2022-10-20T12:23:49+02:00 D! [agent] Initializing plugins
2022-10-20T12:23:51+02:00 D! [agent] Starting service inputs
> snmp.hik,agent_host=192.168.2.21,host=telegraf cpuPercent=67i,deviceID="1",deviceModel="DS-2CD2045FWD-I",dynIpAddr="192.168.2.21",macAddr="bc-ba-c2-13-ce-ef",manufacturer="Hikvision",memUsed=56i,restartDev=0i,softwVersion="V5.6.6 build 210625",staticIpAddr="0.0.0.0",vidEncode="H.264" 1666261432000000000
> snmp.hik,agent_host=192.168.2.23,host=telegraf cpuPercent=67i,deviceID="3",deviceModel="DS-2CD2045FWD-I",dynIpAddr="192.168.2.23",macAddr="c0-51-7e-84-b7-f1",manufacturer="Hikvision",memUsed=55i,restartDev=0i,softwVersion="V5.6.6 build 210625",staticIpAddr="0.0.0.0",vidEncode="H.264" 1666261432000000000
> snmp.hik,agent_host=192.168.2.24,host=telegraf cpuPercent=57i,deviceID="4",deviceModel="DS-2CD2085FWD-I",dynIpAddr="192.168.2.24",macAddr="58-50-ed-72-87-2d",manufacturer="Hikvision",memUsed=71i,restartDev=0i,softwVersion="V5.6.6 build 210625",staticIpAddr="0.0.0.0",vidEncode="H.264" 1666261432000000000
> snmp.hik,agent_host=192.168.2.22,host=telegraf cpuPercent=69i,deviceID="2",deviceModel="DS-2CD2045FWD-I",dynIpAddr="192.168.2.22",macAddr="bc-ba-c2-13-ce-bd",manufacturer="Hikvision",memUsed=56i,restartDev=0i,softwVersion="V5.6.6 build 210625",staticIpAddr="0.0.0.0",vidEncode="H.264" 1666261432000000000
-----------------------------------------------------------------------------------------------------------------------
The HIK data go up but for the Syno data the test also remains "blocked". After 10 minutes, still nothing more!
I don't understand what's going on ...
So by only changing version
to 2
, you do directly get the data?
@Hipska Hello, Yes, as I explained in the first post, with the same telegraf.conf just modified file to adapt the connection settings to version 2 of SNMP, I get all Syno and Hik data instantly.
@Hipska Hello, For your information I did two new tests:
In the first case, I get this and no data collected:
-----------------------------------------------------------------------------------------------------------------------
root@Maeva56:/volume1/docker/scripts_install/monitoring/telegraf# docker logs -f telegraf
2022-10-20T16:35:52Z I! Using config file: /etc/telegraf/telegraf.conf
2022-10-20T18:35:52+02:00 I! Starting Telegraf 1.24.2
2022-10-20T18:35:52+02:00 I! Available plugins: 222 inputs, 9 aggregators, 26 processors, 20 parsers, 57 outputs
2022-10-20T18:35:52+02:00 I! Loaded inputs: snmp
2022-10-20T18:35:52+02:00 I! Loaded aggregators:
2022-10-20T18:35:52+02:00 I! Loaded processors: converter strings
2022-10-20T18:35:52+02:00 I! Loaded outputs: influxdb_v2
2022-10-20T18:35:52+02:00 I! Tags enabled: host=telegraf
2022-10-20T18:35:52+02:00 I! [agent] Config: Interval:1m0s, Quiet:false, Hostname:"telegraf", Flush Interval:10s
2022-10-20T18:35:52+02:00 D! [agent] Initializing plugins
2022-10-20T18:35:54+02:00 D! [agent] Connecting outputs
2022-10-20T18:35:54+02:00 D! [agent] Attempting connection to [outputs.influxdb_v2]
2022-10-20T18:35:54+02:00 D! [agent] Successfully connected to outputs.influxdb_v2
2022-10-20T18:35:54+02:00 D! [agent] Starting service inputs
2022-10-20T18:36:04+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:36:14+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:36:24+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:36:34+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:36:44+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:36:54+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:37:00+02:00 D! [inputs.snmp::syno.snmp] Previous collection has not completed; scheduled collection skipped
2022-10-20T18:37:00+02:00 W! [inputs.snmp::syno.snmp] Collection took longer than expected; not complete after interval of 1m0s
2022-10-20T18:37:04+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:37:14+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:37:24+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:37:34+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:37:44+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:37:54+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T18:38:00+02:00 D! [inputs.snmp::syno.snmp] Previous collection has not completed; scheduled collection skipped
2022-10-20T18:38:00+02:00 W! [inputs.snmp::syno.snmp] Collection took longer than expected; not complete after interval of 1m0s
2022-10-20T18:38:04+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
-----------------------------------------------------------------------------------------------------------------------
In the second case, I get this with data collected but a lot of error "buffer fullness" (as in the first case):
-----------------------------------------------------------------------------------------------------------------------
root@Maeva56:/volume1/docker/scripts_install/monitoring/telegraf# docker logs -f telegraf
2022-10-20T17:36:38Z I! Using config file: /etc/telegraf/telegraf.conf
2022-10-20T19:36:38+02:00 I! Starting Telegraf 1.24.2
2022-10-20T19:36:38+02:00 I! Available plugins: 222 inputs, 9 aggregators, 26 processors, 20 parsers, 57 outputs
2022-10-20T19:36:38+02:00 I! Loaded inputs: snmp
2022-10-20T19:36:38+02:00 I! Loaded aggregators:
2022-10-20T19:36:38+02:00 I! Loaded processors: converter strings
2022-10-20T19:36:38+02:00 I! Loaded outputs: influxdb_v2
2022-10-20T19:36:38+02:00 I! Tags enabled: host=telegraf
2022-10-20T19:36:38+02:00 I! [agent] Config: Interval:1m0s, Quiet:false, Hostname:"telegraf", Flush Interval:10s
2022-10-20T19:36:38+02:00 D! [agent] Initializing plugins
2022-10-20T19:36:40+02:00 D! [agent] Connecting outputs
2022-10-20T19:36:40+02:00 D! [agent] Attempting connection to [outputs.influxdb_v2]
2022-10-20T19:36:40+02:00 D! [agent] Successfully connected to outputs.influxdb_v2
2022-10-20T19:36:40+02:00 D! [agent] Starting service inputs
2022-10-20T19:36:50+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:37:00+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 315.224413ms
2022-10-20T19:37:00+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:37:10+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:37:20+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:37:30+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:37:40+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:37:50+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:38:00+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 10.530067ms
2022-10-20T19:38:00+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:38:10+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:38:20+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:38:30+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:38:40+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:38:50+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:39:00+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 9.668451ms
2022-10-20T19:39:00+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:39:10+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:39:20+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:39:30+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:39:40+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:39:50+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:40:00+02:00 D! [outputs.influxdb_v2] Wrote batch of 4 metrics in 10.307016ms
2022-10-20T19:40:00+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:40:10+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-10-20T19:40:20+02:00 D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
-----------------------------------------------------------------------------------------------------------------------
@Hipska Hello, I come back to you to get news about my problem
Hi, sorry for this late response, but it looks like here is the same/similar issue #12435. Would you be able to confirm?
@ashkii7 could you confirm please?
@Hipska Hi, Sorry for the delay to answer you, but I did not test the issue #12435. I have not done any tests since my initial post for a long time to devote to it. So I cannot give you the confirmation (or not) that you want. Sorry again. I would come back to you for this problem later.
Are you ok we close this for now? You can reopen or create a new issue if you encounter problems again with latest versions of telegraf.
Hi, OK you can close this issue, i reopen it later if needed
Relevant telegraf.conf
Logs from Telegraf
System info
influxdb 2.4, Telegraf 1.24.1, Docker 20.10.3-1308, DSM 7.1.1
Docker
Steps to reproduce
...
Expected behavior
Why such a difference in behavior between the two versions of the SNMP protocol? Why do I have the message "Collection Took Longer Than Expect; Not Complete After Interval of 1m0s"? I pushed the "Interval" parameter at 10 minutes and it's the same: no collection of data for NAS.
Actual behavior
Hello, Pay for my English but Google Translator is my friend. I use on a Synology NAS with Docker the InfluxDB V2.4 and Telegraf 1.24.2 services to collect monitoring data from my 2 NAS DS918+ and my RT2600AC router. So I defined an agent for these three devices:
In addition, I also collect data from 4 surveillance cameras:
When I am under SNMPV2C the collection of all data (NAS, cameras) is instantaneous. (Interval = 60S, Flush_Interval = 10s, Timeout = 10s) Everything is going perfectly well.
Problem: when I go under SNMPV3 (after modification of the corresponding access parameters of the SNMP service under DSM7.1.1 and in the telegraf.conf file) and without changing anything else in the telegraf.conf file with Data to recover, plugin data [[inputs.snmp]] for the three Synology devices are not at all collected and the "SNMP.Syno" measurement is not created. For example in the log provided below, no batch is written in the Bucket InfluxDB2. On the other hand, the data for the 4 cameras are collected without any problem.
In addition, when I use SNMP requests live via the SNMPGET and SNMPWALK commands it both provide an instant response. For instance :
Note : 172.20.0.1 --> IPv4 NAS 1
Additional info
No response