<?php
/*
  (c) 2013 by Frederic Krueger / igetspam@bigfoot.com

  Licensed under Creative Commons Attribution-ShareAlike 3.0 Unported
  There is no warranty of any kind, explicit or implied, for anything this software does or does not do.

  The accompanying software's homepage can be found here:
    http://nethack.no-ip.biz/dev/check_openweathermap/

  Requires: pnp4nagios
*/

# Template to combine all selected data sets (of varying usefulness) provided by the plugin into one single graph

$opt[1] = "--vertical-label Clients --title \"$hostname / $servicedesc\" ";
//$opt[1] = " --title \"check_openweathermap graph for " . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . "\" ";
$def[1] = "";

foreach ($this->DS as $key => $val)
{
  $def[1] .= rrd::def     ("var$key", $val['RRDFILE'], $val['DS'], "AVERAGE");
  $def[1] .= rrd::line2   ("var$key", rrd::color($key, 80) , rrd::cut($val['NAME'],30) );
  $def[1] .= rrd::gprint  ("var$key", array("LAST","AVERAGE"), "%9.0lf %S".$val['UNIT']);
}
$def[1] .= rrd::comment("\\r");
$def[1] .= rrd::comment("Total Associations\\r");



?>

//$def[1] =  "DEF:var1=$RRDFILE[1]:$DS[1]:MAX " ;
//$def[1] .= "AREA:var1#00FF00:\"Users logged in \" " ;
//$def[1] .= "LINE1:var1#000000:\"\" " ;
