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

Asif Iqbal vadud3 at gmail.com
Thu Jan 12 20:06:41 CET 2012


On Thu, Jan 12, 2012 at 12:14 PM, Asif Iqbal <vadud3 at gmail.com> wrote:
> On Thu, Jan 12, 2012 at 12:13 PM, Asif Iqbal <vadud3 at gmail.com> wrote:
>> On Thu, Jan 12, 2012 at 11:05 AM, Ward, Martin <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.
>>>
>>
>> xymon localhost "clientlog client.example.com section=ps" | grep pr[o]c
>>
>> will let you know if the process is running on client.example.com
>>
>> create a new column for that process called proc for all your hosts
>> with an ext script on the server
>>
>>
>>
>> Then use combo.cfg to generate alert like this
>>
>> allhosts.proc = ( client1.proc + client2.gis ) == 1
>
> correction:
>
>  allhosts.proc = (client1.proc + client2.proc) == 1
>
>

forgot to mention the last part.

you will also need to have an entry on hosts.cfg, something like this

page allhosts All Hosts proc service
group-compress <H3><I>All Hosts proc service</I></H3>
group-only proc|info
0.0.0.0 allhosts # noconn NAME:"Combo test for proc on all hosts"


>>
>> as long as the result is 1 allhosts.proc won't be red
>>
>> HTH
>>
>>
>>
>>
>>>
>>>
>>> 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 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
>>>
>>> _______________________________________________
>>> Xymon mailing list
>>> Xymon at xymon.com
>>> http://lists.xymon.com/mailman/listinfo/xymon
>>>
>>
>>
>>
>> --
>> Asif Iqbal
>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?



More information about the Xymon mailing list