[Xymon] Xymon, external script question

David Baldwin david.baldwin at ausport.gov.au
Thu Apr 7 07:30:13 CEST 2011


Phil,
> Hi Taylor,
>
> I'm new at xymon and am also looking at using the client data.
>
> I found the xymon command itself lets you query current status:
>
> # /usr/local/xymon/server/bin/xymon 127.0.0.1 "xymondlog
> hostname.domain.com.memory"
>
> hostname.domain.com|memory|green||1301551188|1302151594|1302153394|0|0|10.10.10.1|-1|||Y|
> green Thu Apr  7 14:46:28 EST 2011 - Memory OK
>    Memory              Used       Total  Percentage
> &green Physical           9905M      11881M         83%
> &green Actual              514M      11881M          4%
> &green Swap                  0M      10239M          0%
>
> The above was run on the xymon server, hence the localhost address. It
> appears to display the current service status page (on the webserver) in
> text. So it would be pretty easy to parse out the physical memory and
> compare that with a value you set in the script itself. 
>
That gets you the status page which is what the server creates after
it's processed the client message it receives.

You can get the client section directly doing:

# /usr/local/xymon/server/bin/xymon 127.0.0.1 "clientlog hostname.domain.com section=memory"
[memory]
memory    Total    Used
physical: 2047 1020
virtual: 2046 890
page: 3948 1731


David.
> cheers.
>
>
>
>
>>>> On 4/7/2011 at 3:58 AM, in message
> <2CB6F3BD6F4BE04EA34D80E087163D35E6073BB7 at tbmail01.tradebot.com>,
> Taylor Lewick
> <tlewick at tradebotsystems.com> wrote:
>> Hi all, we manage several hundred hosts, and we've noticed when doing
>> maintenance that requires shutdown/reboot  that occasionally (seldom)
> on 
>> restart one or more of the memory modules in a given host isn't
> detected.  
>> Sometimes it requires reseating the memory, sometimes just a reboot,
>> sometimes the memory is bad.  Thus we have a need to write a script
> that will 
>> check the amount of memory each host sees, and send an email/alert if
> its 
>> below a given amount.
>>
>> So I thought why not make use of xymon and the memory test you get
> for free. 
>>  A large percentage of our hosts >60% have exactly 6 GB of memory,
> but a large 
>> percentage does not.  So I was wondering if there is a way to make
> use of the 
>> hobbit-clients.cfg script where I could set alert thresholds for a
> new 
>> external script.
>>
>> The default value for any host would be alert if less than 6.0 GB of
> memory 
>> is detected, but I could set custom alerts for given hosts that have
> more or 
>> less than this amount.
>>
>> I don't believe its possible to use hobbit-client.cfg file in this
> way, but 
>> wanted to check with the list and hope I'm wrong.
>>
>> Thanks,
>> Taylor
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon


-- 
David Baldwin - IT Unit
Australian Sports Commission          www.ausport.gov.au
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
david.baldwin at ausport.gov.au          Leverrier Street Bruce ACT 2617


-------------------------------------------------------------------------------------
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au

This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.
-------------------------------------------------------------------------------------



More information about the Xymon mailing list