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\" ";
|
||||
?>
|
||||
19
nagios/pnp/check-cisco-fan.php
Executable file
19
nagios/pnp/check-cisco-fan.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$opt[1] = '--title ' . $NAGIOS_SERVICEDESC;
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"Total Sum Fan \" ";
|
||||
$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\" " ;
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"Fan Errors\" " ;
|
||||
$def[1] .= "LINE:var2#000000 " ;
|
||||
$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\" ";
|
||||
?>
|
||||
48
nagios/pnp/check-cisco-freeint.php
Executable file
48
nagios/pnp/check-cisco-freeint.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--title \"$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:var1#FFCC99:\"All Interfaces \" " ;
|
||||
$def[1] .= "LINE:var1#000000 " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"Sum Ethernet Interfaces \" " ;
|
||||
$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:var3#FF0000:\"Free Ethernet Interfaces\" " ;
|
||||
$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\" " ;
|
||||
|
||||
?>
|
||||
19
nagios/pnp/check-cisco-mem.php
Executable file
19
nagios/pnp/check-cisco-mem.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$opt[1] = '--title ' . $NAGIOS_SERVICEDESC;
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"Total Memory\" ";
|
||||
$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\" " ;
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"Used Memory\" " ;
|
||||
$def[1] .= "LINE:var2#000000 " ;
|
||||
$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\" ";
|
||||
?>
|
||||
19
nagios/pnp/check-cisco-module.php
Executable file
19
nagios/pnp/check-cisco-module.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$opt[1] = '--title ' . $NAGIOS_SERVICEDESC;
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"Total Sum Modules \" ";
|
||||
$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\" " ;
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"Modules Errors\" " ;
|
||||
$def[1] .= "LINE:var2#000000 " ;
|
||||
$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\" ";
|
||||
?>
|
||||
19
nagios/pnp/check-cisco-ps.php
Executable file
19
nagios/pnp/check-cisco-ps.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$opt[1] = '--title ' . $NAGIOS_SERVICEDESC;
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"Total Sum PS \" ";
|
||||
$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\" " ;
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"PS Errors\" " ;
|
||||
$def[1] .= "LINE:var2#000000 " ;
|
||||
$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\" ";
|
||||
?>
|
||||
37
nagios/pnp/check-cisco-totalbw.php
Executable file
37
nagios/pnp/check-cisco-totalbw.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--vertical-label bit --title \"$servicedesc\" --lower-limit 0 ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#00FF00:\"In \" " ;
|
||||
$def[1] .= "LINE:var1#000000 " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "LINE3:var2#0000FF:\"Out \" " ;
|
||||
$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\" " ;
|
||||
|
||||
?>
|
||||
33
nagios/pnp/check-juniper-vpn-load.php
Executable file
33
nagios/pnp/check-juniper-vpn-load.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\" --lower-limit 0 ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$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 15\" " ;
|
||||
$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 5 \" " ;
|
||||
$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 1 \" " ;
|
||||
$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\" ";
|
||||
?>
|
||||
55
nagios/pnp/check-juniper-vpn-mem.php
Executable file
55
nagios/pnp/check-juniper-vpn-mem.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--vertical-label Memory -l0 --title \"$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 " ;
|
||||
$def[1] .= "DEF:var4=$rrdfile:$DS[4]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var5=$rrdfile:$DS[5]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"$NAME[1] \" " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "LINE2:var2#00FF00:\"$NAME[2] \" " ;
|
||||
$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] .= "LINE2:var3#FF0000:\"$NAME[3] \" " ;
|
||||
$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] .= "LINE2:var4#0000FF:\"$NAME[4] \" " ;
|
||||
$def[1] .= "GPRINT:var4:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var4:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var4:MAX:\"%6.2lf max\\n\" " ;
|
||||
|
||||
$def[1] .= "LINE2:var5#FFFF00:\"$NAME[5] \" " ;
|
||||
$def[1] .= "GPRINT:var5:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var5:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var5:MAX:\"%6.2lf max\\n\" " ;
|
||||
|
||||
$def[$i] .= 'COMMENT:"Check Command ' . $TEMPLATE[$i] . '\r" ';
|
||||
?>
|
||||
39
nagios/pnp/check-juniper-vpn-swap.php
Executable file
39
nagios/pnp/check-juniper-vpn-swap.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--vertical-label Swap -l0 --title \"$servicedesc\" ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"$NAME[1] \" " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"$NAME[2] \" " ;
|
||||
$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[$i] .= 'COMMENT:"Check Command ' . $TEMPLATE[$i] . '\r" ';
|
||||
?>
|
||||
37
nagios/pnp/check-pineapp-inout.php
Executable file
37
nagios/pnp/check-pineapp-inout.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--vertical-label In/Out -l0 --title \"$servicedesc\" ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"$NAME[1] \" " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"$NAME[2] \" " ;
|
||||
$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[$i] .= 'COMMENT:"Check Command ' . $TEMPLATE[$i] . '\r" ';
|
||||
?>
|
||||
33
nagios/pnp/check-pineapp-load.php
Executable file
33
nagios/pnp/check-pineapp-load.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 15\" " ;
|
||||
$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 5 \" " ;
|
||||
$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 1 \" " ;
|
||||
$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\" ";
|
||||
?>
|
||||
49
nagios/pnp/check-pineapp-queue.php
Executable file
49
nagios/pnp/check-pineapp-queue.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--vertical-label Queue -l0 --title \"$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 " ;
|
||||
$def[1] .= "DEF:var4=$rrdfile:$DS[4]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:\"$NAME[1] \" " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "LINE2:var2#00FF00:\"$NAME[2] \" " ;
|
||||
$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] .= "LINE2:var3#FF0000:\"$NAME[3] \" " ;
|
||||
$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] .= "LINE2:var4#0000FF:\"$NAME[4] \" " ;
|
||||
$def[1] .= "GPRINT:var4:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var4:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var4:MAX:\"%6.2lf max\\n\" " ;
|
||||
|
||||
$def[$i] .= 'COMMENT:"Check Command ' . $TEMPLATE[$i] . '\r" ';
|
||||
?>
|
||||
66
nagios/pnp/check_cpus_linux.php
Executable file
66
nagios/pnp/check_cpus_linux.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
define("_WARNRULE", '#FFFF00');
|
||||
define("_CRITRULE", '#FF0000');
|
||||
define("_AREA", '#EACC00');
|
||||
define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$colors = array(
|
||||
'user' => '#00CC00',
|
||||
'nice' => '#000000',
|
||||
'sys' => '#6600FF',
|
||||
'system' => '#6600FF',
|
||||
'iowait' => '#FF0000',
|
||||
'irq' => '#663300',
|
||||
'soft' => '#FFFF00',
|
||||
'steal' => '#4596DD',
|
||||
'idle' => '#4557DD',
|
||||
'guest' => '#A445DD',
|
||||
'idle' => '#66FFCC',
|
||||
);
|
||||
|
||||
|
||||
$current = 0;
|
||||
$var = 0;
|
||||
|
||||
foreach ($DS as $i) {
|
||||
if($NAME[$i] == 'user' ) {
|
||||
$current = $i;
|
||||
$var = 1;
|
||||
$vlabel = "";
|
||||
if ($UNIT[$i] == "%%") {
|
||||
$vlabel = "%";
|
||||
}
|
||||
else {
|
||||
$vlabel = $UNIT[$i];
|
||||
}
|
||||
|
||||
$opt[$current] = '--lower-limit 0 --upper-limit 100 --vertical-label "' . $vlabel . '" --title "' . $hostname . ' / ' . $servicedesc . '"' . $lower;
|
||||
|
||||
$def[$current] = "DEF:var$var=$rrdfile:$DS[$i]:AVERAGE ";
|
||||
// $def[$current] .= "AREA:var$var" . _AREA . ":\"$NAME[$i] \" ";
|
||||
$def[$current] .= "LINE3:var$var" . $colors[$NAME[$i]] . ":\"$NAME[$i] \" ";
|
||||
$def[$current] .= "GPRINT:var$var:LAST:\"%3.4lf $UNIT[$i] LAST \" ";
|
||||
$def[$current] .= "GPRINT:var$var:MAX:\"%3.4lf $UNIT[$i] MAX \" ";
|
||||
$def[$current] .= "GPRINT:var$var:AVERAGE:\"%3.4lf $UNIT[$i] AVERAGE \\n\" ";
|
||||
} else {
|
||||
$var = $var + 1;
|
||||
$def[$current] .= "DEF:var$var=$rrdfile:$DS[$i]:AVERAGE ";
|
||||
$def[$current] .= "LINE3:var$var" . $colors[$NAME[$i]] . ":\"$NAME[$i] \" ";
|
||||
$def[$current] .= "GPRINT:var$var:LAST:\"%3.4lf $UNIT[$i] LAST \" ";
|
||||
$def[$current] .= "GPRINT:var$var:MAX:\"%3.4lf $UNIT[$i] MAX \" ";
|
||||
$def[$current] .= "GPRINT:var$var:AVERAGE:\"%3.4lf $UNIT[$i] AVERAGE \\n\" ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
19
nagios/pnp/check_flexlm_new.php
Executable file
19
nagios/pnp/check_flexlm_new.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$opt[1] = '--title ' . $NAGIOS_SERVICEDESC;
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:Total ";
|
||||
$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\" " ;
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"Used \" " ;
|
||||
$def[1] .= "LINE:var2#000000 " ;
|
||||
$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\" ";
|
||||
?>
|
||||
33
nagios/pnp/check_load_srv.php
Executable file
33
nagios/pnp/check_load_srv.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 15\" " ;
|
||||
$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 5 \" " ;
|
||||
$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 1 \" " ;
|
||||
$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\" ";
|
||||
?>
|
||||
30
nagios/pnp/perf-ghs-float.php
Executable file
30
nagios/pnp/perf-ghs-float.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
$opt[1] = '--title ' . $NAGIOS_SERVICEDESC . '" Usage"';
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var1#FFCC99:Total ";
|
||||
$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\" " ;
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$def[1] .= "AREA:var2#00FF00:\"Used \" " ;
|
||||
$def[1] .= "LINE:var2#000000 " ;
|
||||
$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\" ";
|
||||
|
||||
$opt[2] = '--title ' . $NAGIOS_SERVICEDESC . '" Missed Users"';
|
||||
|
||||
$def[2] = "DEF:var3=$rrdfile:$DS[3]:AVERAGE " ;
|
||||
|
||||
$def[2] .= "AREA:var3#00FF00:missed_users ";
|
||||
$def[2] .= "LINE:var3#000000 " ;
|
||||
$def[2] .= "GPRINT:var3:LAST:\"%6.2lf last\" " ;
|
||||
$def[2] .= "GPRINT:var3:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[2] .= "GPRINT:var3:MAX:\"%6.2lf max\\n\" " ;
|
||||
$def[2] .= 'COMMENT:"Check Command ' . $TEMPLATE[2] . '\r" ';
|
||||
?>
|
||||
67
nagios/pnp/perf-sge-cjs.php
Executable file
67
nagios/pnp/perf-sge-cjs.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
// define("_WARNRULE", '#FFFF00');
|
||||
// define("_CRITRULE", '#FF0000');
|
||||
// define("_AREA", '#EACC00');
|
||||
// define("_LINE", '#000000');
|
||||
#
|
||||
# Initial Logic ...
|
||||
#
|
||||
|
||||
$opt[1] = "--vertical-label Load -l0 --title \"$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 " ;
|
||||
$def[1] .= "DEF:var4=$rrdfile:$DS[4]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var5=$rrdfile:$DS[5]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var6=$rrdfile:$DS[6]:AVERAGE " ;
|
||||
// if ($WARN[1] != "") {
|
||||
// $def[1] .= "HRULE:$WARN[1]#FFFF00 ";
|
||||
// }
|
||||
// if ($CRIT[1] != "") {
|
||||
// $def[1] .= "HRULE:$CRIT[1]#FF0000 ";
|
||||
// }
|
||||
$def[1] .= "AREA:var1#FFCC99:\"All Jobs \" " ;
|
||||
$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\" ";
|
||||
|
||||
$def[1] .= "LINE3:var2#00FF00:\"Running \" " ;
|
||||
$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] .= "LINE3:var3#FF0000:\"Queue Waiting\" " ;
|
||||
$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] .= "LINE3:var4#0000FF:\"Error Queue Waiting\" " ;
|
||||
$def[1] .= "GPRINT:var4:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var4:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var4:MAX:\"%6.2lf max\\n\" " ;
|
||||
|
||||
$def[1] .= "LINE3:var5#FFFF00:\"Transfering\" " ;
|
||||
$def[1] .= "GPRINT:var5:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var5:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var5:MAX:\"%6.2lf max\\n\" " ;
|
||||
|
||||
$def[1] .= "LINE3:var6#FF00FF:\"Others\" " ;
|
||||
$def[1] .= "GPRINT:var6:LAST:\"%6.2lf last\" " ;
|
||||
$def[1] .= "GPRINT:var6:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[1] .= "GPRINT:var6:MAX:\"%6.2lf max\\n\" " ;
|
||||
|
||||
$def[$i] .= 'COMMENT:"perf-sge-cjs Template\r" ';
|
||||
$def[$i] .= 'COMMENT:"Check Command ' . $TEMPLATE[$i] . '\r" ';
|
||||
?>
|
||||
43
nagios/pnp/perf-sge-qjs.php
Executable file
43
nagios/pnp/perf-sge-qjs.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Default Template used if no other template is found.
|
||||
# Don`t delete this file !
|
||||
# $Id: default.php 555 2008-11-16 16:35:59Z pitchfork $
|
||||
#
|
||||
#
|
||||
# Define some colors ..
|
||||
#
|
||||
|
||||
$queue_temp = explode("_", $NAME[1]);
|
||||
$queue = "$queue_temp[0]";
|
||||
|
||||
$opt[1] = '--vertical-label "' . $vlabel . '" --title "' . $queue . ' Usage"' . $lower;
|
||||
|
||||
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
|
||||
|
||||
$def[1] .= "AREA:var2#FFCC99:\"Total \" " ;
|
||||
$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#00FF00:Used ";
|
||||
$def[1] .= "LINE:var1#000000 " ;
|
||||
$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\" " ;
|
||||
|
||||
$def[1] .= 'COMMENT:"Default Template\r" ';
|
||||
$def[1] .= 'COMMENT:"Check Command ' . $TEMPLATE[1] . '\r" ';
|
||||
|
||||
$opt[2] = '--vertical-label "' . $vlabel . '" --title "' . $queue . ' Job Average Waiting Time"' . $lower;
|
||||
$def[2] = "DEF:var3=$rrdfile:$DS[3]:AVERAGE " ;
|
||||
$def[2] .= "AREA:var3#00FF00:seconds ";
|
||||
$def[2] .= "LINE:var3#000000 " ;
|
||||
$def[2] .= "GPRINT:var3:LAST:\"%6.2lf last\" " ;
|
||||
$def[2] .= "GPRINT:var3:AVERAGE:\"%6.2lf avg\" " ;
|
||||
$def[2] .= "GPRINT:var3:MAX:\"%6.2lf max\\n\" " ;
|
||||
$def[2] .= 'COMMENT:"Check Command ' . $TEMPLATE[2] . '\r" ';
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user