|
From: Marr, J. <jm...@br...> - 2004-11-08 00:15:47
|
Yeah, it prints html :(
I added the statement to perfgraph.c, and I didn't see anything in the =
http logs after compiling and resetting everything.
I didn't notice, that the links in the cgi-bin, point to =
lt-perfgraph.cgi. :)
Here is a snippet of source for the http generated page.
<tr><td></td><td colspan=3D2><font face=3D"Arial, Helvetica" size=3D2>
<a href=3D"lt-perfgraph.cgi?select_host=3D1">Graph Binary Data.</a>
</font></td></tr>
Not sure is means anything....but its odd.
Joe Marr
-----Original Message-----
From: Yves Mettier [mailto:yme...@li...]=20
Sent: Sunday, November 07, 2004 5:34 PM
To: Marr, Joe
Cc: Per...@li...
Subject: RE: R: R: [Perfparse-users] Help.....
> Any pointers on where to place the statements? Im not much of a c =
programmer.
1st, in main().
Then, well, if it's easy for you, get deeper in the code (you don't need =
to understand
it as soon as you find where it exits). If not, send us the modified =
code (not the
original) and the last line number.
Don't send the original code because the line numbers correspond to the =
modified code :)
Ooops, before, I don't remember what happens when you run perfchart.cgi =
from the command
line ? If it does not print html on the console, you can run
strace perfchart.cgi
If you have html, well, I see nothing else than fprintf(...)
Yves
> Joe Marr
>
> -----Original Message-----
> From: Yves Mettier [mailto:yme...@li...]
> Sent: Sunday, November 07, 2004 3:46 PM
> To: Marr, Joe
> Cc: Bertinelli Massimo; per...@li...
> Subject: RE: R: R: [Perfparse-users] Help.....
>
> It seems that we'll have to edit the source...
>
> Could you put the following line everywhere you can in cgi/perfgraph.c =
?
> fprintf(stderr, "%f:%d\n", __FILE__,__LINE);
>
> This should appear in the errorlog of the web server.
> With this, you can find where the problem occurs. Tell us where, and =
if you understand
> why, your diagnostic.
>
> Maybe Ben or somebody else have other ideas ?
>
> Yves
>
>> I have tried just about everything.
>>
>> Even the devel branch (104) isn't working.
>>
>> The last version I can get to work is 100.7.
>>
>> This is the error the page gives me...
>> ___________________________
>>
>> Server error!
>> The server encountered an internal error and was unable to complete =
your request.
>>
>> Error message:
>> malformed header from script. Bad header=3Dperfgraph.cgi: =
perfgraph.cgi
>> If you think this is a server error, please contact the webmaster
>>
>> Error 500
>> excedrin.domain.com
>> Sun 07 Nov 2004 02:09:08 PM EST
>> Apache/2.0.40 (Red Hat Linux)
>> ___________________________
>>
>> This is the error that's in my http_error_log
>>
>> [Sun Nov 07 14:03:38 2004] [error] [client 10.1.1.228] malformed =
header from script.
>> Bad
>> header=3Dperfgraph.cgi: perfgraph.cgi, referer: =
http://excedrin.domain.com/nagios/
>> [Sun Nov 07 14:03:41 2004] [error] [client 10.1.1.228] malformed =
header from script.
>> Bad
>> header=3Dperfgraph.cgi: perfgraph.cgi, referer:
>> http://excedrin.domain.com/nagios/side.html
>> [Sun Nov 07 14:03:47 2004] [error] [client 10.1.1.228] malformed =
header from script.
>> Bad
>> header=3Dperfgraph.cgi: perfgraph.cgi, referer:
>> http://excedrin.domain.com/nagios/side.html
>> [Sun Nov 07 14:09:08 2004] [error] [client 10.1.1.228] malformed =
header from script.
>> Bad
>> header=3Dperfgraph.cgi: perfgraph.cgi, referer:
>> http://excedrin.domain.com/nagios/cgi-bin/perfgraph.cgi
>>
>> I have no errors in my configure output (I resolved the GD errors). =
If I make and
>> install 100.7 it works fine, but I really would rather have the =
newest version for
>> various reasons.
>>
>> Any help would be greatly appreciated.
>>
>> Joe Marr
>> -----Original Message-----
>> From: per...@li...
>> [mailto:per...@li...] On Behalf Of =
Marr, Joe
>> Sent: Friday, November 05, 2004 2:56 PM
>> To: Yves Mettier; Bertinelli Massimo
>> Cc: per...@li...
>> Subject: RE: R: R: [Perfparse-users] Help.....
>>
>> I resolved the gdlib issues, recompile 103 and it still wont run.
>>
>> Joe Marr
>> -----Original Message-----
>> From: per...@li...
>> [mailto:per...@li...] On Behalf Of =
Yves Mettier
>> Sent: Thursday, November 04, 2004 6:47 PM
>> To: Bertinelli Massimo
>> Cc: per...@li...
>> Subject: Re: R: R: [Perfparse-users] Help.....
>>
>>
>>> Yves,
>>> thanks for your reply.
>>> Do you think that the version of gd 1.8.4-11 is good or must change
>>> immediatly?
>>
>> If you can, you will probably go faster to change now and recompile =
perfparse without
>> hacking it.
>> If you cannot change now, you can run that :
>> configure <your options here> CFLAGS=3D-I/path/to/gd/include =
LDFLAGS=3D"-L/path/to/gd/lib
>> -lgd"
>> make
>>
>> if make does not work, maybe make CFLAGS=3D-I/path/to/gd/include
>> LDFLAGS=3D"-L/path/to/gd/lib -lgd" will work better ?
>>
>> I hope this helps.
>>
>> Yves
>>
>>> Massimo
>>>
>>> -----Messaggio originale-----
>>> Da: Yves Mettier [mailto:yme...@li...]
>>> Inviato: gioved=EC 4 novembre 2004 11.50
>>> A: per...@li...
>>> Oggetto: Re: R: [Perfparse-users] Help.....
>>>
>>>
>>>> Ben,
>>>> do you remember of me?
>>>> :)
>>>> I have one question about this problem:
>>>> when I lunch ./configure with the standard parameters I receive a =
warning
>>>> about gdlib-config dir , possibile that this is the problem?
>>>
>>> yes, it can be.
>>> Run "gdlib-config --cflags --libs"
>>>
>>> Does it answer something unexpected (including "gdlib-config : not =
found") ?
>>> Don't hesitate to run ./configure =
--with-gdlib_config_dir=3D/path/to/gd/bin
>>>
>>>> I think no....but I'm very tired because i don't understand where =
is the
>>>> problem.
>>>> Also for me the version 0.100.7 work fine other version don't work
>>>> (0.101.1 - 0.103.1).
>>>
>>> yes, this can be an explanation : the configure script changed to =
use
>>> gdlib_config :)
>>>
>>> Yves
>>>
>>>> I hope in your great support.
>>>> Reguards
>>>> Massimo Bertinelli
>>>>
>>>> -----Messaggio originale-----
>>>> Da: Ben Clewett [mailto:BCl...@pe...]
>>>> Inviato: gioved=EC 4 novembre 2004 9.04
>>>> A: Marr, Joe
>>>> Cc: per...@li...
>>>> Oggetto: Re: [Perfparse-users] Help.....
>>>>
>>>> Hi Joe,
>>>>
>>>> I am glad you got it to work. The only think I can think of is =
that
>>>> your browser was aggressively caching the page response. Therefore
>>>> although you fixed the problem by doing something to the =
perfparse.cfg,
>>>> this was not reflected in your browser which was showing you the =
cached
>>>> copy of the 'Bad script header'. By replacing the file, you change =
the
>>>> timestamp of the file, which is enough to flush the cache. You may =
want
>>>> to look at the cache settings of your browser and/or proxy server =
and
>>> see...
>>>>
>>>> Any more issues, please let me know.
>>>>
>>>> Regards, Ben.
>>>>
>>>> Marr, Joe wrote:
>>>>
>>>>> When I install and use version 0.100.7 everything works.....
>>>>>
>>>>>
>>>>> Does that help at all?
>>>>>
>>>>> Joe Marr
>>>>>
>>>>> -----Original Message-----
>>>>> From: Ben Clewett [mailto:BCl...@pe...]
>>>>> Sent: Wednesday, November 03, 2004 11:36 AM
>>>>> To: Marr, Joe
>>>>> Cc: Ben Clewett; per...@li...
>>>>> Subject: Re: [Perfparse-users] Help.....
>>>>>
>>>>> 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=3D"?select_host=3D1"
>>>>>>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=3D"#EEFFFF" TEXT=3D"#000000" LINK=3D"#000000" =
VLINK=3D"#000000"
>>>>>>ALINK=3D"#000000">
>>>>>><p align=3Dcenter>
>>>>>><table width=3D600 border=3D1 cellpadding=3D5 cellspacing=3D0
>>>>>>bgcolor=3D"#CCCCCC"><tr><td>
>>>>>> <table width=3D"100%" border=3D0 cellpadding=3D0 =
cellspacing=3D0>
>>>>>> <tr>
>>>>>> <td width=3D60><img =
src=3D"/nagios/images/perfparse-logo-sm.png"
>>>>>>border=3D0></td>
>>>>>> <td align=3Dcenter><font face=3D"Arial, Helvetica" size=3D2>
>>>>>> <b>Select Host to Graph</b><br>
>>>>>> <a href=3D"perfgraph.cgi">Click to return to main menu.</a>
>>>>>> </td>
>>>>>> <td width=3D60 align=3Dright><font face=3D"Arial, Helvetica"
>>>>>>size=3D1>v0.103.1</td>
>>>>>> </tr>
>>>>>> </table>
>>>>>></td></tr></table></p>
>>>>>><p align=3Dcenter>
>>>>>><table width=3D600 border=3D1 cellpadding=3D5 cellspacing=3D0
>>>>>>bgcolor=3D"#CCCCCC"><tr><td>
>>>>>> <table width=3D"100%" border=3D0 cellpadding=3D0 =
cellspacing=3D0>
>>>>>> <tr>
>>>>>> <td align=3Dcenter>
>>>>>><font face=3D"Arial, Helvetica" =
size=3D2><b>Group:</b> Unassigned
>>>>>><table width=3D"100%" border=3D1 cellpadding=3D5 cellspacing=3D0
>>>>>>bgcolor=3D"#FFFFFF"><td><font face=3D"Arial, Helvetica" size=3D2>
>>>>>><nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Darchprint">archprint<=
/a></
>>>>>
>>>>>>nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbooksrs6000%2D2">book=
srs60
>>>>>
>>>>>>00-2</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dcor01">brod=
art-c
>>>>>
>>>>>>or01</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dcor03">brod=
art-c
>>>>>
>>>>>>or03</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dcor04">brod=
art-c
>>>>>
>>>>>>or04</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dfrw01">brod=
art-f
>>>>>
>>>>>>rw01</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dgwy01">brod=
art-g
>>>>>
>>>>>>wy01</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dswt01">brod=
art-s
>>>>>
>>>>>>wt01</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dswt03">brod=
art-s
>>>>>
>>>>>>wt03</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dswt04">brod=
art-s
>>>>>
>>>>>>wt04</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dswt05">brod=
art-s
>>>>>
>>>>>>wt05</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dswt06">brod=
art-s
>>>>>
>>>>>>wt06</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dswt07">brod=
art-s
>>>>>
>>>>>>wt07</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dvlan0201">b=
rodar
>>>>>
>>>>>>t-vlan0201</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dvlan0301">b=
rodar
>>>>>
>>>>>>t-vlan0301</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dbrodart%2Dvlan0302">b=
rodar
>>>>>
>>>>>>t-vlan0302</a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Ddc8">dc8</a></nobr>&n=
bsp;&
>>>>>
>>>>>>nbsp;<nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Ddc9">dc9</a></nobr>&n=
bsp;&
>>>>>
>>>>>>nbsp;<nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dexcedrin">excedrin</a=
></no
>>>>>
>>>>>>br> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dgatekeeper">gatekeepe=
r</a>
>>>>>
>>>>>></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dinternet">internet</a=
></no
>>>>>
>>>>>>br> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Ditwebapps">itwebapps<=
/a></
>>>>>
>>>>>>nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dmailserver">mailserve=
r</a>
>>>>>
>>>>>></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dmailserver2">mailserv=
er2</
>>>>>
>>>>>>a></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dns1">ns1</a></nobr>&n=
bsp;&
>>>>>
>>>>>>nbsp;<nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dns2">ns2</a></nobr>&n=
bsp;&
>>>>>
>>>>>>nbsp;<nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dserial0%2D0">serial0-=
0</a>
>>>>>
>>>>>></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dserial0%2D1">serial0-=
1</a>
>>>>>
>>>>>></nobr> <nobr><a
>>>>>>
>>>>>
>>>>> =
href=3D"perfgraph.cgi?select_metric=3D1&host_name=3Dsmtp">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=3D"?select_host=3D1"
>>>>>>
>>>>>>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=3D1=
) 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=3Dperfgraph.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
>>>>>>>
>>>>>>>
>>>>>>>
--=20
- Homepage - http://ymettier.free.fr - http://www.logicacmg.com -
- GPG key - http://ymettier.free.fr/gpg.txt -
- Maitretarot - http://www.nongnu.org/maitretarot/ -
- Perfparse - http://perfparse.sf.net/ -
|