HTTP test
list Vernon Everett
Hi Henrik
When you place a URL in bbhosts file, what method does Hobbit use to
check this?
Is there any way, besides writing our own script, to check the type of
output we get.
We need this to check the status of the back-end.
If our web server is up, that's one thing, but by checking the returned
data, we can know if the back end applications are up.
Cheers
Vernon
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
NOTICE: This message and any attachments are confidential and may contain copyright material of Australian Finance Group Limited or a third party. It is intended solely for the purpose of the addressee and any other named recipient. If you are not the intended recipient, any use, distribution, disclosure or copying of this message is strictly prohibited. The confidentiality attached to this message is not waived or lost by reason of the mistaken transmission or delivery to any unintended party. If you have received this message in error, please notify the author immediately or contact Australian Finance Group on +61 8 9420 7888.
list Vernon Everett
Hi Henrik
Thanks for the reply.
I rechecked my script.
What I sent you was my debug output (for human consumption only) and is
from the & lines.
while read TABLESPACE VAL
do
[ -n "$OUTVAL" ] && OUTVAL="$OUTVAL:"
* echo "DS:$TABLESPACE:GAUGE:600:0:100"
& echo "DS:$TABLESPACE:GAUGE:600:0:100" >> /tmp/newtest.out #
test
# stub remove
later
OUTVAL=$OUTVAL$VAL
done < /tmp/stripped
rm /tmp/stripped
* echo "tablespace.rrd"
* echo "$OUTVAL"
& echo "OUTVAL=$OUTVAL" >> /tmp/newtest.out # test stub remove later
The * lines are machine-readable output, and should end up in the .rrd
files.
But it isn't even trying to write a .rrd file.
Thanks for the tip about the hobbitgraph.cfg.
I have created an entry in the .cfg, but until I get some data into the
rrd files, it will still not display anything. L
Or does the script and the contents of the hobbitgraph.cfg have to be
correct before it will start writing a .rrd file?
Cheers
V
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Monday, 2 May 2005 3:21 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] External scripts help
Hi Vernon,
On Fri, Apr 29, 2005 at 03:48:09PM +0800, Vernon Everett wrote:
I have a custom script to generate tablespace information, and I want to
graph the % utilization to spot trends.
I have a script, which chops it up, and returns this
---snip---
DS:siebprod.XDB:GAUGE:600:0:100
DS:siebprod.WHS_INDEX:GAUGE:600:0:100
DS:siebprod.WHS_DATA:GAUGE:600:0:100
DS:siebprod.USERS:GAUGE:600:0:100
DS:siebprod.UNDOTBS1:GAUGE:600:0:100
DS:siebprod.TOOLS:GAUGE:600:0:100
DS:siebprod.SYSTEM:GAUGE:600:0:100
DS:siebprod.SIEB_INDEX:GAUGE:600:0:100
DS:siebprod.SIEB_DATA:GAUGE:600:0:100
DS:siebprod.LOADER_DATA:GAUGE:600:0:100
OUTVAL=0:71:78:1:27:66:69:81:84:0
---snip---
The first part with all the "DS:..." defs look OK, but the last line
is wrong.
Right after all the "DS:.." lines you must output the filename for the
RRD file - "tablespace.rrd" or whatever suitable name you can think of.
Next goes the line with the values you've parsed. Leave out the
"OUTVAL=" bit, it should ONLY be the values - nothing else.
And did you remember to setup a definition in hobbitgraph.cfg how this
graph should be displayed ? Quoting my man-page:
Apart from writing the script, You must also add a section to
hobbitgraph.cfg(5) so that hobbitgraph.cgi(1)
knows how to generate the graph from the data stored in the
RRD file. To make the graphs actually show up on
the status-page and/or the "trends" page, add the
name of the new graph to the LARRDS and/or GRAPHS setting in
hobbitserver.cfg(5).
Ah, before I forget, brilliant tool Henrik, thanks.
You ever pop into Perth, there's a few cold ones waiting for you. :-)
Thanks, will do if I manage to get down under sometime :-) Henrik
▸
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
NOTICE: This message and any attachments are confidential and may contain copyright material
of Australian Finance Group Limited or a third party. It is intended solely for the purpose of the
addressee and any other named recipient. If you are not the intended recipient, any use,
distribution, disclosure or copying of this message is strictly prohibited. The confidentiality attached
to this message is not waived or lost by reason of the mistaken transmission or delivery to any
unintended party. If you have received this message in error, please notify the author immediately
or contact Australian Finance Group on +61 8 9420 7888.
list Martin Flemming
Hi !
Can somebody tell me how the http-check work ?
.. i see nothing like "curl, etc." in the source
xymonnet/httptest.c
The reason ist, that after a normal http-check on a windows-server,
the application craches .. .i can't believe that the xymon-http-test
should be the reason, but i've to tell how does xymon test a webside ...
thank & cheers
Martin
list Henrik Størner
▸
On 14-07-2013 15:15, Martin Flemming wrote:
Can somebody tell me how the http-check work ? .. i see nothing like "curl, etc." in the source xymonnet/httptest.c
Xymon does all of the HTTP request generation and network stuff by itself.
▸
The reason ist, that after a normal http-check on a windows-server, the application craches .. .i can't believe that the xymon-http-test should be the reason, but i've to tell how does xymon test a webside ...
Unfortunately, there is no debugging option in xymonnet so it shows exactly what is being sent to the server. And it depends on the exact test you have in hosts.cfg. Assuming this is a simple URL test (no POST data or other special stuff), then a test like 10.0.0.1 mywebserver # http://web.example.com/myapp/ would trigger this request: GET /myapp/ HTTP/1.1 Connection: close Host: web.example.com User-Agent: Xymon xymonnet/4.3.11 Accept: */* Pragma: no-cache My guess would be that it crashes on the "User-Agent" string because it doesn't handle unknown useragents (browsers) correctly. I've seen that happen. A network sniffer on the Xymon server can tell you exactly what is being sent and received - e.g. wireshark. You can also use tcpdump or snoop and still analyse the data with wireshark - that is much easier than reading the raw output from tcpdump. Regards, Henrik
list Martin Flemming
▸
On Thu, 18 Jul 2013, Henrik Størner wrote:
On 14-07-2013 15:15, Martin Flemming wrote:Can somebody tell me how the http-check work ? .. i see nothing like "curl, etc." in the source xymonnet/httptest.cXymon does all of the HTTP request generation and network stuff by itself.The reason ist, that after a normal http-check on a windows-server, the application craches .. .i can't believe that the xymon-http-test should be the reason, but i've to tell how does xymon test a webside ...Unfortunately, there is no debugging option in xymonnet so it shows exactly what is being sent to the server. And it depends on the exact test you have in hosts.cfg. Assuming this is a simple URL test (no POST data or other special stuff), then a test like 10.0.0.1 mywebserver # http://web.example.com/myapp/ would trigger this request: GET /myapp/ HTTP/1.1 Connection: close Host: web.example.com User-Agent: Xymon xymonnet/4.3.11 Accept: */* Pragma: no-cache My guess would be that it crashes on the "User-Agent" string because it doesn't handle unknown useragents (browsers) correctly. I've seen that happen. A network sniffer on the Xymon server can tell you exactly what is being sent and received - e.g. wireshark. You can also use tcpdump or snoop and still analyse the data with wireshark - that is much easier than reading the raw output from tcpdump.
Thanks a lot for explanation, henrik ! cheers, martin