Xymon Mailing List Archive search

Send apache /server-status page to server via client.

list Ralph Mitchell
Tue, 29 Oct 2013 22:07:06 -0400
Message-Id: <CAAEjoCUZND40SyXd6uo1U7_TJ1=user-ae581ddd2dfc@xymon.invalid>

You can simulate the "apache" tag in the xymon hosts.cfg by running little
script on the client itself.  It reports the short-form server-status info
as a data message that will be picked up on the xymon server and reported
on the trends page.

Ralph Mitchell

===== cut - here =====
#!/bin/sh

STATE=`curl -s -S http://localhost/server-status?auto`

$XYMON  $XYMSRV  "data $MACHINE.apache
$STATE"

exit 0
===== cut - here =====


On Tue, Oct 29, 2013 at 7:49 PM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>wrote:
On 29 October 2013 19:48, deepak deore <user-7b03b2a1ee70@xymon.invalid> wrote:
/server-stauts page can be accessed from localhost, is there a way where
xymon client can send /server-status page to the server ?

You can just write a script on the client to fetch via localhost, and
report to the Xymon server via a status message.

However, if you're unable to get a script running on the client, you can
probably do something in client-local.cfg on the Xymon server.  For
example, setup a "file:" entry like so:

  file:`( echo "client/apache-status $MACHINE.$OSTYPE"; echo
"[server-status]"; wget -q -O- http://127.1/server-status ) | $XYMON
$XYMSRV @ >/dev/null`

You should end up with the server status output in the client data for the
server.  You can then fetch it server-side from a script by using:

  $XYMON $XYMSRV "clientlog $SERVERNAME section=server-status"

and parse it for whatever you need.


J