Bandwidth test and No output returned from 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 SourceForge.net 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.

Bandwidth test and No output returned from plugin

Postby rdubya » Fri Mar 09, 2018 2:04 pm

Core 4.1.1 on Centos 6.7

I've dropped this;
https://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth/Bandwith-%28Speed-Test%29-Upload-%26-Download-with-perfdata/details
...into place today and have been stumped by something that's probably simpler than I'm making it.

Here's the what I have in commands.cfg;
Code: Select all
define command {
       command_name    check_speed
       command_line    $USER1$/check_speed.sh -H $HOSTADDRESS$ -s $ARG1$ -d $ARG2$ -r $ARG3$
}

Here's what I have in localhost.cfg
Code: Select all
define service{
   use                  generic-service,nagiosgraph
   host_name            engmon ; The name of the host the service is associated with
   service_description  Check Bandwidth from Engmon to Wal-NFSserver      ; The service description
   check_command        check_speed! -H wal-nfsserver -s 5120 -d /home/engops/xfer_data -r /home/engops/xfer_data
   }

The command runs fine from the command line;
Code: Select all
[root@engmon objects]# /usr/local/nagios/libexec/check_speed.sh -H wal-nfsserver -s 5120  -d /home/engops/xfer_data -r /home/engops/xfer_data
D: 52428800.000 bits/s - U: 30836523.008 bits/s |dload=52428800.000bits/s uload=30836523.008bits/s

On the web output the command shows green, but I get a "Status Information: (No output returned from plugin)" output for the results.
The classic mistake is leaving out a needed argument, but I don't see that here.

It's Friday and maybe Monday some fresh eyes will help, but I'd like to collect some info this weekend.
Guidance would be appreciated.
rdubya
 
Posts: 40
Joined: Mon Apr 11, 2016 8:38 am

Re: Bandwidth test and No output returned from plugin

Postby npolovenko » Fri Mar 09, 2018 5:16 pm

Hello, @rdubya. If a plugin produces a blank line before the output message Nagios will show "No output returned from plugin". That includes any errors that script might output before the actual message.
I think you allready ran the command locally as a sudo user and it looks like there were no errors or blank lines.
Code: Select all
[root@engmon objects]# /usr/local/nagios/libexec/check_speed.sh -H wal-nfsserver -s 5120  -d /home/engops/xfer_data -r /home/engops/xfer_data
D: 52428800.000 bits/s - U: 30836523.008 bits/s |dload=52428800.000bits/s uload=30836523.008bits/s

Now, lets try to run the plugin as if Nagios ran it. Switch to the Nagios user and run the plguin locally one more time:
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_speed.sh -H wal-nfsserver -s 5120  -d /home/engops/xfer_data -r /home/engops/xfer_data
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2035
Joined: Mon May 15, 2017 5:00 pm

Re: Bandwidth test and No output returned from plugin

Postby rdubya » Mon Mar 12, 2018 9:30 am

Thanks for your reply. So yeah, running under nagios was a non-starter and I ended up fixing that, but I still have the same situation. The script runs well as nagios user, but the "No output" message remains in the gui with no stats collected.

Code: Select all
[nagios@engmon ~]$ /usr/local/nagios/libexec/check_speed.sh -H wal-nfsserver -s 5120  -d /var/spool/nagios/xfer_data -r /var/spool/nagios/xfer_data
D: 22481469.440 bits/s - U: 39938162.688 bits/s |dload=22481469.440bits/s uload=39938162.688bits/s


Comparing to a command that works and graphs well, I wonder if the output text for check_speed somehow breaks things;

Code: Select all
[nagios@engmon ~]$ /usr/local/nagios/libexec/check_nrpe -H slave_04 -c check_buildartifacts
DISK OK - free space: /build/artifacts 516918 MB (25% inode=99%);| /build/artifacts=1547073MB;1651286;1857697;0;2064108
rdubya
 
Posts: 40
Joined: Mon Apr 11, 2016 8:38 am

Re: Bandwidth test and No output returned from plugin

Postby kyang » Mon Mar 12, 2018 3:30 pm

I don't exactly remember, but I remember someone else was having issues using this plugin before as well.

Could never get it to display output onto the GUI.

Do you have the latest version of the plugin? Looks like it was updated in Dec 2017. (1.2)

https://github.com/jonwitts/nagios-spee ... est-cli.sh

Here is his new Nagios Exchange link.
https://exchange.nagios.org/directory/P ... li/details

Try that out and let us know! (You could also, post this as an issue for the author and see what he says since he created the plugin.)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
kyang
Support Tech
 
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm

Re: Bandwidth test and No output returned from plugin

Postby rdubya » Wed Mar 14, 2018 1:27 pm

Yes, I have the latest but rather than try to fix his I'll just write my own. Thanks for the help, if I get stuck I'll create another issue.

R
rdubya
 
Posts: 40
Joined: Mon Apr 11, 2016 8:38 am

Re: Bandwidth test and No output returned from plugin

Postby kyang » Wed Mar 14, 2018 2:13 pm

Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
kyang
Support Tech
 
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm


Return to Nagios Core

Who is online

Users browsing this forum: berlin and 38 guests