diff options
author | mail_redacted_for_web | 2019-04-17 19:07:19 +0200 |
---|---|---|
committer | mail_redacted_for_web | 2019-04-17 19:07:19 +0200 |
commit | 1e2387474a449452b78520b9ad96a8b4b5e99722 (patch) | |
tree | 836889471eec7d2aac177405068e2a8f1e2b1978 /nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template | |
download | nagios-plugins-contrib-1e2387474a449452b78520b9ad96a8b4b5e99722.tar.bz2 |
initial commit of source fetch
Diffstat (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template')
-rw-r--r-- | nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template new file mode 100644 index 0000000..4d8db3d --- /dev/null +++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template @@ -0,0 +1,37 @@ +<?php +/* +License: GPL +Author: Andy Spiegl <pnp4nagios.andy@spiegl.de> + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 as +published by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +Probably requires: + pnp4nagios 0.4.14+ +*/ + +# Template to combine all data sets of an RRD into one single graph +# useful for e.g. hardware sensors with many values + +$opt[1] = "-T 55 -l 0 --vertical-label \"Combined Graph\" --title \"Combined Graph " . $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'],16) ); + $def[1] .= rrd::gprint ("var$KEY", array("LAST","MIN","MAX","AVERAGE"), "%3.4lf %S".$VAL['UNIT']); +} +$def[1] .= rrd::comment("Default Combined Graph Template\\r"); +$def[1] .= rrd::comment("Command " . $VAL['TEMPLATE'] . "\\r"); + +?> |