Page 1 of 1
performance graph for plugin
Posted: Tue Nov 07, 2017 4:36 am
by terminus
hi
sorry for my question and my english
so
I'm need to check bandwidth for nic on remote server (centos)
and was founded this plugin
https://exchange.nagios.org/directory/P ... th/details
but this plugin dont create graph
in folder "/usr/local/nagios/share/perfdata/%MYHOST%" don't create rrd file at my service check
how to create rrd file and graph ?
Re: performance graph for plugin
Posted: Tue Nov 07, 2017 11:18 am
by npolovenko
Hello,
@terminus. Can you upload the command definition? Also, can you show us the output when you run the plugin from the command line?
And, can you click on the service in Nagios XI, select the Performance graph tab and make sure that no performance graph is being generated by this plugin?
Do other plugins on your Nagios XI generate graphs and RRD files?
Re: performance graph for plugin
Posted: Tue Nov 07, 2017 1:16 pm
by terminus
[root@monitor libexec]# ./check_bw.sh -H 192.251.195.110 -b 100 -v 2c -C %community% -m input -i eth0 -p 15 -w 75 -c 90
OK input bandwidth usage is 0.005 Mb/s, 0% used
define command {
command_name check_bw.sh
command_line $USER1$/check_bw.sh -H $HOSTADDRESS$ $ARG1$
}
yes, another service create graph and rrd files
Re: performance graph for plugin
Posted: Tue Nov 07, 2017 6:00 pm
by npolovenko
@terminus, I just checked the source code for this plugin.
Unfortunately, it doesn't have a graphing capability. In this case, I'd recommend to look for a different plugin on the Exchange.
Re: performance graph for plugin
Posted: Wed Nov 15, 2017 6:28 am
by terminus
npolovenko wrote:@terminus, I just checked the source code for this plugin.
Unfortunately, it doesn't have a graphing capability. In this case, I'd recommend to look for a different plugin on the Exchange.
thanks for your answer
but
how you understand, what this plugin dont create grahp ?
thx
Re: performance graph for plugin
Posted: Wed Nov 15, 2017 1:11 pm
by npolovenko
@terminus Yeah, if you look at the source code the final output that this plugin returns looks like this:
Code: Select all
echo "OK $mode bandwidth usage is $final Mb/s, $perc% used"
If the graphing option was supported you'd see something like this:
Code: Select all
echo "OK $mode bandwidth usage is $final Mb/s, $perc% used|'Mb/s'=$final"
Take a look at this tutorial under Performance Data.
http://nagios-plugins.org/doc/guidelines.html
Basically, you just add a | sign after the output message and specify 'value_name' = value. You can actually try to implement that yourself if you'd like.
Re: performance graph for plugin
Posted: Wed Nov 15, 2017 3:57 pm
by terminus
thanks
its work
you are fantastic
Re: performance graph for plugin
Posted: Wed Nov 15, 2017 4:18 pm
by npolovenko
@terminus, Nice! I'll close this thread as resolved then.