<div dir="ltr"><div><div><div>After a few days in production, this works best when you set the default load in analysis.cfg to a super low warning level of "0.1" and a critical of something very high like "100.0".<br><br></div>That way, a hostdata file is generated for a system that has not had its load auto calculated. (and you don't get alert emails/texts as its only at warning)<br><br></div>The cron script works best when run from /etc/cron.hourly instead of daily, in order to capture newly added systems faster.<br><br></div>Since Enterprise Linux 5 systems do not report nproc data, you will still need to manually enter those systems into an analysis file somewhere...but works great on CentOS/Oracle 6 and 7.<br><div><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="color:rgb(0,0,153)">Bill Howe</span><br style="color:rgb(0,0,153)"><span style="color:rgb(0,0,153)"><a href="mailto:howe.bill@gmail.com" target="_blank">howe.bill@gmail.com</a></span><span style="color:rgb(0,0,153)"><a href="http://www.linkedin.com/in/whowe" target="_blank"></a></span><br></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jun 7, 2016 at 8:55 AM, Bill Howe <span dir="ltr"><<a href="mailto:howe.bill@gmail.com" target="_blank">howe.bill@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>FYI,<br><br></div>For those that don't want to wait for a variable or for the xymon server to out of the box handle this situation, I thew together a quick script that is working in our environment to auto populate client CPU loads.<br><br></div><ol><li>Download text file attachment (xymon_client_cpuload_calc.txt), rename to have a .sh ending, place file on Xymon server. (someplace such as /root/scripts/)</li><li>Install pre-req package: "bc"  (this allows bash string to floating point number conversion)</li><li>Edit script in the "Customize Here" section:</li><ul><li>Edit multipliers (number of procs * number for warning and critical CPU load thresholds)</li><li>Note the default for the auto load directory or change it.</li></ul><li>Create the auto load directory on the Xymon server (default: /etc/xymon/analysis.d/auto-cpuload.d)</li><li>Add the auto load directory to the Xymon main analysis.cfg file so it is included: (default: "directory /etc/xymon/analysis.d/auto-cpuload.d" to /etc/xymon/analysis.cfg )</li><li>Setup the script to auto run via cron (-v is verbose output)<br></li><ul><li><b>Example</b>:</li><li>/etc/cron.daily/xymon-calc-cpuload.sh<br>#!/bin/bash<br># Description: Execute xymon script to auto calculate cpu load from hostdata<br>#########################<br><br>/root/scripts/xymon_client_cpuload_calc.sh -v &> /root/scripts/xymon_client_cpuload_calc.log<br></li></ul></ol></div><div><br></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><span style="color:rgb(0,0,153)">Bill Howe</span><br style="color:rgb(0,0,153)"><span style="color:rgb(0,0,153)"><a href="mailto:howe.bill@gmail.com" target="_blank">howe.bill@gmail.com</a></span><span style="color:rgb(0,0,153)"><a href="http://www.linkedin.com/in/whowe" target="_blank"></a></span><br></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Mon, May 30, 2016 at 3:28 PM, Bill <span dir="ltr"><<a href="mailto:howe.bill@gmail.com" target="_blank">howe.bill@gmail.com</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">JC,<br>
<br>
Awesome, glad its on its way!<br>
<br>
Is the nproc collection currently available in a xymon variable?<br>
<br>
That way, it can be worked around with a server side cron for now.<br>
<br>
Thank you,<br>
<br>
Bill Howe<br>
<a href="mailto:howe.bill@gmail.com" target="_blank">howe.bill@gmail.com</a><div><div><br>
<br>
On 05/30/2016 01:42 AM, J.C. Cleaver wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
On Sat, May 28, 2016 2:11 pm, Bill wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Xymon'ers,<br>
<br>
Is there any planned functionality to be able to dynamically set a xymon<br>
client's LOAD alert settings based upon how many processors it has?<br>
<br>
The current static defaults are not too helpful, and hand editing an<br>
entry in /etc/xymon/analysis/*.cfg for every server just shouldn't have<br>
to be done.<br>
<br>
_*Ideally*_<br>
It would be best if along with the "top" view that is reported by<br>
clients, they also reported their CPU count (either with "nproc" or<br>
"grep -c proc /proc/cpuinfo")<br>
<br>
Then the CPU count could be shown on client's "cpu" service page. <=<br>
Critical information when determining if load is a problem or not.<br>
<br>
Since the count would then be reported to and available on the xymon<br>
server, it could then be possible to set warnings and criticals based<br>
off of CPU count. (IE Warn at a load number equal to CPU count, Critical<br>
at a number equal to CPU count x 1.5)<br>
<br>
</blockquote>
<br>
Hi Bill,<br>
<br>
It's definitely planned, but not quite in there yet. It'll likely need to<br>
be an additional (distinct) RRD file with a separate set of (normalized)<br>
thresholds.<br>
<br>
The collection of number of processes for some OS's went in in<br>
<a href="https://sourceforge.net/p/xymon/code/7707" rel="noreferrer" target="_blank">https://sourceforge.net/p/xymon/code/7707</a><br>
<br>
<br>
HTH,<br>
-jc<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>