Hello everyone,
I'm a new in Nagios XI, but i decided to use it to monitor my server environment, mainly windows.
I have a small bash script which uses windows performance counter to monitor network usage. the script convert bytes to Mbps.
#########################
!The SCRIPT
#!/bin/bash
#computer name $1
# Secure, password
value=`/usr/local/nagios/libexec/check_nt -H $1-p 12489 -s $2-v COUNTER -l "\network interface(*)\bytes total/sec"`
echo "scale=2; $value*0.000008" | bc
exit $exitcode
#########################
The QUESTION is: why Nagios XI does not draw graphs?
Draw graph based on bash script
Draw graph based on bash script
You do not have the required permissions to view the files attached to this post.
Re: Draw graph based on bash script
Your script is not outputting the performance data so the process that generates the graphs can not create the graph.
I did a simple edit to your script that should work for you.
Take a look at these links for the plugin's performance data output.
https://assets.nagios.com/downloads/nag ... fdata.html
https://nagios-plugins.org/doc/guidelines.html#AEN200
I did a simple edit to your script that should work for you.
Code: Select all
#!/bin/bash
value=`/usr/local/nagios/libexec/check_nt -H tompc -p 12489 -s nsclientpass -v COUNTER -l "\network interface(*)\bytes total/sec"`
perf=$(echo "scale=2; $value*0.000008" | bc)
echo "Value $value | 'MB'=$perf"
exit $exitcodeTake a look at these links for the plugin's performance data output.
https://assets.nagios.com/downloads/nag ... fdata.html
https://nagios-plugins.org/doc/guidelines.html#AEN200
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Draw graph based on bash script
Thanks tgriep, issue is solved.