[xymon] Execute a script on the client side
Ward, Martin
Martin.Ward at colt.net
Mon Jan 17 10:59:18 CET 2011
You can write a script that you must install on the client but which you can change the configuration parameters for on the server.
On the Xymon server edit the ~xymon/server/etc/client-local.cfg file and put in the entries you need passed to the client. I created my own entries for Solaris SMF daemons I wanted to monitor:
----
[jump.server.colt.net]
log:/var/adm/messages:10240
SVC:svc:/network/ssh:default online
SVC:svc:/site/apache2:default online
file:/var/adm/sa/.adm
file:/var/spool/lp/admins/.lp
----
All of this information is passed to the client.
In the client-side script you need to include code that reads the ~xymon/client/tmp/logftech.<hostname>.cfg file. I wrote the following:
----
SVCSCMD=/usr/bin/svcs
SVCFILE=/$BBTMP/svcs.$$
rm $SVCFILE.check >/dev/null 2>&1
SVCLIST=$SVCFILE.list
# Get a list of things to check for
grep "^SVC:" $BBTMP/logfetch.$MACHINEDOTS.cfg | sed "s/^SVC://g" >> $SVCFILE.check
----
Now I can specify on the Xymon server which SMF services are checked for on my clients.
HTH
|\/|artin
--
Martin Ward
Manager, Technical Services
DDI:+44 (0) 20 7863 5218 / Fax: +44 (0)20 7863 9999 / www.colt.net
Colt Technology Services, Unit 12, Powergate Business Park, Volt Avenue, Park Royal, London, NW10 6PW, UK.
Help reduce your carbon footprint | Think before you print. Registered in England and Wales, registered number 02452736, VAT number GB 645 4205 50
> -----Original Message-----
> From: meepmeep [mailto:meepmeep at fantasya.org]
> Sent: 14 January 2011 16:38
> To: xymon at xymon.com
> Subject: [xymon] Execute a script on the client side
>
> Hi
> I use Xymon to monitor multiple server. Since last week, one of my
> server get a suspicious behavior : the openvpn process was still up,
> but the default route changed, making it appears on the web with its
> original IP address (and not the openvpn gateway).
>
> I decide to use xymon to detect this, but, I'm kind of stuck to
> execute the script on the client side
> I follow this "howto" :
> http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/Other_Docs/HO
> WTO#How_to_write_server_side_module_.3F
> But, finally, the script give my the public address of the SERVER side.
>
> So, am I doing something wrong with the server side module ? Is there
> an option to push the test on the client side ?
> Or, must I put the script on the client side (~hobbit/client/ext/),
> like describe here :
> http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/Other_Docs/HO
> WTO#How_can_I_create_a_hobbit_client_custom_test_script.3F
> ?
>
> (I know, the name "server side module" is obvious, but I thought
> xymon was able to keep client configuration on server side)
>
>
> --
> Nicolas G. / meepmeep
> [EuropNet.org Admin]
> "Procrastinators: Leaders of Tomorrow"
>
> To unsubscribe from the xymon list, send an e-mail to
> xymon-unsubscribe at xymon.com
>
[Colt Disclaimer]
The message is intended for the named addressee only and may not be disclosed
to or used by anyone else, nor may it be copied in any way. The contents of
this message and its attachments are confidential and may also be subject to
legal privilege. If you are not the named addressee and/or have received this
message in error, please advise us by e-mailing abuse at colt.net and delete the
message and any attachments without retaining any copies. Internet
communications are not secure and Colt does not accept responsibility for this
message, its contents nor responsibility for any viruses. No contracts can be
created or varied on behalf of Colt Technology Services, its subsidiaries,
group companies or affiliates ("Colt") and any other party by email
communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate
potential viruses and unsolicited promotional emails. For more information
refer to www.colt.net or contact us on +44(0)20 7390 3900
More information about the Xymon
mailing list