monitors:cpu-load-calc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
monitors:cpu-load-calc [2016/11/26 03:59] – created dozormonitors:cpu-load-calc [2016/12/28 15:48] – [Known Bugs and Issues] dozor
Line 11: Line 11:
 Calculate (and set) a Xymon client's cpu load thresholds, based off of the client's reported number of processors from the hostdata files.  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.+This is meant 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. 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.
Line 35: Line 35:
   - Add the auto load directory to the Xymon main analysis.cfg file so it is included   - 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     - Default: "directory /etc/xymon/analysis.d/auto-cpuload.d" to /etc/xymon/analysis.cfg
-  - 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".+  - 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, such as "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)     - 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)
   - Setup the script to auto run via cron (-v is verbose output)   - Setup the script to auto run via cron (-v is verbose output)
Line 132: Line 132:
   node_name=${1}   node_name=${1}
  
-  # Lie to Xymon that the node's cpu is yellow, forcing a hostdata snapshot+  # Lie to Xymon that the node's cpu is green, then yellow, forcing a hostdata snapshot 
 +  xymon 127.0.0.1 "status ${node_name}.cpu green $(date)"
   xymon 127.0.0.1 "status ${node_name}.cpu yellow $(date)"   xymon 127.0.0.1 "status ${node_name}.cpu yellow $(date)"
 } }
Line 227: Line 228:
 ===== Known Bugs and Issues ===== ===== Known Bugs and Issues =====
  
 +  * Enterprise Linux 5 does not report number of procs in hostdata. Those systems will need to be set manually in analysis.cfg files.
 ===== To Do ===== ===== To Do =====
  
Line 233: Line 235:
 ===== Changelog ===== ===== Changelog =====
  
 +  * **2016-12-28**
 +    * Added green status in force_hostdata function to improve refresh logic.
   * **2016-11-25**   * **2016-11-25**
     * Initial release - Moved all information from Xymon mailing lists to here.     * Initial release - Moved all information from Xymon mailing lists to here.
  
  • monitors/cpu-load-calc.txt
  • Last modified: 2018/05/22 15:05
  • by dozor