linux_wiki:xymon_cpu_load_threshold_calc

This is an old revision of the document!


Xymon Cpu Load Threshold Calc

General Information

Posted to the Xymon Community at: https://wiki.xymonton.org/doku.php/monitors:cpu-load-calc

Calculate (and set) a Xymon client's cpu load thresholds, based off of the client's reported number of processors from the hostdata files.

This is mean to run on the Xymon Server periodically with cron.

It allows for far more useful load monitoring than arbitrarily setting a generic load or spending a lot of time editing config files for each system.

Checklist

  • Xymon server installed/configured
  • Xymon clients checking in

Installation

Installation instructions.

No client modifications required.

  1. Install the 'bc' package (allows bash string to floating point number conversion)
    1. Enterprise Linux 6/7
      yum install bc
  2. Create the cpu-load-calc.sh script somewhere such as: /root/scripts/cpu-load-calc.sh
    1. See source below for contents
    2. Edit the “Customize Here” section
      1. Edit multipliers if desired(number of procs * number for warning and critical CPU load thresholds)
  3. Create the auto load directory on the Xymon server
    1. Default: /etc/xymon/analysis.d/auto-cpuload.d
  4. Add the auto load directory to the Xymon main analysis.cfg file so it is included
    1. Default: “directory /etc/xymon/analysis.d/auto-cpuload.d” to /etc/xymon/analysis.cfg
  5. Set the default load in /etc/xymon/analysis.cfg to a super low warning level of “0.1” and a critical of something very high like “100.0”.
    1. 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)
  6. Setup the script to auto run via cron (-v is verbose output)
    1. Example
      /etc/cron.hourly/xymon-calc-cpuload.sh
      #!/bin/bash
      # Description: Execute xymon script to auto calculate cpu load from hostdata
       
      /root/scripts/cpu-load-calc.sh -v &> /root/scripts/cpu-load-calc.log

  • linux_wiki/xymon_cpu_load_threshold_calc.1480223208.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)