Is there a way to monitor established TCP connections to an NRPE client?
I have about 40 TCP connections to the same port from remote logging agents, and would like to get an alert if one of these connections drops.
Also the name of the remote host that disconnected would be good.
Nagios TCP Connection Monitor
Re: Nagios TCP Connection Monitor
You would need to write your own custom script.
You could base it off of the following post:
http://serverfault.com/questions/402449 ... onnections
You could modify it to create a temp file after each run with the full netstat output.
The next time it runs, run a diff on the temp file and the new netstat output and use awk or some other method to grab the IP that is missing.
Run a DNS query on the IP to grab the hostname and return that with an error code.
You could base it off of the following post:
http://serverfault.com/questions/402449 ... onnections
You could modify it to create a temp file after each run with the full netstat output.
The next time it runs, run a diff on the temp file and the new netstat output and use awk or some other method to grab the IP that is missing.
Run a DNS query on the IP to grab the hostname and return that with an error code.