New upstream version 0.6.27

This commit is contained in:
geos_one
2025-08-06 18:11:51 +02:00
parent a6b4158f1f
commit 56a986c0ba
563 changed files with 45811 additions and 35282 deletions

View File

@@ -1,34 +1,44 @@
<?php
#
#
#
$this->MACRO['TITLE'] = "Interface Traffic for ETH0";
$this->MACRO['TITLE'] = "Interface Traffic for ETH0";
$this->MACRO['COMMENT'] = "Inbound Traffc for all Cloud Nodes";
#
# Get a List of Services by regex
# Get a List of Services by regex
# Option 1 = 'Host Regex'
# Option 2 = 'Service Regex'
#
$services = $this->tplGetServices("node","eth0");
$services = $this->tplGetServices("node", "eth0");
#
# The Datasource Name for Graph 0
$ds_name[0] = "RTA Times";
if (!is_array($ds_name)) {
$ds_name = [];
}
if (!is_arry($opt)) {
$opt = [];
}
if (!is_array($def)) {
$def = [];
}
$ds_name[0] = "RTA Times";
$opt[0] = "--title \"Stacked RTA Times\"";
$def[0] = "";
#
# Iterate through the list of hosts
foreach($services as $key=>$val){
foreach ($services as $key => $val) {
#
# get the data for a given Host/Service
$a = $this->tplGetData($val['host'],$val['service']);
$a = $this->tplGetData($val['host'], $val['service']);
#
# Throw an exception to debug the content of $a
# Just to get Infos about the Array Structure
#
#throw new Kohana_exception(print_r($a,TRUE));
$def[0] .= rrd::def("a$key" ,$a['DS'][0]['RRDFILE'], $a['DS'][0]['DS'], "AVERAGE");
$def[0] .= rrd::def("a$key", $a['DS'][0]['RRDFILE'], $a['DS'][0]['DS'], "AVERAGE");
$def[0] .= rrd::area("a$key", rrd::color($key), $a['MACRO']['HOSTNAME'], "STACK");
$def[0] .= rrd::gprint("a$key", array("MIN", "MAX", "LAST"), "%.2lf%s");
}
?>

View File

@@ -1,8 +1,18 @@
<?php
#
if (!is_array($ds_name)) {
$ds_name = [];
}
if (!is_arry($opt)) {
$opt = [];
}
if (!is_array($def)) {
$def = [];
}
#
#
#
$this->MACRO['TITLE'] = "The Title";
$this->MACRO['TITLE'] = "The Title";
$this->MACRO['COMMENT'] = "A Comment";
#
# Define the Service we want to graph
@@ -12,17 +22,16 @@ $service = '_HOST_';
$hosts = array('localhost','node1','node2');
#
# The Datasource Name for Graph 1 ( index 0 )
$ds_name[0] = "RTA Times";
$ds_name[0] = "RTA Times";
$opt[0] = "--title \"Stacked RTA Times\"";
$def[0] = "";
#
# Iterate through the list of hosts
foreach($hosts as $key=>$host){
foreach ($hosts as $key => $host) {
#
# get the data for a given Host/Service
$a = $this->tplGetData($host,$service);
$def[0] .= rrd::def("a$key" ,$a['DS'][0]['RRDFILE'], $a['DS'][0]['DS'], "AVERAGE");
$a = $this->tplGetData($host, $service);
$def[0] .= rrd::def("a$key", $a['DS'][0]['RRDFILE'], $a['DS'][0]['DS'], "AVERAGE");
$def[0] .= rrd::area("a$key", rrd::color($key), $a['MACRO']['HOSTNAME'], "STACK");
$def[0] .= rrd::gprint("a$key", array("MIN", "MAX", "LAST"), "%.2lf%s");
}
?>

View File

@@ -1,19 +1,28 @@
<?php
#
# This is a very basic static Template
#
if (!is_array($ds_name)) {
$ds_name = [];
}
if (!is_arry($opt)) {
$opt = [];
}
if (!is_array($def)) {
$def = [];
}
#
# Some Macros
$this->MACRO['TITLE'] = "All Ping Times for Cluster Nodes";
# Some Macros
$this->MACRO['TITLE'] = "All Ping Times for Cluster Nodes";
$this->MACRO['COMMENT'] = "This is a comment";
#
# The Name of this Datasource (ds)
$ds_name[0] = "RTA Times";
$ds_name[0] = "RTA Times";
$opt[0] = "--title \"Graph Title\" ";
$def[0] = "DEF:var1=/usr/local/pnp4nagios/var/perfdata/node1/_HOST_.rrd:1:AVERAGE ";
$def[0] .= "DEF:var2=/usr/local/pnp4nagios/var/perfdata/node2/_HOST_.rrd:1:AVERAGE ";
$def[0] .= "LINE1:var1".rrd::color(1).":\"Localhost \\n\" ";
$def[0] .= "LINE1:var2".rrd::color(2).":\"Node1 \\n\" ";
?>
$def[0] .= "LINE1:var1" . rrd::color(1) . ":\"Localhost \\n\" ";
$def[0] .= "LINE1:var2" . rrd::color(2) . ":\"Node1 \\n\" ";