Last update: March 11, 2019

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.



117 downloads so far...

Download plugin and save it in your Nagios/Monitoring plugin folder (usually /usr/lib/nagios/plugins, depends on your distribution). Afterwards adjust the permissions (usually chmod 755).

Community contributions welcome on GitHub repo.

Version history / Changelog

# 2007-09-06 ( - Created
# 2007-09-06 (
# 2008-11-27 ( - Added GPLv3 licence
# 2017-01-27 ( - Added validation checks and compatibility with CentOS/RHEL 7
# 2018-06-05 ( - Added validation checks and compatibility with Ubuntu 18.04
# 2018-08-14 ( - Set LANG to English for correct parsing
# 2018-12-21 ( - Use /proc/net/dev instead of ifconfig (use -l for legacy)
# 2018-12-21 ( - Remove verbose mode (it was never implemented anyway)
# 2018-12-21 ( - Change default exit code to UNKNOWN
# 2018-12-21 ( - Remove dependency to (nagios|monitoring)-plugins-common


  • In legacy mode (invoked with -l): ifconfig command must exist and be executable

Definition of the parameters

Parameter Description
-i* Name of the interface to check. Example: eth0
-l Use legacy mode (uses ifconfig command in the background)
-h Show help/usage

* mandatory parameter

Usage / running the plugin on the command line


./ -i string [-l]


/usr/lib/nagios/plugins/check_netio -i eth0
NETIO OK - eth0: RX=945587720, TX=7048311553|NET_eth0_RX=945587720B;;;; NET_eth0_TX=7048311553B;;;;

Command definition (NRPE)

command[check_netio]=/usr/lib/nagios/plugins/ -i $ARG1$

Service definition

Service definition in Nagios, Icinga 1.x, Shinken, Naemon

# Check network io of eth0
define service{
  use generic-service
  host_name mylinux1
  service_description NetIO eth0
  check_command check_nrpe!check_netio!-a "eth0"

Service object definition Icinga 2.x

# Check network io of eth0
object Service "NetIO eth0" {
  import "generic-service"
  host_name "mylinux1"
  check_command = "nrpe"
  vars.nrpe_command = "check_netio"
  vars.nrpe_arguments = ["eth0"]

Apply rule in Icinga 2.x

The next example is more interesting as it uses apply rules (a feature of Icinga 2.x). Let's assume we have a couple of Linux hosts already defined with custom attributes:

object Host "mylinuxserver" {
  import "generic-host"
  address = ""
  vars.os = "Linux"
  vars.interfaces = [ "eth0" ]

Using these custom attributes (vars.os and vars.interfaces) we can now create an apply rule:

# Apply check_netio on Linux servers
apply Service "Network IO " for (interface in host.vars.interfaces) {
  import "generic-service"

  check_command = "nrpe"
  vars.nrpe_command = "check_netio"
  vars.nrpe_arguments = [ interface ]

  assign where host.address && host.vars.os == "Linux" && host.vars.interfaces

This "Network IO" service object will now be applied to all hosts which have the custom host attributes host.vars.os set to "Linux" and host.vars.server.interfaces is defined. As vars.interfaces is an array, you can define multiple interfaces.


check_netio grafana graph tx rx
check_netio in icinga2