Closed 7wells closed 1 week ago
Hey there @nmaggioni, mind taking a look at this issue as it has been labeled with an integration (snmp
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
snmp documentation snmp source (message by IssueLinks)
I know this is a stupid question, but are you sure that this log entry is recent and is not a leftover from the issues that were present in the past few HA releases? Does it reappear every time you clean the logs and restart HA?
Moving on to troubleshooting: the default timeout is currently 8s for each device, so it could be possible that with that many endpoints to query the global 10s limit could be exceeded if the they don't reply instantaneously. I'm not seeing that warning on my instance with polling of just a couple network appliances, could you try commenting out all but one of the devices in your config and see if the warning comes up anyway?
I know this is a stupid question, but are you sure that this log entry is recent and is not a leftover from the issues that were present in the past few HA releases? Does it reappear every time you clean the logs and restart HA?
No, your question is not stupid at all, and I am really grateful that you asked it. Indeed this message popped up in the logs every time again after I cleared the logs and restarted HA. So I thought it cannot be a left-over. Funny enough, after I restarted HA more times (as I am fiddling with some value_templates and therefore need to restart HA), the message (at least for now) does not appear anymore.
Moving on to troubleshooting: the default timeout is currently 8s for each device, so it could be possible that with that many endpoints to query the global 10s limit could be exceeded if the they don't reply instantaneously. I'm not seeing that warning on my instance with polling of just a couple network appliances, could you try commenting out all but one of the devices in your config and see if the warning comes up anyway?
Yes, I will comment all but just a few definitions in my yaml file with the snmp sensors and see if the message pops up again, and I will report back here.
Again, thanks for your feedback and your explanations about the 8s threshold (which I was indeed not aware of). Again, I have learnt something here in this nice forum. ❤️
I can confirm that the warning "Setup of sensor platform snmp is taking over 10 seconds" in my case only pops up sporadically and only when I have set those many snmp parameters as shown in my initial post. When I reduced the number, the warning did not pop up. I cannot provide a threshold when it happens and when not, but I assume that this is what it says, just a warning and not a problem. Therefore, I hereby close my "issue".
Thanks for your patience and for taking your time for creating and maintaining this very helpful integration. 👍
You're welcome. To sum this up for future reference, in this case the warning is benign and does what it's intended to do: if polling all the configured SNMP devices for the first time takes more than 10s to complete (due to network latency or whatever), it gets logged.
The problem
Logger: homeassistant.components.sensor Source: runner.py:189 integration: Sensor (documentation, issues) First occurred: 10:06:06 AM (2 occurrences) Last logged: 10:06:06 AM
Setup of sensor platform snmp is taking over 10 seconds.
-- The sensor values from SNMP are ok. Maybe the warning is just what it is, a warning, and I should ignore it? But if it means that there is something wrong, I would be grateful for help to find the reason for the problem and eventually resolve it.
I understand that this is a duplicate of https://github.com/home-assistant/core/issues/71368 and https://github.com/home-assistant/core/issues/75153.
However, both issues were closed in 2022, there is no possibility to add text to them, and the possible solutions laid out there did not help me. Therefore, I opened this new one. I hope that someone can kindly point me into the right direction. Thank you!
What version of Home Assistant Core has the issue?
2024.4.4
What was the last working version of Home Assistant Core?
This is the first version where I use SNMP.
What type of installation are you running?
Home Assistant OS
Integration causing the issue
SNMP
Link to integration documentation on our website
https://www.home-assistant.io/integrations/snmp
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
HA runs on a Raspberry Pi 4. The link between the Teltonika router (SNMP) and the RPi4 is via Wifi. The connection is strong and stable. But maybe this is nevertheless the reason for the setup of the sensor platform SNMP taking over 10 seconds?