Skip to content
Permalink
Browse files

fixed broken default.php template

  • Loading branch information
Andreas Boesl
Andreas Boesl committed Feb 6, 2015
1 parent 7a83b2d commit abb5096a5e2e57f09242cbcc43da9839eccce793
Showing with 6 additions and 3 deletions.
  1. +6 −3 pnp-templates/default.php
@@ -28,15 +28,18 @@
. "&service=" . urlencode($servicedesc)
. "&perfdata=" . urlencode($NAGIOS_PERFDATA)
. "&check_command=" . urlencode($NAGIOS_CHECK_COMMAND), "r");

$use_legacy_template = True;
if ($fd) {
while (!feof($fd)) {
$use_legacy_template = False;
$opt[] = trim(fgets($fd));
$def[] = trim(fgets($fd));
}
}
else
{

if ($use_legacy_template)
{
$_WARNRULE = '#FFFF00';
$_CRITRULE = '#FF0000';
$_AREA = '#256aef';
@@ -93,7 +96,7 @@
$vlabel = $VAL['UNIT'];
}

$opt[$KEY] = '--vertical-label "' . $titel . $vlabel . '" --title "' . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . '"' . $upper . $lower;
$opt[$KEY] = '--vertical-label "' . $vlabel . '" --title "' . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . '"' . $upper . $lower;
$ds_name[$KEY] = $VAL['LABEL'];
$def[$KEY] = rrd::def ("var1", $VAL['RRDFILE'], $VAL['DS'], "AVERAGE");
$def[$KEY] .= rrd::gradient("var1", "3152A5", "BDC6DE", rrd::cut($VAL['NAME'],16), 20);

0 comments on commit abb5096

Please sign in to comment.
You can’t perform that action at this time.