New upstream version 0.6.27
This commit is contained in:
48
share/pnp/documents/templates/alerter.html
Normal file
48
share/pnp/documents/templates/alerter.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<html><head><title>alerter.php</title></head><body>
|
||||
<h2>alerter.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2010 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Plugin: check_icmp [Multigraph]
|
||||
#
|
||||
# RTA
|
||||
#
|
||||
$ds_name[1] = "Round Trip Times";
|
||||
$opt[1] = "--lower=0 --vertical-label \"RTA\" --title \"Ping times\" ";
|
||||
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ;
|
||||
$def[1] .= rrd::alerter("var1","Round Trip Times", $WARN[1], $CRIT[1], "FF", $UNIT[1],"#00ff00","#ff8c00","#ff0000") ;
|
||||
$def[1] .= rrd::gprint("var1", array("LAST", "MAX", "AVERAGE"), "%6.2lf $UNIT[1]") ;
|
||||
|
||||
if($WARN[1] != ""){
|
||||
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
|
||||
$def[1] .= rrd::hrule($WARN[1], "#FF8c00", "Warning ".$WARN[1].$UNIT[1]."\\n");
|
||||
}
|
||||
if($CRIT[1] != ""){
|
||||
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
|
||||
$def[1] .= rrd::hrule($CRIT[1], "#FF0000", "Critical ".$CRIT[1].$UNIT[1]."\\n");
|
||||
}
|
||||
|
||||
#
|
||||
# Packets Lost
|
||||
$ds_name[2] = "Packets Lost";
|
||||
$opt[2] = "--vertical-label \"Packets lost\" -l0 -u105 --title \"Packets lost\" ";
|
||||
|
||||
$def[2] = rrd::def("var1", $RRDFILE[2], $DS[2], "AVERAGE");
|
||||
$def[2] .= rrd::alerter("var1","Packet loss", $WARN[2], $CRIT[2], "FF", $UNIT[2],"#00ff00","#ff8c00","#ff0000") ;
|
||||
$def[2] .= rrd::gprint("var1", array("LAST", "MAX", "AVERAGE"), "%3.0lf $UNIT[2]") ;
|
||||
|
||||
$def[2] .= rrd::hrule("100", "#000000", ":dashes") ;
|
||||
|
||||
if($WARN[2] != ""){
|
||||
if($UNIT[2] == "%%"){ $UNIT[2] = "%"; };
|
||||
$def[2] .= rrd::hrule($WARN[2], "#FF8c00", "Warning ".$WARN[2].$UNIT[2]."\\n");
|
||||
}
|
||||
if($CRIT[2] != ""){
|
||||
if($UNIT[2] == "%%"){ $UNIT[2] = "%"; };
|
||||
$def[2] .= rrd::hrule($CRIT[2], "#FF0000", "Critical ".$CRIT[2].$UNIT[2]."\\n");
|
||||
}
|
||||
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
49
share/pnp/documents/templates/check_apachestatus.html
Normal file
49
share/pnp/documents/templates/check_apachestatus.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<html><head><title>check_apachestatus.php</title></head><body>
|
||||
<h2>check_apachestatus.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
|
||||
$opt[1] = "-T 55 -l 0 --vertical-label \"Apache Stats\" --title \"Apache Statistics\" ";
|
||||
$ds_name[1] = "Thread Statistics";
|
||||
$def[1] = "";
|
||||
|
||||
$colors = array(
|
||||
'wait' => '#DD8E45',
|
||||
'starting' => '#DDAF45',
|
||||
'read' => '#D0DD45',
|
||||
'write' => '#DD457C',
|
||||
'keep' => '#45DD99',
|
||||
'dns' => '#45C5DD',
|
||||
'close' => '#4596DD',
|
||||
'logging' => '#4557DD',
|
||||
'grace' => '#A445DD',
|
||||
'idle' => '#DD45D8',
|
||||
);
|
||||
|
||||
$def[1] = "DEF:var12=$rrdfile:$DS[12]:AVERAGE " ;
|
||||
$def[1] .= "LINE1:var12#00000080: " ;
|
||||
$def[1] .= "AREA:var12#00FF6680:\"slots\t\" " ;
|
||||
$def[1] .= "GPRINT:var12:AVERAGE:\"%.0lf Average\" ";
|
||||
$def[1] .= "GPRINT:var12:MAX:\"%.0lf Max\" ";
|
||||
$def[1] .= "GPRINT:var12:LAST:\"%.0lf Last\\n\" ";
|
||||
|
||||
$keys = array(4,3,2,5,6,7,8,9,10,11);
|
||||
foreach( $keys as $key){
|
||||
$def[1] .= "DEF:var$key=$rrdfile:$DS[$key]:AVERAGE " ;
|
||||
$def[1] .= "STACK:var$key".$colors[$NAME[$key]].":\"$NAME[$key]\t\" " ;
|
||||
$def[1] .= "GPRINT:var$key:AVERAGE:\"%.0lf Average\" ";
|
||||
$def[1] .= "GPRINT:var$key:MAX:\"%.0lf Max\" ";
|
||||
$def[1] .= "GPRINT:var$key:LAST:\"%.0lf Last\\n\" ";
|
||||
}
|
||||
|
||||
$opt[2] = "-l 0 --vertical-label \"Apache Requests\" --title \"Server $hostname\" ";
|
||||
$ds_name[2] = "Request per Second";
|
||||
$def[2] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
|
||||
$def[2] .= "LINE1:var1#000000:\"Requests per Second\" " ;
|
||||
$def[2] .= "GPRINT:var1:AVERAGE:\"%.2lf Average\" ";
|
||||
$def[2] .= "GPRINT:var1:MAX:\"%.2lf Max\" ";
|
||||
$def[2] .= "GPRINT:var1:LAST:\"%.2lf Last\\n\" ";
|
||||
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
60
share/pnp/documents/templates/check_cpu.html
Normal file
60
share/pnp/documents/templates/check_cpu.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<html><head><title>check_cpu.php</title></head><body>
|
||||
<h2>check_cpu.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2010 Yannig Perre (http://lesaventuresdeyannigdanslemondeit.blogspot.com)
|
||||
# Plugin: check_cpu
|
||||
#
|
||||
$ds_name[1] = "CPU activity";
|
||||
|
||||
$opt[1] = "--upper-limit 100 --vertical-label CPU -l0 --title \"CPU activity on $hostname\" ";
|
||||
|
||||
$trend_array = array(
|
||||
"one_month" => array(strtotime("-1 month", $this->TIMERANGE['end']), $this->TIMERANGE['end'], "1 month trend:dashes=10", "#FF007F", "line3"),
|
||||
"global_trend" => array($this->TIMERANGE['start'], $this->TIMERANGE['end'], "Global trend\\n:dashes=20", "#707070", "line2"),
|
||||
);
|
||||
|
||||
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1]);
|
||||
$def[1] .= rrd::def("var2", $RRDFILE[2], $DS[2]);
|
||||
$def[1] .= rrd::cdef("user", "var2,var1,+");
|
||||
$def[1] .= rrd::def("var3", $RRDFILE[3], $DS[3]);
|
||||
$def[1] .= rrd::cdef("io", "var3,var2,+,var1,+");
|
||||
|
||||
$trends_graphic = "";
|
||||
|
||||
foreach(array_keys($trend_array) as $trend) {
|
||||
$def[1] .= rrd::def("var1$trend", $RRDFILE[1], $DS[1], "AVERAGE:start=".$trend_array[$trend][0]);
|
||||
$def[1] .= rrd::def("var2$trend", $RRDFILE[2], $DS[2], "AVERAGE:start=".$trend_array[$trend][0]);
|
||||
$def[1] .= rrd::cdef("user$trend", "var2$trend,var1$trend,+");
|
||||
|
||||
$def[1] .= rrd::vdef("dtrend$trend", "user$trend,LSLSLOPE");
|
||||
$def[1] .= rrd::vdef("htrend$trend", "user$trend,LSLINT");
|
||||
$def[1] .= rrd::cdef("curve_user$trend", "user$trend,POP,dtrend$trend,COUNT,*,htrend$trend,+");
|
||||
$trends_graphic .= rrd::$trend_array[$trend][4]("curve_user$trend", $trend_array[$trend][3], $trend_array[$trend][2]);
|
||||
}
|
||||
|
||||
if ($WARN[1] != "") { $def[1] .= rrd::hrule($WARN[1], "#FFFF00"); }
|
||||
if ($CRIT[1] != "") { $def[1] .= rrd::hrule($CRIT[1], "#FF0000"); }
|
||||
|
||||
$def[1] .= rrd::area("io", "#00FF00", "iowait");
|
||||
$def[1] .= rrd::gprint("var3", "LAST", "%6.2lf");
|
||||
$def[1] .= rrd::gprint("var3", "AVERAGE", "avg %6.2lf");
|
||||
$def[1] .= rrd::gprint("var3", "MAX", "max %6.2lf\\n");
|
||||
$def[1] .= rrd::area("user", "#005CFF", "user ");
|
||||
$def[1] .= rrd::gprint("var1", "LAST", "%6.2lf");
|
||||
$def[1] .= rrd::gprint("var1", "AVERAGE", "avg %6.2lf");
|
||||
$def[1] .= rrd::gprint("var1", "MAX", "max %6.2lf\\n");
|
||||
$def[1] .= rrd::area("var2", "#FF5C00", "sys ");
|
||||
$def[1] .= rrd::gprint("var2", "LAST", "%6.2lf");
|
||||
$def[1] .= rrd::gprint("var2", "AVERAGE", "avg %6.2lf");
|
||||
$def[1] .= rrd::gprint("var2", "MAX", "max %6.2lf\\n");
|
||||
$def[1] .= rrd::line1("io", "#000000");
|
||||
$def[1] .= rrd::line1("user", "#000000", "Total");
|
||||
$def[1] .= rrd::gprint("user", "LAST", " %6.2lf");
|
||||
$def[1] .= rrd::gprint("user", "AVERAGE", "moy %6.2lf");
|
||||
$def[1] .= rrd::gprint("user", "MAX", "max %6.2lf\\n");
|
||||
$def[1] .= rrd::line1("var2", "#000000");
|
||||
$def[1] .= $trends_graphic;
|
||||
?>
|
||||
</file></code></pre></body></html>
|
||||
62
share/pnp/documents/templates/check_http.html
Normal file
62
share/pnp/documents/templates/check_http.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<html><head><title>check_http.php</title></head><body>
|
||||
<h2>check_http.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Plugin: check_http_response
|
||||
# $Id: check_http.php 367 2008-01-23 18:10:31Z pitchfork $
|
||||
# Modified by Romuald FRONTEAU
|
||||
#
|
||||
# Response Time
|
||||
#
|
||||
$opt[1] = "--vertical-label \"$UNIT[1]\" --title \"Temps de reponse - $hostname / $servicedesc\" --slope-mode --color=BACK#000000 --color=FONT#F7F7F7 --color=SHADEA#ffffff --color=SHADEB#ffffff --color=CANVAS#000000 --color=GRID#00991A --color=MGRID#00991A --color=ARROW#FF0000 ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ;
|
||||
$def[1] .= "VDEF:slope=var1,LSLSLOPE " ;
|
||||
$def[1] .= "VDEF:int=var1,LSLINT " ;
|
||||
$def[1] .= "CDEF:proj=var1,POP,slope,COUNT,*,int,+ " ;
|
||||
$def[1] .= "LINE2:proj#ff00ff:\"Projection \" " ;
|
||||
$def[1] .= "GPRINT:var1:LAST:\"%6.2lf$UNIT[1] last\" " ;
|
||||
$def[1] .= "GPRINT:var1:AVERAGE:\"%6.2lf$UNIT[1] avg\" " ;
|
||||
$def[1] .= "GPRINT:var1:MAX:\"%6.2lf$UNIT[1] max\\n\" ";
|
||||
$def[1] .= "CDEF:sp1=var1,100,/,10,* " ;
|
||||
$def[1] .= "CDEF:sp2=var1,100,/,20,* " ;
|
||||
$def[1] .= "CDEF:sp3=var1,100,/,30,* " ;
|
||||
$def[1] .= "CDEF:sp4=var1,100,/,40,* " ;
|
||||
$def[1] .= "CDEF:sp5=var1,100,/,50,* " ;
|
||||
$def[1] .= "CDEF:sp6=var1,100,/,60,* " ;
|
||||
$def[1] .= "CDEF:sp7=var1,100,/,70,* " ;
|
||||
$def[1] .= "CDEF:sp8=var1,100,/,80,* " ;
|
||||
$def[1] .= "CDEF:sp9=var1,100,/,90,* " ;
|
||||
|
||||
|
||||
$def[1] .= "AREA:var1#0000A0:\"$NAME[1] \" " ;
|
||||
$def[1] .= "AREA:sp9#0000A0: " ;
|
||||
$def[1] .= "AREA:sp8#0000C0: " ;
|
||||
$def[1] .= "AREA:sp7#0010F0: " ;
|
||||
$def[1] .= "AREA:sp6#0040F0: " ;
|
||||
$def[1] .= "AREA:sp5#0070F0: " ;
|
||||
$def[1] .= "AREA:sp4#00A0F0: " ;
|
||||
$def[1] .= "AREA:sp3#00D0F0: " ;
|
||||
$def[1] .= "AREA:sp2#A0F0F0: " ;
|
||||
$def[1] .= "AREA:sp1#F0F0F0: " ;
|
||||
|
||||
#
|
||||
# Filesize
|
||||
#
|
||||
$opt[2] = "--vertical-label \"$UNIT[2]\" --title \"Size $hostname / $servicedesc\" ";
|
||||
#
|
||||
#
|
||||
#
|
||||
$def[2] = "DEF:var1=$RRDFILE[2]:$DS[2]:AVERAGE " ;
|
||||
$def[2] .= "AREA:var1#00FFFF:\"$NAME[2] \" " ;
|
||||
$def[2] .= "LINE1:var1#000000 " ;
|
||||
$def[2] .= "GPRINT:var1:LAST:\"%6.2lf$UNIT[2] last\" " ;
|
||||
$def[2] .= "GPRINT:var1:AVERAGE:\"%6.2lf$UNIT[2] avg\" " ;
|
||||
$def[2] .= "GPRINT:var1:MAX:\"%6.2lf$UNIT[2] max\\n\" ";
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
72
share/pnp/documents/templates/check_mk-cpu.loads.html
Normal file
72
share/pnp/documents/templates/check_mk-cpu.loads.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<html><head><title>check_mk-cpu.loads.php</title></head><body>
|
||||
<h2>check_mk-cpu.loads.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||
# | |
|
||||
# | Copyright Mathias Kettner 2009 mk@mathias-kettner.de |
|
||||
# +------------------------------------------------------------------+
|
||||
#
|
||||
# This file is part of Check_MK.
|
||||
# The official homepage is at http://mathias-kettner.de/check_mk.
|
||||
#
|
||||
# check_mk is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation in version 2. check_mk is distributed
|
||||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
|
||||
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more de-
|
||||
# ails. You should have received a copy of the GNU General Public
|
||||
# License along with GNU Make; see the file COPYING. If not, write
|
||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301 USA.
|
||||
|
||||
# Modified by Romuald FRONTEAU
|
||||
|
||||
$opt[1] = "--vertical-label Load --title \"CPU Load pour $hostname / $servicedesc\" --color=BACK#000000 --color=FONT#F7F7F7 --color=SHADEA#ffffff --color=SHADEB#ffffff --color=CANVAS#000000 --color=GRID#00991A --color=MGRID#00991A --color=ARROW#FF0000 ";
|
||||
|
||||
$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] .= "AREA:var1#F8D605:\"1 min \" " ;
|
||||
$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] .= "CDEF:sp1=var2,100,/,10,* " ;
|
||||
$def[1] .= "CDEF:sp2=var2,100,/,20,* " ;
|
||||
$def[1] .= "CDEF:sp3=var2,100,/,30,* " ;
|
||||
$def[1] .= "CDEF:sp4=var2,100,/,40,* " ;
|
||||
$def[1] .= "CDEF:sp5=var2,100,/,50,* " ;
|
||||
$def[1] .= "CDEF:sp6=var2,100,/,60,* " ;
|
||||
$def[1] .= "CDEF:sp7=var2,100,/,70,* " ;
|
||||
$def[1] .= "CDEF:sp8=var2,100,/,80,* " ;
|
||||
$def[1] .= "CDEF:sp9=var2,100,/,90,* " ;
|
||||
|
||||
$def[1] .= "AREA:var2#F85B05:\"5 min \" ";
|
||||
$def[1] .= "AREA:sp9#F85B05: " ;
|
||||
$def[1] .= "AREA:sp8#FB7328: " ;
|
||||
$def[1] .= "AREA:sp7#FD8645: " ;
|
||||
$def[1] .= "AREA:sp6#FD9862: " ;
|
||||
$def[1] .= "AREA:sp5#FDA97D: " ;
|
||||
$def[1] .= "AREA:sp4#C5D760: " ;
|
||||
$def[1] .= "AREA:sp3#FBBE9E: " ;
|
||||
$def[1] .= "AREA:sp2#FFD9C5: " ;
|
||||
$def[1] .= "AREA:sp1#FFFFFF: " ;
|
||||
|
||||
$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#FC2505:\"15 min \" " ;
|
||||
$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\" " ;
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
83
share/pnp/documents/templates/check_mk-df.html
Normal file
83
share/pnp/documents/templates/check_mk-df.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<html><head><title>check_mk-df.php</title></head><body>
|
||||
<h2>check_mk-df.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||
# | |
|
||||
# | Copyright Mathias Kettner 2009 mk@mathias-kettner.de |
|
||||
# +------------------------------------------------------------------+
|
||||
#
|
||||
# This file is part of Check_MK.
|
||||
# The official homepage is at http://mathias-kettner.de/check_mk.
|
||||
#
|
||||
# check_mk is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation in version 2. check_mk is distributed
|
||||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
|
||||
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more de-
|
||||
# ails. You should have received a copy of the GNU General Public
|
||||
# License along with GNU Make; see the file COPYING. If not, write
|
||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301 USA.
|
||||
|
||||
# Modified by Romuald FRONTEAU
|
||||
|
||||
# RRDtool Options
|
||||
#$servicedes=$NAGIOS_SERVICEDESC
|
||||
|
||||
$fsname = str_replace("_", "/", substr($servicedesc, 3));
|
||||
$fstitle = $fsname;
|
||||
|
||||
# Hack for windows: replace C// with C:\
|
||||
if (strlen($fsname) == 3 && substr($fsname, 1, 2) == '//') {
|
||||
$fsname = $fsname[0] . "\:\\\\";
|
||||
$fstitle = $fsname[0] . ":\\";
|
||||
}
|
||||
|
||||
$sizegb = sprintf("%.1f", $MAX[1] / 1024.0);
|
||||
$opt[1] = "--vertical-label Pourcentage --slope-mode -l 0 -u 100 --title '$hostname: Filesystem $fstitle (Total --> $sizegb GB)' ";
|
||||
#
|
||||
#
|
||||
# Graphen Definitions
|
||||
$def[1] = "DEF:fs=$rrdfile:$DS[1]:MAX ";
|
||||
$def[1] .= "CDEF:var1=fs,$MAX[1],/,100,* ";
|
||||
|
||||
$def[1] .= "CDEF:sp1=var1,100,/,10,* " ;
|
||||
$def[1] .= "CDEF:sp2=var1,100,/,20,* " ;
|
||||
$def[1] .= "CDEF:sp3=var1,100,/,30,* " ;
|
||||
$def[1] .= "CDEF:sp4=var1,100,/,40,* " ;
|
||||
$def[1] .= "CDEF:sp5=var1,100,/,50,* " ;
|
||||
$def[1] .= "CDEF:sp6=var1,100,/,60,* " ;
|
||||
$def[1] .= "CDEF:sp7=var1,100,/,70,* " ;
|
||||
$def[1] .= "CDEF:sp8=var1,100,/,80,* " ;
|
||||
$def[1] .= "CDEF:sp9=var1,100,/,90,* " ;
|
||||
|
||||
$def[1] .= "VDEF:slope=var1,LSLSLOPE " ;
|
||||
$def[1] .= "VDEF:int=var1,LSLINT " ;
|
||||
$def[1] .= "CDEF:proj=var1,POP,slope,COUNT,*,int,+ " ;
|
||||
|
||||
$def[1] .= "AREA:var1#84C21F:\"% utilise sur $fsname\" ";
|
||||
$def[1] .= "AREA:sp9#84C21F: " ;
|
||||
$def[1] .= "AREA:sp8#8CC427: " ;
|
||||
$def[1] .= "AREA:sp7#9CCA37: " ;
|
||||
$def[1] .= "AREA:sp6#A5CD3F: " ;
|
||||
$def[1] .= "AREA:sp5#B4D14F: " ;
|
||||
$def[1] .= "AREA:sp4#C5D760: " ;
|
||||
$def[1] .= "AREA:sp3#D5DC70: " ;
|
||||
$def[1] .= "AREA:sp2#E6E280: " ;
|
||||
$def[1] .= "AREA:sp1#F6E790: " ;
|
||||
|
||||
$def[1] .= "LINE1:var1#226600: ";
|
||||
$def[1] .= "GPRINT:var1:LAST:\"current\: %6.2lf %%\" ";
|
||||
$def[1] .= "GPRINT:var1:MAX:\"max\: %6.2lf %%\" ";
|
||||
$def[1] .= "GPRINT:var1:AVERAGE:\"avg\: %6.2lf %%\\n\" ";
|
||||
$def[1] .= "LINE2:proj#F83F05:\"Projection \" " ;
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<html><head><title>check_oracle_health_tablespace-usage.php</title></head><body>
|
||||
<h2>check_oracle_health_tablespace-usage.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Colors are simply doubled, because some DB have ridiculous count of performancedata. It should be o.k. in
|
||||
# the graphs though
|
||||
$colors=array("CC3300","CC3333","CC3366","CC3399","CC33CC","CC33FF","336600","336633","336666","336699","3366CC","3366FF","33CC33","33CC66","609978","922A99","997D6D","174099","1E9920","E88854","AFC5E8","57FA44","FA6FF6","008080","D77038","272B26","70E0D9","0A19EB","E5E29D","930526","26FF4A","ABC2FF","E2A3FF","808000","000000","00FAFA","E5FA79","F8A6FF","FF36CA","B8FFE7","CD36FF",
|
||||
"CC3300","CC3333","CC3366","CC3399","CC33CC","CC33FF","336600","336633","336666","336699","3366CC","3366FF","33CC33","33CC66","609978","922A99","997D6D","174099","1E9920","E88854","AFC5E8","57FA44","FA6FF6","008080","D77038","272B26","70E0D9","0A19EB","E5E29D","930526","26FF4A","ABC2FF","E2A3FF","808000","000000","00FAFA","E5FA79","F8A6FF"
|
||||
);
|
||||
|
||||
foreach($DS as $i => $VAL){
|
||||
# Graph for tablespace percentage
|
||||
if(preg_match('/^tbs_.*_usage_pct$/',$NAME[$i], $matches)){
|
||||
$ds_name[1] = "TBS usage %";
|
||||
$short_name = $matches[0];
|
||||
$short_name = substr($short_name, 4,-10);
|
||||
$opt[1] = "--vertical-label \"TBS usage %\" -u102 -X0 -l0 --title \"Tablespace usage percent $servicedesc\" ";
|
||||
if(!isset($def[1])){
|
||||
$def[1] = "";
|
||||
}
|
||||
$def[1] .= "DEF:var$i=$RRDFILE[$i]:$DS[$i]:AVERAGE " ;
|
||||
$def[1] .= "LINE:var$i#".$colors[$i].":\"$short_name\" " ;
|
||||
$def[1] .= "GPRINT:var$i:LAST:\"%6.0lf PERC LAST \" ";
|
||||
$def[1] .= "GPRINT:var$i:MAX:\"%6.0lf PERC MAX \" ";
|
||||
$def[1] .= "GPRINT:var$i:AVERAGE:\"%6.2lf PERC AVERAGE \\n\" ";
|
||||
}
|
||||
|
||||
# Graph for tablespace size
|
||||
if(preg_match('/^tbs_.*_usage$/',$NAME[$i], $matches)){
|
||||
$ds_name[2] = "TBS usage MB/GB";
|
||||
$short_name = $matches[0];
|
||||
$short_name = substr($short_name, 4,-6);
|
||||
$opt[2] = " -X 0 --vertical-label \"TBS usage MB/GB\" --title \"Tablespace usage MB/GB $servicedesc\" ";
|
||||
if(!isset($def[2])){
|
||||
$def[2] = "";
|
||||
}
|
||||
$def[2] .= "DEF:var$i=$RRDFILE[$i]:$DS[$i]:AVERAGE " ;
|
||||
$def[2] .= "LINE:var$i#".$colors[$i].":\"$short_name\" " ;
|
||||
$def[2] .= "GPRINT:var$i:LAST:\"%6.0lf $UNIT[$i] LAST \" ";
|
||||
$def[2] .= "GPRINT:var$i:MAX:\"%6.0lf $UNIT[$i] MAX \" ";
|
||||
$def[2] .= "GPRINT:var$i:AVERAGE:\"%6.2lf $UNIT[$i] AVERAGE \\n\" ";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
90
share/pnp/documents/templates/check_wlsagent.html
Normal file
90
share/pnp/documents/templates/check_wlsagent.html
Normal file
@@ -0,0 +1,90 @@
|
||||
<html><head><title>check_wlsagent.php</title></head><body>
|
||||
<h2>check_wlsagent.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
|
||||
$ds_name[0] = "Heap usage / ".$servicedesc." ($hostname)";
|
||||
|
||||
$opt[0] = "--vertical-label \"Heap usage (MB)\" -l 0 --title \"".$ds_name[0]."\" ";
|
||||
|
||||
# Memory definition
|
||||
$def[0] = rrd::def("heapsize", $RRDFILE[1], $DS[1]);
|
||||
$def[0] .= rrd::def("usedmemory", $RRDFILE[2], $DS[2]);
|
||||
$def[0] .= rrd::gradient("heapsize", "#ffffff", "#cceeee");
|
||||
$def[0] .= rrd::line1("heapsize", "#ddcccc");
|
||||
$def[0] .= rrd::gradient("usedmemory", "#ffffff", "#33cccc", 'Used memory');
|
||||
$def[0] .= rrd::line1("usedmemory", "#339999");
|
||||
$def[0] .= rrd::gprint("usedmemory", "LAST", "last %4.lf");
|
||||
$def[0] .= rrd::gprint("usedmemory", "MAX", "max %4.lf");
|
||||
$def[0] .= rrd::gprint("usedmemory", "AVERAGE", "average %4.2lf");
|
||||
|
||||
$next_def = 1;
|
||||
for($i = 2; $i < count($this->DS, 2); $i++) {
|
||||
$label = $this->DS[$i]["LABEL"];
|
||||
if(preg_match("/^ThreadPoolSize$/", $label, $tmp)) {
|
||||
$source = "ThreadPoolSize";
|
||||
$label = "Thread pool / $servicedesc ($hostname)";
|
||||
$ds_name[$next_def] = $label;
|
||||
$opt[$next_def] = "--vertical-label \"Thread count\" -l 0 --title \"$label\" ";
|
||||
$def[$next_def] = rrd::def($source, $this->DS[$i]["RRDFILE"], $this->DS[$i]["DS"]);
|
||||
$def[$next_def] .= rrd::def($source."_active", $this->DS[$i+1]["RRDFILE"], $this->DS[$i+1]["DS"]);
|
||||
$def[$next_def] .= rrd::gradient($source, "#ffffff", "#cceeee");
|
||||
$def[$next_def] .= rrd::line1($source."_active", "#7777ff", "Active thread count");
|
||||
$def[$next_def] .= rrd::gprint($source."_active", "LAST", "last %3.lf ");
|
||||
$def[$next_def] .= rrd::gprint($source."_active", "MAX", "max %3.lf ");
|
||||
$def[$next_def] .= rrd::gprint($source."_active", "AVERAGE", "average %3.2lf\\n");
|
||||
$i++;
|
||||
} elseif(preg_match("/^app-(.*)/", $label, $tmp)) {
|
||||
$source = $tmp[1];
|
||||
$label = "Application $source / $servicedesc ($hostname)";
|
||||
$ds_name[$next_def] = $label;
|
||||
$opt[$next_def] = "--vertical-label \"HTTP Sessions\" -l 0 --title \"$label\" ";
|
||||
$def[$next_def] = rrd::def($source, $this->DS[$i]["RRDFILE"], $this->DS[$i]["DS"]);
|
||||
$def[$next_def] .= rrd::gradient($source, "#ffefcf", "#ff9d00", "HTTP sessions");
|
||||
$def[$next_def] .= rrd::line1($source, "#ff7f00");
|
||||
$def[$next_def] .= rrd::gprint($source, "LAST", "last %4.lf ");
|
||||
$def[$next_def] .= rrd::gprint($source, "MAX", "max %4.lf ");
|
||||
$def[$next_def] .= rrd::gprint($source, "AVERAGE", "average %4.2lf\\n");
|
||||
} elseif(preg_match("/^jdbc-(.*)-capacity$/", $label, $jdbc)) {
|
||||
$jdbc_name = $jdbc[1];
|
||||
$label = "Datasource $jdbc_name";
|
||||
$ds_name[$next_def] = $label;
|
||||
$opt[$next_def] = "--vertical-label \"JDBC connection\" -l 0 --title \"".$ds_name[$next_def]."\" ";
|
||||
$def[$next_def] = rrd::def($jdbc_name."_capacity", $this->DS[$i]["RRDFILE"], $this->DS[$i]["DS"]);
|
||||
$def[$next_def] .= rrd::def($jdbc_name."_active", $this->DS[$i+1]["RRDFILE"], $this->DS[$i+1]["DS"]);
|
||||
$def[$next_def] .= rrd::def($jdbc_name."_waiting", $this->DS[$i+2]["RRDFILE"], $this->DS[$i+2]["DS"]);
|
||||
$def[$next_def] .= rrd::cdef("neg_".$jdbc_name."_waiting", "-1,".$jdbc_name."_waiting,*");
|
||||
$def[$next_def] .= rrd::gradient($jdbc_name."_capacity", "#ffffff", "#cceeee");
|
||||
$def[$next_def] .= rrd::line1($jdbc_name."_capacity", "#ddcccc");
|
||||
$def[$next_def] .= rrd::gradient($jdbc_name."_active", "#55eded", "#ccffff", 'Actives ');
|
||||
$def[$next_def] .= rrd::gprint($jdbc_name."_active", "LAST", "last %.0lf ");
|
||||
$def[$next_def] .= rrd::gprint($jdbc_name."_active", "MAX", "max %.0lf ");
|
||||
$def[$next_def] .= rrd::gprint($jdbc_name."_active", "AVERAGE", "avg %.2lf\\n");
|
||||
$def[$next_def] .= rrd::line1($jdbc_name."_active", "#000000");
|
||||
$def[$next_def] .= rrd::gradient("neg_".$jdbc_name."_waiting", "#eecccc", "#ff9dcc", 'Waiting');
|
||||
$def[$next_def] .= rrd::gprint($jdbc_name."_waiting", "LAST", "last %.0lf ");
|
||||
$def[$next_def] .= rrd::gprint($jdbc_name."_waiting", "MAX", "max %.0lf ");
|
||||
$def[$next_def] .= rrd::gprint($jdbc_name."_waiting", "AVERAGE", "avg %.2lf\\n");
|
||||
$def[$next_def] .= rrd::line1("neg_".$jdbc_name."_waiting", "#000000");
|
||||
$i += 2;
|
||||
} elseif(preg_match("/^Throughput$/", $label, $jdbc)) {
|
||||
# CPU definition
|
||||
$ds_name[$next_def] = $label;
|
||||
$opt[$next_def] = "--vertical-label \"\" -l 0 --title \"".$ds_name[$next_def]."\" ";
|
||||
$def[$next_def] = rrd::def("Throughput", $this->DS[$i]["RRDFILE"], $this->DS[$i]["DS"]);
|
||||
$def[$next_def] .= rrd::gradient("Throughput", "FFAD00", "FF1D00");
|
||||
$def[$next_def] .= rrd::line1("Throughput", "#FF0000", "Throughput");
|
||||
$def[$next_def] .= rrd::gprint("Throughput", "LAST", "last %2.lf");
|
||||
$def[$next_def] .= rrd::gprint("Throughput", "MAX", "max %2.lf");
|
||||
$def[$next_def] .= rrd::gprint("Throughput", "AVERAGE", "average %2.2lf\\n");
|
||||
} else {
|
||||
$ds_name[$next_def] = $label;
|
||||
$opt[$next_def] = "--vertical-label \"\" -l 0 --title \"".$ds_name[$next_def]."\" ";
|
||||
$def[$next_def] = rrd::def($label, $this->DS[$i]["RRDFILE"], $this->DS[$i]["DS"]);
|
||||
$def[$next_def] .= rrd::line1($label, "#000000");
|
||||
}
|
||||
$next_def++;
|
||||
}
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
74
share/pnp/documents/templates/gradient1.html
Normal file
74
share/pnp/documents/templates/gradient1.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<html><head><title>gradient1.php</title></head><body>
|
||||
<h2>gradient1.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2010 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Plugin: check_icmp [Multigraph]
|
||||
#
|
||||
# RTA
|
||||
#
|
||||
$ds_name[1] = "Round Trip Times";
|
||||
$opt[1] = "--lower=0 --vertical-label \"RTA\" --title \"Ping times\" ";
|
||||
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ;
|
||||
$def[1] .= rrd::gradient('var1','f0f0f0','0000a0','Round Trip Times',20);
|
||||
$def[1] .= rrd::gprint("var1", array("LAST", "MAX", "AVERAGE"), "%6.2lf $UNIT[1]") ;
|
||||
|
||||
if($WARN[1] != ""){
|
||||
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
|
||||
$def[1] .= rrd::hrule($WARN[1], "#FF8c00", "Warning ".$WARN[1].$UNIT[1]."\\n");
|
||||
}
|
||||
if($CRIT[1] != ""){
|
||||
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
|
||||
$def[1] .= rrd::hrule($CRIT[1], "#FF0000", "Critical ".$CRIT[1].$UNIT[1]."\\n");
|
||||
}
|
||||
|
||||
?>
|
||||
</file>
|
||||
|
||||
<file php gradient2.php>
|
||||
<?php
|
||||
#
|
||||
#
|
||||
$_WARNRULE = '#FFFF00';
|
||||
$_CRITRULE = '#FF0000';
|
||||
|
||||
$lower = $MAX[2] * -1;
|
||||
if (strlen ($LABEL[1]) >= strlen ($LABEL[2])){
|
||||
$lenlabel = strlen ($LABEL[1]) + 2;
|
||||
} else {
|
||||
$lenlabel = strlen ($LABEL[2]) + 2;
|
||||
}
|
||||
$label1 = sprintf("%' -".$lenlabel."s", $LABEL[1]);
|
||||
$label2 = sprintf("%' -".$lenlabel."s", $LABEL[2]);
|
||||
|
||||
$ds_name[1] = "$LABEL[1] / $LABEL[2] " ;
|
||||
$opt[1] = "--vertical-label $UNIT[1] --title \"Traffic For $hostname / $servicedesc\" ";
|
||||
$opt[1] .= '--color=BACK#000000 ';
|
||||
$opt[1] .= '--color=FONT#F7F7F7 ';
|
||||
$opt[1] .= '--color=SHADEA#ffffff ';
|
||||
$opt[1] .= '--color=SHADEB#ffffff ';
|
||||
$opt[1] .= '--color=CANVAS#000000 ';
|
||||
$opt[1] .= '--color=GRID#00991A ';
|
||||
$opt[1] .= '--color=MGRID#00991A ';
|
||||
$opt[1] .= '--color=ARROW#00FF00 ';
|
||||
$opt[1] .= '--slope-mode ';
|
||||
$def[1] = "DEF:inb=$RRDFILE[1]:$DS[1]:MAX " ;
|
||||
$def[1] .= "DEF:outb=$RRDFILE[2]:$DS[2]:MAX " ;
|
||||
$def[1] .= "CDEF:outbi=outb,-1,* " ;
|
||||
$def[1] .= rrd::gradient('inb','f0f0f0','0000a0',$label1,20);
|
||||
$def[1] .= "GPRINT:inb:LAST:\"%3.3lf $UNIT[1] LAST \" ";
|
||||
$def[1] .= "GPRINT:inb:MAX:\"%3.3lf $UNIT[1] MAX \" ";
|
||||
$def[1] .= "GPRINT:inb" . ':AVERAGE:"%3.3lf ' . $UNIT[1] . ' AVERAGE \j" ';
|
||||
$def[1] .= rrd::gradient('outbi','ffff42','ee7318',$label2,20);
|
||||
$def[1] .= "GPRINT:outb:LAST:\"%3.3lf $UNIT[2] LAST \" ";
|
||||
$def[1] .= "GPRINT:outb:MAX:\"%3.3lf $UNIT[2] MAX \" ";
|
||||
$def[1] .= "GPRINT:outb" . ':AVERAGE:"%3.3lf ' . $UNIT[2] . ' AVERAGE \j" ';
|
||||
$def[1] .= "COMMENT:\" \\l\" " ;
|
||||
$def[1] .= "LINE1:0#ffffff " ;
|
||||
$def[1] .= "HRULE:" . $WARN[1] . $_WARNRULE . ':"Inbound Warning on ' . $WARN[1] . ' ' . $UNIT[1] . '" ' ;
|
||||
$def[1] .= "HRULE:" . $WARN[2] * -1 . $_WARNRULE . ':"Outbound Warning on ' . $WARN[2] . ' ' . $UNIT[2] . '\j" ';
|
||||
$def[1] .= "HRULE:" . $CRIT[1] . $_CRITRULE . ':"Inbound Critical on ' . $CRIT[1] . ' ' . $UNIT[1] . '" ';
|
||||
$def[1] .= "HRULE:" . $CRIT[2] * -1 . $_CRITRULE . ':"Outbound Critical on ' . $CRIT[2] . ' ' . $UNIT[2] . '\j" ';
|
||||
?>
|
||||
</file></code></pre></body></html>
|
||||
31
share/pnp/documents/templates/integer.html
Normal file
31
share/pnp/documents/templates/integer.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<html><head><title>integer.php</title></head><body>
|
||||
<h2>integer.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2009 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Template for integer values
|
||||
#
|
||||
$def[1] = "";
|
||||
$opt[1] = "";
|
||||
$colors = array('#000000', '#0f0', '#ff0', '#f00', '#f0f', '#00f', '#0ff');
|
||||
foreach ( $DS as $KEY => $VAL ){
|
||||
$opt[1] .= "--alt-y-grid -l 0 --vertical-label \"$LABEL[$KEY]\" --title \"$LABEL[$KEY]\" ";
|
||||
$def[1] .= "DEF:var_float$KEY=$RRDFILE[$KEY]:$DS[$KEY]:MAX " ;
|
||||
$def[1] .= "CDEF:var$KEY=var_float$KEY,FLOOR " ;
|
||||
$def[1] .= "LINE1:var$KEY$colors[$KEY]:\"$LABEL[$KEY]\" " ;
|
||||
|
||||
if ($WARN[$KEY] != "") {
|
||||
$def[1] .= "HRULE:$WARN[$KEY]#FFFF00 ";
|
||||
}
|
||||
if ($CRIT[$KEY] != "") {
|
||||
$def[1] .= "HRULE:$CRIT[$KEY]#FF0000 ";
|
||||
}
|
||||
|
||||
$def[1] .= "GPRINT:var$KEY:LAST:\"%.0lf $UNIT[$KEY] LAST \" ";
|
||||
$def[1] .= "GPRINT:var$KEY:MAX:\"%.0lf $UNIT[$KEY] MAX \" ";
|
||||
$def[1] .= "GPRINT:var$KEY:AVERAGE:\"%.0lf $UNIT[$KEY] AVERAGE \\n\" ";
|
||||
}
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
25
share/pnp/documents/templates/start.html
Normal file
25
share/pnp/documents/templates/start.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<head><title>PNP Template Repository</title></head>
|
||||
<body>
|
||||
<h2>
|
||||
====== PNP Template Repository ======
|
||||
</h2>
|
||||
|
||||
The place to share your PNP Templates.
|
||||
<br>
|
||||
<table>
|
||||
<tr><th>PNP Version<th>Template Name<th>Comment
|
||||
<tr><th>0.6.x<td><a href="integer.html">integer</a><td> Generic Template used for integer values
|
||||
<tr><th>0.6.x<td><a href="check_apachestatus.html">check_apachestatus</a><td> Used with check_apachestatus.pl
|
||||
<tr><th>0.6.x<td><a href="check_mk-df.html">check_mk-df</a><td> Used with check_mk
|
||||
<tr><th>0.6.x<td><a href="check_mk-cpu.loads.html">check_mk-cpu.loads</a<td> Used with check_mk
|
||||
<tr><th>0.6.x<td><a href="check_http.html">check_http</a<td> Used with check_http
|
||||
<tr><th>0.6.x<td><a href="check_cpu.html">check_cpu</a><td> Used with check_cpu
|
||||
<tr><th>0.6.x<td><a href="check_oracle_health_tablespace-usage.html">check_oracle_health_tablespace-usage</a><td> Used with check_oracle_health
|
||||
<tr><th>0.6.5<td><a href="alerter.html">alerter</a><td> Example for rrd::alerter function
|
||||
<tr><th>0.6.5<td><a href="ticker.html">ticker</a><td> Example for rrd::ticker function
|
||||
<tr><th>0.6.5<td><a href="gradient1.html">gradient</a><td> Example for rrd::gradient function
|
||||
<tr><th>0.6.x<td><a href="check_wlsagent.html"check_wlsagent</a><td> Used with check_wlsagent
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
50
share/pnp/documents/templates/ticker.html
Normal file
50
share/pnp/documents/templates/ticker.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<html><head><title>ticker.php</title></head><body>
|
||||
<h2>ticker.php</h2>
|
||||
<pre><code>
|
||||
<?php
|
||||
#
|
||||
# Copyright (c) 2006-2010 Joerg Linge (http://www.pnp4nagios.org)
|
||||
# Plugin: check_icmp [Multigraph]
|
||||
#
|
||||
# RTA
|
||||
#
|
||||
$ds_name[1] = "Round Trip Times";
|
||||
$opt[1] = "--lower=0 --vertical-label \"RTA\" --title \"Ping times\" ";
|
||||
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ;
|
||||
$def[1] .= rrd::ticker("var1", $WARN[1], $CRIT[1],-0.05,"ff","#00ff00","#ff8c00","#ff0000") ;
|
||||
$def[1] .= rrd::line1("var1", "#0000ff", "Round Trip Times") ;
|
||||
$def[1] .= rrd::gprint("var1", array("LAST", "MAX", "AVERAGE"), "%6.2lf $UNIT[1]") ;
|
||||
|
||||
if($WARN[1] != ""){
|
||||
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
|
||||
$def[1] .= rrd::hrule($WARN[1], "#FF8c00", "Warning ".$WARN[1].$UNIT[1]."\\n");
|
||||
}
|
||||
if($CRIT[1] != ""){
|
||||
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
|
||||
$def[1] .= rrd::hrule($CRIT[1], "#FF0000", "Critical ".$CRIT[1].$UNIT[1]."\\n");
|
||||
}
|
||||
#
|
||||
# Packets Lost
|
||||
$ds_name[2] = "Packets Lost";
|
||||
$opt[2] = "--vertical-label \"Packets lost\" -l0 -u105 --title \"Packets lost\" ";
|
||||
|
||||
$def[2] = rrd::def("var1", $RRDFILE[2], $DS[2], "AVERAGE");
|
||||
$def[2] .= rrd::gradient("var1", "ff5c00", "ffdc00", "Packets Lost", 20) ;
|
||||
$def[2] .= rrd::ticker("var1", $WARN[2], $CRIT[2],-0.05,"ff","#00ff00","#ff8c00","#ff0000") ;
|
||||
$def[2] .= rrd::gprint("var1", array("LAST", "MAX", "AVERAGE"), "%3.0lf $UNIT[2]") ;
|
||||
$def[2] .= rrd::line1("var1", "#000000") ;
|
||||
|
||||
$def[2] .= rrd::hrule("100", "#000000", ":dashes") ;
|
||||
|
||||
if($WARN[2] != ""){
|
||||
if($UNIT[2] == "%%"){ $UNIT[2] = "%"; };
|
||||
$def[2] .= rrd::hrule($WARN[2], "#FF8c00", "Warning ".$WARN[2].$UNIT[2]."\\n");
|
||||
}
|
||||
if($CRIT[2] != ""){
|
||||
if($UNIT[2] == "%%"){ $UNIT[2] = "%"; };
|
||||
$def[2] .= rrd::hrule($CRIT[2], "#FF0000", "Critical ".$CRIT[2].$UNIT[2]."\\n");
|
||||
}
|
||||
|
||||
?>
|
||||
</file>
|
||||
</code></pre></body></html>
|
||||
Reference in New Issue
Block a user