<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 5:23 PM, Japheth Cleaver <span dir="ltr"><<a href="mailto:cleaver@terabithia.org" target="_blank">cleaver@terabithia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 1/26/2017 1:49 PM, Asif Iqbal wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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?<br>
<br>
Thanks<br>
<br>
</blockquote></span>
Hi,<br>
<br>
There are two ways to do this in the RPM, which roughly correspond to the "site" and "local" paradigms.<br>
<br>
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.<br>
<br>
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.)<br></blockquote><div><br></div><div>Forgot to mention, I am using centos 6.8 and I do see the sections dir here ( and no local dir ).</div><div><br></div><div> /usr/share/xymon-client/sections</div><div><br></div><div>under that dir I do see few scripts</div><div><br></div><div><div># ls</div><div><br></div><div>ipcs  meminfo  mounts  README  vmstats</div></div><div><br></div><div>I have xymon-client-4.3.21-4.el6.x86_64 installed</div><div><br></div><div>I went ahead and added a script called lscpu</div><div><br></div><div><div># cat /usr/share/xymon-client/sections/lscpu </div><div>#!/bin/dash</div><div><br></div><div># collecting cpu info</div><div><br></div><div>exec /usr/bin/lscpu 2>/dev/null</div></div><div><br></div><div>Do I need to restart the xymon client? So, if I understand correctly, this script will survive a yum update xymon-client?</div><div><br></div><div>Thanks a lot for such a detail description!</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
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.<br>
<br>
HTH,<br>
-jc<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Asif Iqbal<br>PGP Key: 0xE62693C5 KeyServer: <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>A: Because it messes up the order in which people normally read text.<br>Q: Why is top-posting such a bad thing?<br><br></div>
</div></div>