Check command hostalive: execution time

Hello.
I monitor over 10 thousand device. The native check command hostalive has check execution time approx. 4 s. Then the average check latency is over 70 s. How can I reduce check execution time.

A host definition example

object Host “volos.cpe.local.si” {
address = “100.4.4.2”
check_command = “hostalive”
vars.host_groups = [“device2”]
}

Best regards,
Tadeja

Hi,

hostalive is essentially using the ping template which invokes the check_ping plugin. This one reads the output of the ping binary which fires requests sequentially.

If you’re looking for speed improvements, check_icmp uses native OS sockets and transmits packages in parallel. The corresponding ITL provided command is icmp.

check_icmp will need the setuid bit set though.

Cheers,
Michael

Hello!
Many thanks for quick replay.
Best regards,
Tadeja

Welcome to the show, @sajet !

Would you kindly tick the “solution” checkbox in the post that answered your question if you don’t need any more help? This way you give kudos and show all users they don’t have to read through your whole thread just to find that you don’t need any more help.

The answer was very useful . It solved my problem. Many thanks. The average execution latency is now under 1ms.