I cannot figure out how to get Monit to monitor the number of open/established TCP/IP connections on a server so an alert can be sent when "too many" are open. Do you know how this can be setup?
I cannot figure out how to get Monit to monitor the number of open/established TCP/IP connections on a server so an alert can be sent when "too many" are open. Do you know how this can be setup?
here is another Solution
define following configuration monit :
Script : checkn_socket.sh
Monit Logs
It doesn't seem to be supported directly but I came up with a hack.
Determine the number of ESTABLISHED connections every minute and write a file with an equal number of zero bytes.
Then, setup Monit to check on file size of this zeros file. If it gets "too big" alert.
In crontab for some user:
In Monit config: