Xymon Mailing List Archive search

Intelligent CPU Load Settings

5 messages in this thread

list Bill Howe · Sat, 28 May 2016 16:11:46 -0500 ·
Xymon'ers,

Is there any planned functionality to be able to dynamically set a xymon client's LOAD alert settings based upon how many processors it has?

The current static defaults are not too helpful, and hand editing an entry in /etc/xymon/analysis/*.cfg for every server just shouldn't have to be done.

_*Ideally*_
It would be best if along with the "top" view that is reported by clients, they also reported their CPU count (either with "nproc" or "grep -c proc /proc/cpuinfo")

Then the CPU count could be shown on client's "cpu" service page. <= Critical information when determining if load is a problem or not.

Since the count would then be reported to and available on the xymon server, it could then be possible to set warnings and criticals based off of CPU count. (IE Warn at a load number equal to CPU count, Critical at a number equal to CPU count x 1.5)

Regards,

-- 
Bill Howe
user-851eeb93eef8@xymon.invalid
list Japheth Cleaver · Sun, 29 May 2016 23:42:43 -0700 ·
quoted from Bill Howe

On Sat, May 28, 2016 2:11 pm, Bill wrote:
Xymon'ers,

Is there any planned functionality to be able to dynamically set a xymon
client's LOAD alert settings based upon how many processors it has?

The current static defaults are not too helpful, and hand editing an
entry in /etc/xymon/analysis/*.cfg for every server just shouldn't have
to be done.

_*Ideally*_
It would be best if along with the "top" view that is reported by
clients, they also reported their CPU count (either with "nproc" or
"grep -c proc /proc/cpuinfo")

Then the CPU count could be shown on client's "cpu" service page. <=
Critical information when determining if load is a problem or not.

Since the count would then be reported to and available on the xymon
server, it could then be possible to set warnings and criticals based
off of CPU count. (IE Warn at a load number equal to CPU count, Critical
at a number equal to CPU count x 1.5)
Hi Bill,

It's definitely planned, but not quite in there yet. It'll likely need to
be an additional (distinct) RRD file with a separate set of (normalized)
thresholds.

The collection of number of processes for some OS's went in in
https://sourceforge.net/p/xymon/code/7707


HTH,
-jc
list Bill Howe · Mon, 30 May 2016 15:28:41 -0500 ·
JC,

Awesome, glad its on its way!

Is the nproc collection currently available in a xymon variable?

That way, it can be worked around with a server side cron for now.

Thank you,

Bill Howe
user-851eeb93eef8@xymon.invalid
quoted from Japheth Cleaver

On 05/30/2016 01:42 AM, J.C. Cleaver wrote:
On Sat, May 28, 2016 2:11 pm, Bill wrote:
Xymon'ers,

Is there any planned functionality to be able to dynamically set a xymon
client's LOAD alert settings based upon how many processors it has?

The current static defaults are not too helpful, and hand editing an
entry in /etc/xymon/analysis/*.cfg for every server just shouldn't have
to be done.

_*Ideally*_
It would be best if along with the "top" view that is reported by
clients, they also reported their CPU count (either with "nproc" or
"grep -c proc /proc/cpuinfo")

Then the CPU count could be shown on client's "cpu" service page. <=
Critical information when determining if load is a problem or not.

Since the count would then be reported to and available on the xymon
server, it could then be possible to set warnings and criticals based
off of CPU count. (IE Warn at a load number equal to CPU count, Critical
at a number equal to CPU count x 1.5)
Hi Bill,

It's definitely planned, but not quite in there yet. It'll likely need to
be an additional (distinct) RRD file with a separate set of (normalized)
thresholds.

The collection of number of processes for some OS's went in in
https://sourceforge.net/p/xymon/code/7707


HTH,
-jc
list Bill Howe · Tue, 7 Jun 2016 08:55:53 -0500 ·
FYI,

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.


   1. 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/)
   2. Install pre-req package: "bc"  (this allows bash string to floating
   point number conversion)
   3. Edit script in the "Customize Here" section:
      - Edit multipliers (number of procs * number for warning and critical
      CPU load thresholds)
      - Note the default for the auto load directory or change it.
   4. Create the auto load directory on the Xymon server (default:
   /etc/xymon/analysis.d/auto-cpuload.d)
   5. 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 )
   6. Setup the script to auto run via cron (-v is verbose output)
   - *Example*:
      - /etc/cron.daily/xymon-calc-cpuload.sh
      #!/bin/bash
      # Description: Execute xymon script to auto calculate cpu load from
      hostdata
      #########################

      /root/scripts/xymon_client_cpuload_calc.sh -v &>
      /root/scripts/xymon_client_cpuload_calc.log


Bill Howe
user-851eeb93eef8@xymon.invalid <http://www.linkedin.com/in/whowe>;
quoted from Bill Howe

On Mon, May 30, 2016 at 3:28 PM, Bill <user-851eeb93eef8@xymon.invalid> wrote:
JC,

Awesome, glad its on its way!

Is the nproc collection currently available in a xymon variable?

That way, it can be worked around with a server side cron for now.

Thank you,

Bill Howe
user-851eeb93eef8@xymon.invalid


On 05/30/2016 01:42 AM, J.C. Cleaver wrote:
On Sat, May 28, 2016 2:11 pm, Bill wrote:
Xymon'ers,

Is there any planned functionality to be able to dynamically set a xymon
client's LOAD alert settings based upon how many processors it has?

The current static defaults are not too helpful, and hand editing an
entry in /etc/xymon/analysis/*.cfg for every server just shouldn't have
to be done.

_*Ideally*_
It would be best if along with the "top" view that is reported by
clients, they also reported their CPU count (either with "nproc" or
"grep -c proc /proc/cpuinfo")

Then the CPU count could be shown on client's "cpu" service page. <=
Critical information when determining if load is a problem or not.

Since the count would then be reported to and available on the xymon
server, it could then be possible to set warnings and criticals based
off of CPU count. (IE Warn at a load number equal to CPU count, Critical
at a number equal to CPU count x 1.5)

Hi Bill,

It's definitely planned, but not quite in there yet. It'll likely need to
be an additional (distinct) RRD file with a separate set of (normalized)
thresholds.

The collection of number of processes for some OS's went in in
https://sourceforge.net/p/xymon/code/7707


HTH,
-jc

list Bill Howe · Tue, 21 Jun 2016 13:47:39 -0500 ·
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".

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)

The cron script works best when run from /etc/cron.hourly instead of daily,
in order to capture newly added systems faster.

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.


Bill Howe
user-851eeb93eef8@xymon.invalid <http://www.linkedin.com/in/whowe>;
quoted from Bill Howe

On Tue, Jun 7, 2016 at 8:55 AM, Bill Howe <user-851eeb93eef8@xymon.invalid> wrote:
FYI,

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.


   1. 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/)
   2. Install pre-req package: "bc"  (this allows bash string to floating
   point number conversion)
   3. Edit script in the "Customize Here" section:
      - Edit multipliers (number of procs * number for warning and
      critical CPU load thresholds)
      - Note the default for the auto load directory or change it.
   4. Create the auto load directory on the Xymon server (default:
   /etc/xymon/analysis.d/auto-cpuload.d)
   5. 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 )
   6. Setup the script to auto run via cron (-v is verbose output)
   - *Example*:
      - /etc/cron.daily/xymon-calc-cpuload.sh
      #!/bin/bash
      # Description: Execute xymon script to auto calculate cpu load from
      hostdata
      #########################

      /root/scripts/xymon_client_cpuload_calc.sh -v &>
      /root/scripts/xymon_client_cpuload_calc.log


Bill Howe
user-851eeb93eef8@xymon.invalid <http://www.linkedin.com/in/whowe>;

On Mon, May 30, 2016 at 3:28 PM, Bill <user-851eeb93eef8@xymon.invalid> wrote:
JC,

Awesome, glad its on its way!

Is the nproc collection currently available in a xymon variable?

That way, it can be worked around with a server side cron for now.

Thank you,

Bill Howe
user-851eeb93eef8@xymon.invalid


On 05/30/2016 01:42 AM, J.C. Cleaver wrote:
On Sat, May 28, 2016 2:11 pm, Bill wrote:
Xymon'ers,

Is there any planned functionality to be able to dynamically set a xymon
client's LOAD alert settings based upon how many processors it has?

The current static defaults are not too helpful, and hand editing an
entry in /etc/xymon/analysis/*.cfg for every server just shouldn't have
to be done.

_*Ideally*_
It would be best if along with the "top" view that is reported by
clients, they also reported their CPU count (either with "nproc" or
"grep -c proc /proc/cpuinfo")

Then the CPU count could be shown on client's "cpu" service page. <=
Critical information when determining if load is a problem or not.

Since the count would then be reported to and available on the xymon
server, it could then be possible to set warnings and criticals based
off of CPU count. (IE Warn at a load number equal to CPU count, Critical
at a number equal to CPU count x 1.5)

Hi Bill,

It's definitely planned, but not quite in there yet. It'll likely need to
be an additional (distinct) RRD file with a separate set of (normalized)
thresholds.

The collection of number of processes for some OS's went in in
https://sourceforge.net/p/xymon/code/7707


HTH,
-jc