[Xymon] Where to find the latest hostdata (or: How to monitor one process on two servers)?

Ward, Martin Martin.Ward at colt.net
Tue Jan 17 12:03:59 CET 2012


My thanks to Steven, Bruce and Iqbal for your suggestions, with your help I finally managed to get a nice, simple script that runs on the server, checks the process list from both clients and creates a Xymon message for a dummy host that sets the status of the process.

In this instance it was simpler and cleaner to have a single script running on the server than to have client-side scripts plus combo.cfg entries, ymmv.

|\/|artin

From: Steven Carr [mailto:sjcarr at gmail.com]
Sent: 12 January 2012 17:09
To: Ward, Martin
Cc: xymon at xymon.com
Subject: Re: [Xymon] Where to find the latest hostdata (or: How to monitor one process on two servers)?

You can get this using the xymon command e.g...

xymon $XYMSERVERS "clientlog hostname section=ps"

That will dump the [ps] section from the current client data, you can then grep through that to look for the required process, repeat for the second host and then hopefully you should know which one it's running on.

Steve


On 12 January 2012 16:05, Ward, Martin <Martin.Ward at colt.net<mailto:Martin.Ward at colt.net>> wrote:
Hi all,

I have a pair of servers that run Veritas Cluster Software and they have a number of different processes that they run in turn. Simply put it means that there is a process that will be running on one or another of the two servers and at any given time I will not know which server it runs on. The important thing for me is that it is running, so I set about creating a monitor that will check for this.

I can’t have something that runs on the client since I won’t know which client the process runs on but it struck me that the server always has an up to date process list, so I could simply read the hostdata file for the two servers, rip out the process list, concatenate the two and search for the specific process name, simple!

This is a brilliant idea that would work if only I had access to the up to date client data. It seems that the data stored in the hostdata directory only changes when a status for that server changes to an alert state (according to the xymond_hostdata web page) so if the process switches to a different machine but nothing actually changes the alert status of the client, the latest host data is not stored in the hostdata/ subdirectory.

I know that the latest host data is stored somewhere because I can see it in the web browser. Does anyone know where this up to date host data is kept such that I can utilise the information in it?

Failing that do you have any other suggestions, recommendations or scripts lying around that will enable me to look for a process across more than one server?

|\/|
[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<mailto: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<http://www.colt.net> or contact us on +44(0)20 7390 3900<tel:%2B44%280%2920%207390%203900>

_______________________________________________
Xymon mailing list
Xymon at xymon.com<mailto:Xymon at xymon.com>
http://lists.xymon.com/mailman/listinfo/xymon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120117/f759aa7d/attachment.html>


More information about the Xymon mailing list