Starting point:
Because Nagios's Nrpe plug-in detects pings, if there are too many packets, a check timeout of more than 30 packets Nrpe the socket expires.
Later thought of a way, in the local got a foot to ping 150 packets, combined with Nagios 3 minutes to check, the results of the script ping is integrated into a temporary file, let Nrpe on the trigger when the file read state, send an alarm.
The problem is that if the detected machine is accidentally dropped to the destination node, it will cause the target node to be erroneously reported, and the quorum server is the one that is thought of.
Quorum node one, Message Queuing one, a number of detection nodes around.
Implementation method:
the HTTPSQS,HTTPSQS deployed on the quorum node are queued based on different keys, and the ping scripts are deployed around the check node, and the results are consolidated and sent to the message queue.
The quorum node takes different queues according to different keys and then determines the state of each node, making a comprehensive judgment to determine if the target server is abnormal.
Some script code
650) this.width=650; "Src=" Https://s2.51cto.com/oss/201711/16/2e53e28204d9002a078620f66083e39f.png-wh_500x0-wm_3 "alt=" 2e53e28204d9002a078620f66083e39f.png-wh_ "/>" on-wmp_4-s_592955053.png "title=" Distributed node
Judge the script and deliver the Nagios
650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/16/21c72b65378d05c889ce561b3091cc57.png-wh_500x0-wm_3 -wmp_4-s_64780610.png "title=" Tim Picture 20171116151542.png "alt=" 21c72b65378d05c889ce561b3091cc57.png-wh_ "/>
Monitoring
650) this.width=650; "Src=" Https://s4.51cto.com/oss/201711/16/73edbbdffe2a4fa75d35fe1aaca92aab.png-wh_500x0-wm_3 -wmp_4-s_754881099.png "title=" Tim Picture 20171116152404.png "alt=" 73edbbdffe2a4fa75d35fe1aaca92aab.png-wh_ "/>
This article from the "Kamio automatic operation and maintenance of the road" blog, declined reprint!
Nagios combined with HTTPSQS multiple-point multi-packet Check ping monitoring