From: Ben C. <BCl...@pe...> - 2004-11-03 16:36:05
|
OOps, I gave you the wrong name. 'perfgraph.cgi' is what you correctly guessed. But this is very odd. What you just did is effectively what Apache does. It should have produced the HTML starting from the <HTML> tag. I can see your database being correctly queried with valid data being returned. All be it without the closing </body></html> but this is not because the program is in error. I will have to think about this.... Ben Marr, Joe wrote: > I don't have a perfparse.cgi. but (weird) perfgraph.cgi displays data. > > [root@excedrin sbin]# su apache > [apache@excedrin sbin]$ sh > sh-2.05b$ export QUERY_STRING="?select_host=1" > sh-2.05b$ ./perfg > perfgant.png perfgraph.cgi > sh-2.05b$ ./perfgraph.cgi > Expires: Sun, 02 Jan 2000 01:01:01 GMT > content-type: text/html > > <HTML> > <HEAD> > <TITLE> > PerfParse</TITLE> > <BODY BGcolor="#EEFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" > ALINK="#000000"> > <p align=center> > <table width=600 border=1 cellpadding=5 cellspacing=0 > bgcolor="#CCCCCC"><tr><td> > <table width="100%" border=0 cellpadding=0 cellspacing=0> > <tr> > <td width=60><img src="/nagios/images/perfparse-logo-sm.png" > border=0></td> > <td align=center><font face="Arial, Helvetica" size=2> > <b>Select Host to Graph</b><br> > <a href="perfgraph.cgi">Click to return to main menu.</a> > </td> > <td width=60 align=right><font face="Arial, Helvetica" > size=1>v0.103.1</td> > </tr> > </table> > </td></tr></table></p> > <p align=center> > <table width=600 border=1 cellpadding=5 cellspacing=0 > bgcolor="#CCCCCC"><tr><td> > <table width="100%" border=0 cellpadding=0 cellspacing=0> > <tr> > <td align=center> > <font face="Arial, Helvetica" size=2><b>Group:</b> Unassigned > <table width="100%" border=1 cellpadding=5 cellspacing=0 > bgcolor="#FFFFFF"><td><font face="Arial, Helvetica" size=2> > <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=archprint">archprint</a></ > nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=booksrs6000%2D2">booksrs60 > 00-2</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dcor01">brodart-c > or01</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dcor03">brodart-c > or03</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dcor04">brodart-c > or04</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dfrw01">brodart-f > rw01</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dgwy01">brodart-g > wy01</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dswt01">brodart-s > wt01</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dswt03">brodart-s > wt03</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dswt04">brodart-s > wt04</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dswt05">brodart-s > wt05</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dswt06">brodart-s > wt06</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dswt07">brodart-s > wt07</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dvlan0201">brodar > t-vlan0201</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dvlan0301">brodar > t-vlan0301</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=brodart%2Dvlan0302">brodar > t-vlan0302</a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=dc8">dc8</a></nobr> & > nbsp;<nobr><a > href="perfgraph.cgi?select_metric=1&host_name=dc9">dc9</a></nobr> & > nbsp;<nobr><a > href="perfgraph.cgi?select_metric=1&host_name=excedrin">excedrin</a></no > br> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=gatekeeper">gatekeeper</a> > </nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=internet">internet</a></no > br> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=itwebapps">itwebapps</a></ > nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=mailserver">mailserver</a> > </nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=mailserver2">mailserver2</ > a></nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=ns1">ns1</a></nobr> & > nbsp;<nobr><a > href="perfgraph.cgi?select_metric=1&host_name=ns2">ns2</a></nobr> & > nbsp;<nobr><a > href="perfgraph.cgi?select_metric=1&host_name=serial0%2D0">serial0-0</a> > </nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=serial0%2D1">serial0-1</a> > </nobr> <nobr><a > href="perfgraph.cgi?select_metric=1&host_name=smtp">smtp</a></nobr>  > ; </td></tr></table> > </td> > </tr> > </table> > </td></tr></table></p> > > Joe Marr > > -----Original Message----- > From: Ben Clewett [mailto:BCl...@pe...] > Sent: Wednesday, November 03, 2004 10:56 AM > To: Marr, Joe > Cc: per...@li... > Subject: Re: [Perfparse-users] Help..... > > Joe, > > The place I would start, if others members have not answered already: > > 1. su to your httpd user. Eg, $ su apache > Really important to do all testing as the httpd user. > > 2. Set an environment variable: > $ export QUERY_STRING="?select_host=1" > > 3. run the code: > $ /usr/local/nagios/sbin/perfparse.cgi > > Let us know. > > Regards, Ben. > > > > Marr, Joe wrote: > > >>Hi All, >> >> >> >>I'm trying to install the software for the first time, using the > > method 2. > >> >> >>When I try to launch the CGI using the standard link >>(http://server.domain.com/nagios/cgi-bin/perfgraph.cgi?all_bin=1) or > > any > >>link other then http://server.domain.com/nagios/cgi-bin/perfgraph.cgi > > I > >>get this error. >> >> >> *Server error!* >> >>The server encountered an internal error and was unable to complete > > your > >>request. >> >>Error message: >>malformed header from script. Bad header=perfgraph.cgi: perfgraph.cgi >> >>If you think this is a server error, please contact the webmaster >><mailto:root@localhost> >> >> >> *Error 500* >> >> >> >>I see that there was someone else with issue in the forums, but I > > tried > >>the things Ben suggested. Does anyone know what this error is about? >> >> >> >>Joe Marr >> >> >> > > > |