New version 1.4 of check_netio allows to check for interface errors

Written by - 0 comments

Published on - Listed in Monitoring Linux Icinga Nagios

check_netio is a simple and small monitoring plugin to retrieve statistics from network interfaces on Linux. Until now the plugin simply collected the data (Received Bytes and Transmitted Bytes) but never did a "real" check and simply returned OK. To simply gather data and graph them that was a quick and working method.

Today a new version (1.4) of check_netio is available. This version introduces a new optional parameter -e. With this parameter the plugin is told to check for interface errors. Let's try this:

$ /usr/lib/nagios/plugins/ -i enp5s0 -e
NETIO WARNING - Errors on enp5s0: 7 Receive errors, 0 Transmit errors|NET_enp5s0_RX=1995757695B;;;; NET_enp5s0_TX=4720483095B;;;; NET_enp5s0_ERR_IN=7;;;; NET_enp5s0_ERR_OUT=0;;;;

So far so good; the plugin detected 7 receive/rx errors on the interface.

Now the big question was what to do from now on? Should I set a threshold for the Receive/RX errors? I will go crazy doing this for 1000 servers whenever the error count increases... Instead I opted for a "short term memory" of the plugin itself. It will write the current error count into a temporary file and read this file out the next time it runs. By comparing the previous error count from the temporary file and the current error count, the plugin knows whether the error count increased and will again alert with a WARNING:

$ /usr/lib/nagios/plugins/ -i enp5s0 -e
NETIO WARNING - Errors on enp5s0: 14 Receive errors (previous check: 12), 2 Transmit errors (previous check: 0)|NET_enp5s0_RX=1995757695B;;;; NET_enp5s0_TX=4720483095B;;;; NET_enp5s0_ERR_RX=14;;;; NET_enp5s0_ERR_TX=2;;;;

If the error count did not increase, the plugin will return OK but with a hint that there were errors in the past:

$ /usr/lib/nagios/plugins/ -i enp5s0 -e
NETIO OK - enp5s0: Receive 1995757695 Bytes, Transmit 4720483095 Bytes - Hint: Previously detected errors (Receive: 14, Transmit: 2) but no change since last check|NET_enp5s0_RX=1995757695B;;;; NET_enp5s0_TX=4720483095B;;;; NET_enp5s0_ERR_RX=14;;;; NET_enp5s0_ERR_TX=2;;;;

On an interface with a steady increasing count of the errors, this will clearly be shown by the plugin.

Note: The performance data for the errors is always on, whether or not the -e parameter is used.

The documentation of check_netio is up to date now, too.

Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder