Nagios 2 and Nagiostat help, extinfo.cgi


#1

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 ?


#2

ScriptAlias /nagiostat/ /usr/local/nagios/nagiostat/
<Directory /usr/local/nagios/nagiostat>
AllowOverride AuthConfig
Options +ExecCGI
Order allow,deny
Allow from all

Put that in the httpd.conf and restart apache.


#3

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.


#4

To debug nagiostat:
vi nagiostat
edit the line
my $DEBUGLEVEL = 0; ## 0=Nothing, 1=Errors, 2=Warnings, 3=Debug
and change it to 3
save
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.


#5

here are couple of snipits from the debug file:

**INCOMING PERFDATA:
LASTCHECK=1125076524
HOSTNAME=Monitor
SERVICEDESCR="PING"
SERVICESTATE="OK"
OUTPUT="FPING OK - 216.52.118.205 (loss=0%, rta=71.100000 ms)"
PERFDATA=“loss=0%;20;60;0;100 rta=0.071100s;0.100000;0.500000;0.000000”
**WARNING: No match for value with regex on output ‘RTA = ([0-9.]+) ms’.
**WARNING: No match for value with regex on output ‘loss = (\d+)%’.

**INCOMING PERFDATA:
LASTCHECK=1125076455
HOSTNAME=DomainNameServer2
SERVICEDESCR="PING"
SERVICESTATE="OK"
OUTPUT="FPING OK - 216.52.118.212 (loss=0%, rta=72.000000 ms)"
PERFDATA=“loss=0%;20;60;0;100 rta=0.072000s;0.100000;0.500000;0.000000”
**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.


#6

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 - 216.52.118.205 (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
and
SERVICEDESCR="PING"
So, check your nagiostat.conf file and make sure you have one line that meets the above hostname and description.