» Monitoring Plugins
Monitoring Plugin: check_netio.sh
December 21, 2018
This is a plugin to monitor network interfaces on Linux systems. The initial version was developed by Ian Yates. The plugin is currently maintained by Claudio Kuenzler.
The plugin needs to be executed on the same host as you want the interfaces monitored. A typical use case of this plugin is in combination with a remote plugin execution service (e.g. NRPE).
The plugin displays performance data of the given interface as "Bytes", retrieved from the OS.
As of the current state, the plugin does not support thresholds.
# 2007-09-06 (firstname.lastname@example.org) - Created
# 2007-09-06 (email@example.com)
# 2008-11-27 (firstname.lastname@example.org) - Added GPLv3 licence
# 2017-01-27 (www.claudiokuenzler.com) - Added validation checks and compatibility with CentOS/RHEL 7
# 2018-06-05 (www.claudiokuenzler.com) - Added validation checks and compatibility with Ubuntu 18.04
# 2018-08-14 (www.claudiokuenzler.com) - Set LANG to English for correct parsing
# 2018-12-21 (www.claudiokuenzler.com) - Use /proc/net/dev instead of ifconfig (use -l for legacy)
# 2018-12-21 (www.claudiokuenzler.com) - Remove verbose mode (it was never implemented anyway)
# 2018-12-21 (www.claudiokuenzler.com) - Change default exit code to UNKNOWN
# 2018-12-21 (www.claudiokuenzler.com) - Remove dependency to (nagios|monitoring)-plugins-common
- In legacy mode: ifconfig command must exist
Definition of the parameters:
-i Name of the interface to check. Example: eth0
[-l] Use legacy mode (uses ifconfig command in the background) OPTIONAL
[-h] Show help/usage OPTIONAL
Command definition in NRPE using arguments
command[check_netio]=/usr/lib/nagios/plugins/check_netio.sh -i $ARG1$
Command definition in NRPE without arguments
command[check_netio_eth0]=/usr/lib/nagios/plugins/check_netio.sh -i eth0
The following screenshot shows a graph in Grafana with an InfluxDB as data sourece using the performance data from check_netio: