[Xymon] CGI Scripts coredumping
Glenn Brown
Brown.Glenn at healthnow.org
Tue Jun 25 18:15:13 CEST 2013
Henrik,
Thanks for the reply, doing what you stated I was seeing the expected HTML
output in the command line, the only thing that changed on Friday was I
re-did the hosts.cfg. My co-worker and I both reviewed it and we didn't
see any errors in that that config file, but we made the decision to
restore back to a copy from a couple of weeks ago. After doing that
everything is working correctly again.
One last question is there a way to parse the hosts.cfg for errors, maybe
I have some erroneous character or escape/control sequence in there we are
not seeing.
From:
xymon-request at xymon.com
To:
xymon at xymon.com
Date:
06/25/2013 06:00 AM
Subject:
Xymon Digest, Vol 29, Issue 23
Sent by:
"Xymon" <xymon-bounces at xymon.com>
Send Xymon mailing list submissions to
xymon at xymon.com
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.xymon.com/mailman/listinfo/xymon
or, via email, send a message with subject or body 'help' to
xymon-request at xymon.com
You can reach the person managing the list at
xymon-owner at xymon.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Xymon digest..."
Today's Topics:
1. custom graph problem (deepak deore)
2. CGI Scripts coredumping (Glenn Brown)
3. Re: CGI Scripts coredumping (Henrik St?rner)
4. Re: CGI Scripts coredumping (Henrik St?rner)
5. Re: rrd network graphs on windows check (B-Art Gillis)
6. Re: rrd network graphs on windows check (Jeremy Laidman)
----------------------------------------------------------------------
Message: 1
Date: Mon, 24 Jun 2013 17:52:14 +0530
From: deepak deore <deepakdeore2004 at gmail.com>
To: "xymon at xymon.com" <xymon at xymon.com>
Subject: [Xymon] custom graph problem
Message-ID:
<CABpN7iS15sXBwKJz4vwXio8arQAHNwbJZVAK8_aV1+_=Q=UO-w at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I have setup the graph which is showing no data. The output contains NCV
value and some detailed output after that, how rrd will get the data from
NCV value only and ignore other output?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.xymon.com/pipermail/xymon/attachments/20130624/394c26c2/attachment-0001.html
>
------------------------------
Message: 2
Date: Mon, 24 Jun 2013 11:05:17 -0400
From: Glenn Brown <Brown.Glenn at healthnow.org>
To: xymon at xymon.com
Subject: [Xymon] CGI Scripts coredumping
Message-ID:
<OFB120EE62.149029DC-ON85257B94.004FFF64-85257B94.0052E186 at healthnow.org>
Content-Type: text/plain; charset="us-ascii"
Over the weekend the xymon CGI scripts seem to have started to coredump.
In the Web server logs I see this...
[Mon Jun 24 10:19:27 2013] [error] [client 10.133.24.119] Premature end of
script headers: svcstatus.sh, referer: http://monaix/xymon/nongreen.html
[Mon Jun 24 10:39:38 2013] [error] [client 10.133.24.119] Premature end of
script headers: enadis.sh, referer: http://monaix/xymon-cgi/report.sh
In the cgi-bin and cgi-secure directories I see a core file which
references the actual C cgi apps, when I try to run gdb backtrace it just
tells me signal 4, illegal instruction, I assume It has no more info since
there are no symbols.
I am really at a loss for what would have started to cause this happen,
can anyone provide some insight or direction?
CONFIDENTIALITY NOTICE: This email message and any attachments are for the
sole use of the intended recipient(s) and may contain proprietary,
confidential, trade secret or privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited and may be a
violation of law. If you are not the intended recipient or a person
responsible for delivering this message to an intended recipient, please
contact the sender by reply email and destroy all copies of the original
message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.xymon.com/pipermail/xymon/attachments/20130624/124b90a5/attachment-0001.html
>
------------------------------
Message: 3
Date: Mon, 24 Jun 2013 17:34:41 +0200
From: Henrik St?rner <henrik at hswn.dk>
To: xymon at xymon.com
Subject: Re: [Xymon] CGI Scripts coredumping
Message-ID: <51C86711.7030608 at hswn.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Den 24-06-2013 17:05, Glenn Brown skrev:
> Over the weekend the xymon CGI scripts seem to have started to coredump.
> In the cgi-bin and cgi-secure directories I see a core file which
> references the actual C cgi apps, when I try to run gdb backtrace it
> just tells me signal 4, illegal instruction, I assume It has no more
> info since there are no symbols.
It usually comes down to some configuration setting that has been
changed .... any of your config files changed recently ?
You could try running one of the CGI's by hand. If you have a URL like
this (for one of the detailed status pages):
http://www.xymon.com/xymon-cgi/svcstatus.sh?HOST=blixen.hswn.dk&SERVICE=cpu
then you can run it by hand with
SCRIPT_NAME="svcstatus.sh"
REQUEST_METHOD=GET
QUERY_STRING="HOST=blixen.hswn.dk&SERVICE=cpu"
export SCRIPT_NAME QUERY_STRING REQUEST_METHOD
/usr/lib/xymon/cgi-bin/svcstatus.sh
(the QUERY_STRING is the bit of the URL after the '?')
With a bit of luck you'll get some error-message. If not, then I would
probably try re-compiling the binaries with debugging symbols (the '-g'
option in gcc) and then see if running the cgi-program from a gdb
session gives you a better idea of what is happening.
Regards,
Henrik
------------------------------
Message: 4
Date: Mon, 24 Jun 2013 17:37:13 +0200
From: Henrik St?rner <henrik at hswn.dk>
To: xymon at xymon.com
Subject: Re: [Xymon] CGI Scripts coredumping
Message-ID: <51C867A9.9090002 at hswn.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Den 24-06-2013 17:34, Henrik St?rner skrev:
> Den 24-06-2013 17:05, Glenn Brown skrev:
>> Over the weekend the xymon CGI scripts seem to have started to
coredump.
>
> It usually comes down to some configuration setting that has been
> changed .... any of your config files changed recently ?
I just remembered - we had a similar problem some time ago where the
permissions on some of the Xymon data-directories (hist, histlogs, rrd,
tmp and so on) had been changed.
Regards,
Henrik
------------------------------
Message: 5
Date: Mon, 24 Jun 2013 23:03:58 +0200
From: B-Art Gillis <bacaselo at gmail.com>
To: Jeremy Laidman <jlaidman at rebel-it.com.au>
Cc: "xymon at xymon.com" <xymon at xymon.com>
Subject: Re: [Xymon] rrd network graphs on windows check
Message-ID:
<CAHS9aJhu9B_g33yJ_HVwpjSdrStW0g1YwNM3mc02atdbwuAC-A at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Jeremy,
Thank you for your answer but I just saw on the graph that the values are
converted to rrd data seem to come from the "do_netstat.c" module.
I just want to graph the TCP/IP trafic using the Windows command "netstat
-e".
If I send my test page to the "netstat" test I see the following message
in
the rrd_status.log:
2013-06-20 22:34:28 Host 'server1' reports netstat for an unknown OS
I guess that I don't sent all required data to the Xymon server.
Any idea of the requirements and the format?
At this moment I was sending the test in the format:
green ma 24/06/2013 22:56:58,51
[netstat]
192.168.17.1 144084269 41843593
The value that are available:
Interface Statistics
Received Sent
Bytes 144681781 42531845
Unicast packets 184396 169026
Non-unicast packets 777 11827
Discards 0 0
Errors 0 0
Unknown protocols 0
On Sun, Jun 23, 2013 at 11:32 AM, Jeremy Laidman
<jlaidman at rebel-it.com.au>wrote:
>
> On 22 June 2013 00:04, B-Art Gillis <bacaselo at gmail.com> wrote:
>
>> Can someone explain me to which xymon test I should post my ifstat
info?
>>
>>
> Typically, ifstat numbers are sent in a "client" message in the [ifstat]
> section. Example here of an ifstat section:
>
>
>
http://www.xymon.com/xymon-cgi/svcstatus.sh?CLIENT=blixen.hswn.dk§ion=ifstat
>
> It's for Linux, so the format is all wrong if you're trying to emulate
> BBWin. But gives you the idea.
>
> J
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.xymon.com/pipermail/xymon/attachments/20130624/a1fde696/attachment-0001.html
>
------------------------------
Message: 6
Date: Tue, 25 Jun 2013 13:07:24 +1000
From: Jeremy Laidman <jlaidman at rebel-it.com.au>
To: B-Art Gillis <bacaselo at gmail.com>
Cc: "xymon at xymon.com" <xymon at xymon.com>
Subject: Re: [Xymon] rrd network graphs on windows check
Message-ID:
<CAAnki7CjjGQSaKu7rU-RQZiBLqR_Mb3A3o-+Eb-z882k4jKmXA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On 25 June 2013 07:03, B-Art Gillis <bacaselo at gmail.com> wrote:
> Thank you for your answer but I just saw on the graph that the values
are
> converted to rrd data seem to come from the "do_netstat.c" module.
No, if you want interface statistics then you want ifstat parsed in
do_ifstat.c. If you want protocol statistics (layer 3 and above such as
TCP and UDP) then you would want a [netstat] section parsed in
do_netstat.c. The message example you gave shows interface statistics.
Xymon expects the format to match ifstat_bbwin_exprs[] (defined in
do_ifstat.c). This includes an IP address then the in and out byte count.
The output of "netstat -e" does not provide an IP address, and it
provides
much more than just the bytes in and out. You'd have to select the Bytes
line and prefix it with an IP address (probably a dummy device name would
do also).
Something like:
EthDev 144681781 42531845
Any whitespace can be used as separators (one or more tabs or spaces).
You could probably get away with this:
echo [netstat] & netstat -e | find "Bytes"
This would give "Bytes" as a devicename, but I don't think it would break
anything.
You need to prefix this message with the correct "client" message header.
If you're sending other client data, this should be included with that
message, otherwise one will mask the other.
The client message might look something like this:
client server1.win32
[netstat]
Bytes 144681781 42531845
To get Xymon to match against the bbwin match string, you have to report
your OS in the message as "bbwin" or "win32". This is probably why you're
getting the "reports netstat for an unknown OS" message.
J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.xymon.com/pipermail/xymon/attachments/20130625/b1518bc0/attachment-0001.html
>
------------------------------
Subject: Digest Footer
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon
------------------------------
End of Xymon Digest, Vol 29, Issue 23
*************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130625/c5132776/attachment.html>
More information about the Xymon
mailing list