Xymon Mailing List Archive search

Linux client with local-config (or bb-memory.sh for linux)

list John Thurston
Thu, 11 Oct 2018 14:45:56 -0800
Message-Id: <user-82b7fdaf4fe6@xymon.invalid>

We run xymon servers the old-school way*: local config of clients with client-side evaluation of thresholds. I run a mashup of ancient BB, newer BBPE, and even newer xymon clients.

I'm in need of memory monitoring on a CentOS 7 host. The client I have there (I think it is a BBPE version) doesn't provide it. So I reached back and grabbed a bb-memory.sh from some other system. But it doesn't work cleanly :(

For linux, the script captures the output of 'free -m' and then populates variables:
   FREE_PHYS
   FREE_ACT
   FREE_SWAP
by grepping lines from the result:
   Mem
   • Swap
and my version of 'free' (3.3.10) has moved the '+/-' information up into a new column in the 'Mem' line. I don't see a way to adjust the 'free' command to return results in the old format, so I'll need to accommodate the new format in the shell script.

Before I go dive in and engineer my own parser, I thought I'd ask here:
   Does anyone have a bb-memory.sh they'd share with me?

Alternatively, I could remove the old client and install something newer. But the last time I tried compiling the client with the 'local-config' option, it didn't work out well. So my second question is:
   Is there a linux client package that correctly support local-config?


* Yeah, I know there are plenty who think this is a terrible idea and can't stand the concept. But I don't own most of the hosts. So I don't want to have them dragging my central code down to them. Nor do I know the business rules which define success or failure. It's up to the owner of the host to set those things.


-- 
    Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska