Netstat-statistics plugin ?
Posted: Fri Oct 12, 2018 4:35 am
Hi all,
could recommend what plugin is suitable for me ?
Example :
I need to show out the result as below script on Nagios core. But i dunno what plugin can do like this.
since i need to real time to check how many connection on our web server by using Nagios core.
could recommend what plugin is suitable for me ?
Example :
I need to show out the result as below script on Nagios core. But i dunno what plugin can do like this.
since i need to real time to check how many connection on our web server by using Nagios core.
Code: Select all
echo -e "connections: "
netstat -n | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"\t",state[key]}'
echo -e "\n connected server & ip:"
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n