I've load Sentinix linux distribution that come
preconfigured with Nagios, Nagat, etc. I've been using
it for a month or so and needed to add graphs. I've
installed NagioStat on two different test machines.
I had to change the check command, to add "perl
/usr/local/nagios/nagiostat/nagiostat" to get it to
work. The debug.log file shows all is well, and the RRD
file is generated and updated.
Graphs aren't working, and I'm sure it is something
very simple. Here is what happens:
1) When I click on the graph icon, a new window appears
using this url:
https://10.xx.yy.zz/nagiostat/nagiostat.cgi?graph_name=TEST
which is correct per the documentation.
2) The web page pulls up:
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete your request.
Please contact the server administrator, root@sandbox
and inform them of the time the error occurred, and
anything you might have done that may have caused the
error.
More information about this error may be available in
the server error log.
Apache/1.3.29 Server at nagios2.xxx.yy Port 443
3) The Apache error_log contains:
[Fri Jul 23 07:30:01 2004] [error] (2)No such file or
directory: exec of
/usr/local/nagios/nagiostat/nagiostat.cgi failed
[Fri Jul 23 07:30:01 2004] [error] [client 10.xx.yy.zz]
Premature end of script headers:
/usr/local/nagios/nagiostat/nagiostat.cgi
4) I did a chmod to change the permissions so that the
file was not executable. It gave me a forbidden error,
so we are accessing the right file. I suspect that it
is either a Perl thing or an Apache config issue, but
I'm not seeing it.
HELP! Thanks
Logged In: YES
user_id=476996
Since you had to add the "perl /usr/local/.../nagiostat" to the
exec-command, it seems as your distribution won't execute
the scripts as they are. Check the location of your perl binary
("bash# which perl") and change the first line of all scripts to
reflect the full path told by the which-command. The first line
of the script (#!/usr/bin/perl) (often called hash-bang) tells
the system how to execute the script, in this case that it
should start the perl interpreter.
--Carl