From: Glen K. <Gle...@dp...> - 2005-10-14 00:25:44
|
Sorry but the URL's were wrong in my previous post and I added a bit more info, it should have read >>> Glen Kelly 14/10/2005 10:58 am >>> Whenever I try to view a graph I get the follow error reported in Internet Explorer. The URL for the page is http://gabar/nagios/cgi-bin/perfparse.cgi?graph=1&&metric=%2Fvar "Line: 7 Char: 3 Error: 'document.graph.timerange' is null or not an object Code: 0 URL: http//gabar/nagios/cgi-bin/perfparse.cgi?graph=1&&metric=load1" Not sure if that error is complete, unfortunately that is all of the error I can see in the window. The source of the page it is trying to display is "<HTML> <HEAD> <TITLE> PerfParse</TITLE> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> function isAbsRelVisible() { if (document.graph.timerange[1].checked) showAbsolute(); else showRelative(); } function showAbsolute() { Abs1.style.visibility="visible"; Abs2.style.visibility="visible"; Abs3.style.visibility="visible"; Abs4.style.visibility="visible"; Rel1.style.visibility="hidden"; Rel2.style.visibility="hidden"; Rel3.style.visibility="hidden"; Rel4.style.visibility="hidden"; } function showRelative() { Abs1.style.visibility="hidden"; Abs2.style.visibility="hidden"; Abs3.style.visibility="hidden"; Abs4.style.visibility="hidden"; Rel1.style.visibility="visible"; Rel2.style.visibility="visible"; Rel3.style.visibility="visible"; Rel4.style.visibility="visible"; } </SCRIPT> <BODY BGcolor="#EEFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" onload="isAbsRelVisible()"> " From playing around it does not seem to be correctly passing parameters between scripts i.e. It is generating URL's like this http://gabar/nagios/cgi-bin/perfparse.cgi?graph=1&&metric=%2Fvar or http://gabar/nagios/cgi-bin/perfparse.cgi?select_metric=1&host_name=%2E I am sure it is because 1 - we are using "." is the hostname i.e. gabar.pacit.tas.gov.au 2 - for plugin's like check_disk the binary data contains a "/" character i.e. [root@gabar nrpe]# /usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /var DISK OK - free space: /var 3491 MB (88%);| /var=475MB;3569;3767;0;3966 This is a URL that works (I made a host called test) http://gabar/nagios/cgi-bin/perfparse.cgi?graph=1&host=test&service=CPULoad&metric=load1 if I change the URL for a host that does not work i.e. http://gabar/nagios/cgi-bin/perfparse.cgi?graph=1&host=gabar.pacit.tas.gov.au&service=CPULoad&metric=load1 then this works as well, as does this http://gabar/nagios/cgi-bin/perfparse.cgi?graph=1&host=test&service=disk_var&metric=/var Perfparse does not seem to be able to generate URL's containing a "." or a "/" character. Any ideas on how to fix? Just about to try altering the illegal characters in perfparse.cfg to see if that helps. Glen |