Solve nagios plugin check_iftraffic64.pl not reporting data

I’ve decided to use this plugin, check_iftraffic64.pl for network card monitoring (for Linux)
Details :

Plugin name : check_iftraffic64.pl

# check_iftraffic.pl – Nagios(r) network traffic monitor plugin
# Copyright (C) 2004 Gerd Mueller / Netways GmbH
# Version .76

My nagios version is 4.1.1 running on CentOS 7.2.1511 x64.

In order for the plugin to work i had to install perl Net::DNS.

yum install perl-Net-DNS.x86_64

Manually running the plugin shows valid data :

OK - Average IN: 1.32KB (0.00%), Average OUT: 1.80KB (0.00%)Total RX: 73.72GBytes, Total TX: 118.96GBytes|inUsage=0.00%;85;98 outUsage=0.00%;85;98 inBandwidth=1320.86B outBandwidth=1796.35B inAbsolut=73715474187c outAbsolut=118964135441c

Also, the plugin creates a traffic folder with statistics in /usr/local/nagios/libexec/traffic

After setting the service and commands directives in nagios, the output of Status Information was : (No output on stdout) stderr:

Nagios check_iftraffic64.pl plugin does not show valid data

Nagios check_iftraffic64.pl plugin does not show valid data

After digging a while, i saw that the traffic folder was created with root:root as owner and group. Also the stats files in this folder were untouched. They were only changing when manually running the script. Changing the owner and group to nagios and restarting nagios, solved the problem and stats files were updated.

Correct output from check_iftraffic64.pl plugin

Correct output from check_iftraffic64.pl plugin

4 comments

Skip to comment form

    • Jorge on December 12, 2017 at 9:43 pm
    • Reply

    Hello, the same thing is happening to you, I do not understand well that you modified.

    1. I changed the owner to nagios:nagios for the following folder : /usr/local/nagios/libexec/traffic

    • Martin on October 10, 2018 at 5:44 pm
    • Reply

    Thanks, this was helps me.

    • Sheriz on February 4, 2019 at 6:04 pm
    • Reply

    It’s not working for me i have a critical and the same No output

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.