I have installed Nagiostat w/ Nagios 2. When I click on the nifty little graph icon on Service Detail page I am directed to the extinfo.cgi page. There is a new Extra Services Notes icon. When I click on that icon it opens a new window with the cgi script for nagiostat.cgi. What am I doing wrong here ?
ScriptAlias /nagiostat/ /usr/local/nagios/nagiostat/
Allow from all
Put that in the httpd.conf and restart apache.
Your solution worked. Thanks so much. The README is not quite correct in the syntax you provided. Now I get the pop-up window w/ broken graphs. One thing I did notice is that there are no rrd files being created in the archives directory. I am new too rrdtool and I am not sure if I have it correctly configured. Any tips would be greatly appreciated.
To debug nagiostat:
edit the line
my $DEBUGLEVEL = 0; ## 0=Nothing, 1=Errors, 2=Warnings, 3=Debug
and change it to 3
now there should be a file debug.log that you can tail.
AFter you have seen a bunch of stuff tail through the log, then go ahead and view the file and read it.
You could have any number of problems show up in that log, but one I’ve seen is along the lines of it not being able to parse the output of the checkcommand properly, so you end up with a character being parsed, but the rrd is storing numbers.
debug.log should help you tons.
here are couple of snipits from the debug file:
OUTPUT="FPING OK - 18.104.22.168 (loss=0%, rta=71.100000 ms)"
**WARNING: No match for value with regex on output ‘RTA = ([0-9.]+) ms’.
**WARNING: No match for value with regex on output ‘loss = (\d+)%’.
OUTPUT="FPING OK - 22.214.171.124 (loss=0%, rta=72.000000 ms)"
**WARNING: Hostname and description didn’t match any of the regexes in the config-file.
There are several more but of the same type of message for other hosts. I have tried to use essentially the same format in the nagiostat.conf and replaced the appropriate palces with my hostnames and services.
Thanks for your quick replies and help.
Please read the debug.log
What does it say right here? **WARNING: No match for value with regex on output ‘RTA = ([0-9.]+) ms’.
What is that telling you? Well, look in your nagiostat.conf for the ValueRegexTemplate for most likely ping_rta_pktloss. It states that the regex is RTA = ([0-9.]+) ms, but your output isn’t like that is it? Your output is FPING OK - 126.96.36.199 (loss=0%, rta=71.100000 ms)
So rta does not equal RTA. You are using the fping command, but that regex was setup for the ping command, which has a different output.
You have to either modify the ping_rta_pktloss or create another one (I’d create another one) I called mine fping_rta_pktloss and no, I’m not going to tell you exactly what it is, since this should be easy for you to fix.
Now, on to your 2nd debug entry.
What does it say here? **WARNING: Hostname and description didn’t match any of the regexes in the config-file.
That means that in your nagiostat.conf file, for all of the many “InsertValue” lines that you have, it could not find any that have a Hostname and description of HOSTNAME=DomainNameServer2
So, check your nagiostat.conf file and make sure you have one line that meets the above hostname and description.