Shall I ping a host before acquiring data via SNMP?

I am not an expert on networks.
So, this could be a very silly question.

There are some devices in LAN which are polled by HA via SNMP.
My question is about “let’s save some resources, reduce number of errors in Log”.
But before asking my question, let me describe how I managed to check Speedtest in LAN.

I need to check my Internet speed by Speedtest.

My router is connected to 2 ISPs (WAN1, WAN2) in LoadBalance mode.
There are some routing rules for clients in LAN like:
– host_A, host_B - use WAN1;
– host_C, host_D - use WAN2;
– others - use both WANs in supposedly-working LoadBalance mode.

To check both ISPs, what I need is:
– use a CLI speedtest application instead of a standard integration;
– run this command on remote hosts in LAN (like “on host_A to check WAN1”, “on host_C to check WAN2”) via SSH.

Running Speedtest utilizes a lot of network bandwidth, so I do not do it often a day.
Sensors for Speedtest are “command_line” sensors which are updated by 2 automations (for WAN1, WAN2).
Before running a command, HA pings the corresponding host - if it is offline, the command is not sent, otherwise I will have errors in Log.

Now we came to the initial question.
HA is collecting some data from hosts via SNMP.
These SNMP sensors are updating with some “scan_interval” (60, 300).
If some host is offline, I see lots of warnings (or errors?) in the Log like (do not remember exactly):
– “snmp platform took more XX minutes to …”
– “updating snmp data failed” or kind of.
The question is - shall I update these SNMP sensors by automations which ping hosts before updating?
Will it save some resources?

Accept the error message and keep the automation as now.
You will just complicate the automation.

1 Like