Netstat-statistics plugin ?

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Netstat-statistics plugin ?

Postby junqian1992 » 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.

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
Posts: 37
Joined: Wed Nov 15, 2017 4:57 am

Re: Netstat-statistics plugin ?

Postby scottwilkerson » Fri Oct 12, 2018 7:55 am

You could put those commands in a custom bash script anc create a nagios plugin, then call the plugin with an agent such as NRPE or NCPA

Here are the Nagios Plugins Development Guidelines
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
DevOps Engineer
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 9 guests