Fix template for host overview - WIP
Signed-off-by: Sven Velt <sven@velt.de>
This commit is contained in:
parent
5072d4cd20
commit
f232450fec
|
@ -7,30 +7,7 @@
|
||||||
### Helper functions
|
### Helper functions
|
||||||
#
|
#
|
||||||
|
|
||||||
function wc($VAL) {
|
require_once("check_naf_helper.php");
|
||||||
$wcout = "";
|
|
||||||
|
|
||||||
if ($VAL['WARN'] != "") {
|
|
||||||
$wcout .= rrd::hrule($VAL['WARN'], "#FFFF00", "Warning " . $VAL['WARN'] . "\\n");
|
|
||||||
}
|
|
||||||
if ($VAL['WARN_MIN'] != "") {
|
|
||||||
$wcout .= rrd::hrule($VAL['WARN_MIN'], "#FFFF00", "Warning (min) " . $VAL['WARN_MIN'] . "\\n");
|
|
||||||
}
|
|
||||||
if ($VAL['WARN_MAX'] != "") {
|
|
||||||
$wcout .= rrd::hrule($VAL['WARN_MAX'], "#FFFF00", "Warning (max) " . $VAL['WARN_MAX'] . "\\n");
|
|
||||||
}
|
|
||||||
if ($VAL['CRIT'] != "") {
|
|
||||||
$wcout .= rrd::hrule($VAL['CRIT'], "#FF0000", "Critical " . $VAL['CRIT'] . "\\n");
|
|
||||||
}
|
|
||||||
if ($VAL['CRIT_MIN'] != "") {
|
|
||||||
$wcout .= rrd::hrule($VAL['CRIT_MIN'], "#FF0000", "Critical (min) " . $VAL['CRIT_MIN'] . "\\n");
|
|
||||||
}
|
|
||||||
if ($VAL['CRIT_MAX'] != "") {
|
|
||||||
$wcout .= rrd::hrule($VAL['CRIT_MAX'], "#FF0000", "Critical (max) " . $VAL['CRIT_MAX'] . "\\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return $wcout;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
### Main loop
|
### Main loop
|
||||||
|
|
28
PNP/templates/check_naf_helper.php
Normal file
28
PNP/templates/check_naf_helper.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?
|
||||||
|
|
||||||
|
function wc($VAL) {
|
||||||
|
$wcout = "";
|
||||||
|
|
||||||
|
if ($VAL['WARN'] != "") {
|
||||||
|
$wcout .= rrd::hrule($VAL['WARN'], "#FFFF00", "Warning " . $VAL['WARN'] . "\\n");
|
||||||
|
}
|
||||||
|
if ($VAL['WARN_MIN'] != "") {
|
||||||
|
$wcout .= rrd::hrule($VAL['WARN_MIN'], "#FFFF00", "Warning (min) " . $VAL['WARN_MIN'] . "\\n");
|
||||||
|
}
|
||||||
|
if ($VAL['WARN_MAX'] != "") {
|
||||||
|
$wcout .= rrd::hrule($VAL['WARN_MAX'], "#FFFF00", "Warning (max) " . $VAL['WARN_MAX'] . "\\n");
|
||||||
|
}
|
||||||
|
if ($VAL['CRIT'] != "") {
|
||||||
|
$wcout .= rrd::hrule($VAL['CRIT'], "#FF0000", "Critical " . $VAL['CRIT'] . "\\n");
|
||||||
|
}
|
||||||
|
if ($VAL['CRIT_MIN'] != "") {
|
||||||
|
$wcout .= rrd::hrule($VAL['CRIT_MIN'], "#FF0000", "Critical (min) " . $VAL['CRIT_MIN'] . "\\n");
|
||||||
|
}
|
||||||
|
if ($VAL['CRIT_MAX'] != "") {
|
||||||
|
$wcout .= rrd::hrule($VAL['CRIT_MAX'], "#FF0000", "Critical (max) " . $VAL['CRIT_MAX'] . "\\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $wcout;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
Loading…
Reference in a new issue