mirror of
https://github.com/ranl/monitor-utils.git
synced 2026-02-05 22:55:17 +01:00
splitting IT project
This commit is contained in:
33
nagios/pnp/check-cisco-cpu.php
Executable file
33
nagios/pnp/check-cisco-cpu.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Plugin: check_load
|
||||
# $Id: check_load.php 627 2009-04-23 11:14:06Z pitchfork $
|
||||
#
|
||||
#
|
||||
$opt[1] = "--vertical-label Load -l0 --title \"CPU Load for $hostname / $servicedesc\" ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var3=$rrdfile:$DS[3]:AVERAGE " ;
|
||||
if ($WARN[1] != "") {
|
||||
$def[1] .= "HRULE:$WARN[1]#FFFF00 ";
|
||||
}
|
||||
if ($CRIT[1] != "") {
|
||||
$def[1] .= "HRULE:$CRIT[1]#FF0000 ";
|
||||
}
|
||||
$def[1] .= "AREA:var3#FF0000:\"Load 5m\" " ;
|
||||
$def[1] .= "GPRINT:var3:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var3:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var3:MAX:\"%6.2lf max\\n\" " ;
|
||||
$def[1] .= "AREA:var2#EA8F00:\"Load 1m \" " ;
|
||||
$def[1] .= "GPRINT:var2:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var2:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var2:MAX:\"%6.2lf max\\n\" " ;
|
||||
$def[1] .= "AREA:var1#EACC00:\"load 5s \" " ;
|
||||
$def[1] .= "GPRINT:var1:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var1:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var1:MAX:\"%6.2lf max\\n\" ";
|
||||
?>
|
||||
Reference in New Issue
Block a user