On 1/26/2017 1:49 PM, Asif Iqbal wrote:
How do I make change and add a new stanza for example [lscpu] to the xymonclient-linux.sh that it survives a yum update to next version of xymon client?
Thanks
Hi,
There are two ways to do this in the RPM, which roughly correspond to the "site" and "local" paradigms.
Inside your client's home directory (/usr/share/xymon-client/ or /usr/share/xymon/client/ in the RPM), there's may be a "sections" and/or "local" directory. Both of these will be searched for any executable files, and if any are found their output will be added into the client report near the end.
The output of files in "sections" will be put in a client [section] with the name of the executable (or script). The output of files in "local" will be similar, but will be listed as "[local:filename]" to prevent collisions. (The intent is for files in ~/sections/ to be package or site controlled, while "~/local/" is more akin to /usr/local/ for truly one-off scripts.)
Both of these are present in 4.4 and in the Terabithia RPMs. Only ~/local/ is read in stock 4.3.28. In the RPMs, /usr/local/share/xymon-client/ is checked as well for legacy reasons.
HTH, -jc