mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3800 from murrant/rrd-create-remote
RRD Cleanup: centralize rrd_exists check, utilize data_update() and rrd_name()
This commit is contained in:
@@ -85,7 +85,6 @@ Running Apache and an install of LibreNMS in /opt/librenms
|
||||
```php
|
||||
$config['distributed_poller'] = true;
|
||||
$config['rrdcached'] = "example.com:42217";
|
||||
$config['rrdcached_dir'] = ".";
|
||||
```
|
||||
|
||||
Database Server:
|
||||
@@ -126,7 +125,6 @@ $config['distributed_poller_host'] = "example.com";
|
||||
$config['distributed_poller_port'] = 11211;
|
||||
$config['distributed_poller'] = true;
|
||||
$config['rrdcached'] = "example.com:42217";
|
||||
$config['rrdcached_dir'] = ".";
|
||||
$config['update'] = 0;
|
||||
```
|
||||
|
||||
@@ -153,7 +151,6 @@ $config['distributed_poller_host'] = "example.com";
|
||||
$config['distributed_poller_port'] = 11211;
|
||||
$config['distributed_poller'] = true;
|
||||
$config['rrdcached'] = "example.com:42217";
|
||||
$config['rrdcached_dir'] = ".";
|
||||
$config['update'] = 0;
|
||||
```
|
||||
|
||||
@@ -178,7 +175,6 @@ $config['distributed_poller_host'] = "example.com";
|
||||
$config['distributed_poller_port'] = 11211;
|
||||
$config['distributed_poller'] = true;
|
||||
$config['rrdcached'] = "example.com:42217";
|
||||
$config['rrdcached_dir'] = ".";
|
||||
$config['update'] = 0;
|
||||
```
|
||||
|
||||
|
@@ -2,11 +2,12 @@
|
||||
|
||||
This document will explain how to setup RRDCached for LibreNMS.
|
||||
|
||||
> If you are using rrdtool / rrdcached version 1.5 or above then this now supports creating rrd files over rrdcached. To
|
||||
enable this set the following config:
|
||||
> If you are using rrdtool / rrdcached version 1.5 or above then this now supports creating rrd files over rrdcached.
|
||||
If you have rrdcached 1.5.5 or above, we can also tune over rrdcached.
|
||||
To enable this set the following config:
|
||||
|
||||
```php
|
||||
$config['rrdtool_version'] = 1.5;
|
||||
$config['rrdtool_version'] = 1.5.5;
|
||||
```
|
||||
|
||||
### RRDCached installation CentOS 6
|
||||
@@ -29,7 +30,7 @@ vi /etc/yum.repos.d/rpmforge.repo
|
||||
vi /etc/sysconfig/rrdcached
|
||||
|
||||
# Settings for rrdcached
|
||||
OPTIONS="-w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/"
|
||||
OPTIONS="-w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/"
|
||||
RRDC_USER=librenms
|
||||
|
||||
mkdir /var/run/rrdcached
|
||||
@@ -77,8 +78,7 @@ After=network.service
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/rrdcached.pid
|
||||
ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/
|
||||
RRDC_USER=librenms
|
||||
ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
@@ -104,11 +104,9 @@ Settings to enable memcached - currently it's not recommended to run memcached u
|
||||
|
||||
```php
|
||||
$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; // or a tcp connection 127.0.0.1:42217
|
||||
$config['rrdcached_dir'] = FALSE;
|
||||
```
|
||||
To enable rrdcached you need to set at least the `rrdcached` option. If `rrdcached` is a tcp socket then you need to configure `rrdcached_dir` as well.
|
||||
This should be set based on your base directory for running rrdcached. For instance if -b for rrdcached is set to /var/lib/rrd but you are expecting
|
||||
LibreNMS to store them in /var/lib/rrd/librenms then you would need to set `rrdcached_dir` to librenms.
|
||||
To enable rrdcached you need to set at least the `rrdcached` option. Make sure rrdcached is started with the `-b` option set to the correct directoy,
|
||||
as configured in `$config['rrd_dir`]`.
|
||||
|
||||
#### WebUI Settings
|
||||
|
||||
|
@@ -300,25 +300,29 @@ $version = trim(snmp_get($device, "productVersion.0", "-OQv", "PULSESECURE-PSG-M
|
||||
$hardware = "Juniper " . trim(snmp_get($device, "productName.0", "-OQv", "PULSESECURE-PSG-MIB"),'"');
|
||||
$hostname = trim(snmp_get($device, "sysName.0", "-OQv", "SNMPv2-MIB"),'"');
|
||||
|
||||
$usersrrd = $config['rrd_dir'].'/'.$device['hostname'].'/pulse_users.rrd';
|
||||
$users = snmp_get($device, 'PULSESECURE-PSG-MIB::iveConcurrentUsers.0', '-OQv');
|
||||
|
||||
if (is_numeric($users)) {
|
||||
if (!is_file($usersrrd)) {
|
||||
rrdtool_create($usersrrd, ' DS:users:GAUGE:600:0:U'.$config['rrd_rra']);
|
||||
}
|
||||
rrdtool_update($usersrrd, "N:$users");
|
||||
$rrd_def = 'DS:users:GAUGE:600:0:U';
|
||||
$fields = array(
|
||||
'users' => $users
|
||||
)
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pulse_users', $tags, $fields);
|
||||
$graphs['pulse_users'] = true;
|
||||
}
|
||||
|
||||
$sessrrd = $config['rrd_dir'].'/'.$device['hostname'].'/pulse_sessions.rrd';
|
||||
$sessions = snmp_get($device, 'PULSESECURE-PSG-MIB::iveConcurrentUsers.0', '-OQv');
|
||||
|
||||
if (is_numeric($sessions)) {
|
||||
if (!is_file($sessrrd)) {
|
||||
rrdtool_create($sessrrd, ' DS:sessions:GAUGE:600:0:U '.$config['rrd_rra']);
|
||||
$rrd_def = array(
|
||||
'DS:sessions:GAUGE:600:0:U',
|
||||
}
|
||||
rrdtool_update($sessrrd, "N:$sessions");
|
||||
$fields = array(
|
||||
'sessions' => $sessions
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pulse_sessions', $tags, $fields);
|
||||
$graphs['pulse_sessions'] = true;
|
||||
}
|
||||
```
|
||||
@@ -353,7 +357,7 @@ html/includes/graphs/device/pulse_sessions.inc.php
|
||||
```php
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('pulse_sessions.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], 'pulse_sessions');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
@@ -381,7 +385,7 @@ html/includes/graphs/device/pulse_users.inc.php
|
||||
```php
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('pulse_users.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], 'pulse_users');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
|
@@ -4,7 +4,7 @@ require 'includes/graphs/common.inc.php';
|
||||
|
||||
$device = device_by_id_cache($id);
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/mem.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], 'mem');
|
||||
|
||||
$rrd_options .= ' -b 1024';
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap['name'].$ap['radio_number']));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Channel';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap['name'].$ap['radio_number']));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Interference';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap['name'].$ap['radio_number']));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Num Clients';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap[name].$ap[radio_number]));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'MonBSSIDs';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap['name'].$ap['radio_number']));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Mon Clients';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap['name'].$ap['radio_number']));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'radioutil';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename("arubaap-$ap[name].$ap[radio_number].rrd");
|
||||
$rrd_filename = rrd_name($device['hostname'], array('arubaap', $ap['name'].$ap['radio_number']));
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'txpow';
|
||||
|
@@ -6,7 +6,7 @@ require 'includes/graphs/common.inc.php';
|
||||
|
||||
$device = device_by_id_cache($id);
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/altiga-ssl.rrd.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], 'altiga-ssl');
|
||||
|
||||
$rrd_options .= " DEF:TotalSessions=$rrd_filename:TotalSessions:AVERAGE";
|
||||
$rrd_options .= " DEF:ActiveSessions=$rrd_filename:ActiveSessions:AVERAGE";
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$apache_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-apache-'.$app['app_id'].'.rrd';
|
||||
$apache_rrd = rrd_name($device['hostname'], array('app', 'apache', $app['app_id']));
|
||||
|
||||
if (is_file($apache_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($apache_rrd)) {
|
||||
$rrd_filename = $apache_rrd;
|
||||
}
|
||||
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$apache_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-apache-'.$app['app_id'].'.rrd';
|
||||
$apache_rrd = rrd_name($device['hostname'], array('app', 'apache', $app['app_id']));
|
||||
|
||||
if (is_file($apache_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($apache_rrd)) {
|
||||
$rrd_filename = $apache_rrd;
|
||||
}
|
||||
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$apache_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-apache-'.$app['app_id'].'.rrd';
|
||||
$apache_rrd = rrd_name($device['hostname'], array('app', 'apache', $app['app_id']));
|
||||
|
||||
if (is_file($apache_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($apache_rrd)) {
|
||||
$rrd_filename = $apache_rrd;
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,7 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-apache-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'apache', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'sb_reading' => array(
|
||||
@@ -50,7 +50,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -30,7 +30,7 @@ $i = 0;
|
||||
$scale_min = 0;
|
||||
$nototal = 1;
|
||||
$unit_text = 'Query/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-bind-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'bind', $app['app_id']));
|
||||
$array = array(
|
||||
'any',
|
||||
'a',
|
||||
@@ -48,7 +48,7 @@ $rrd_list = array();
|
||||
|
||||
$config['graph_colours']['merged'] = array_merge($config['graph_colours']['greens'], $config['graph_colours']['blues']);
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = strtoupper($ds);
|
||||
|
@@ -8,7 +8,7 @@ $out_text = 'Commit';
|
||||
|
||||
$ceph_osd_rrd = ceph_rrd('osd');
|
||||
|
||||
if (is_file($ceph_osd_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ceph_osd_rrd)) {
|
||||
$rrd_filename = $ceph_osd_rrd;
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,7 @@ require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ceph_pool_rrd = ceph_rrd('df');
|
||||
|
||||
if (is_file($ceph_pool_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ceph_pool_rrd)) {
|
||||
$rrd_filename = $ceph_pool_rrd;
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ $format = 'bytes';
|
||||
|
||||
$ceph_pool_rrd = ceph_rrd('pool');
|
||||
|
||||
if (is_file($ceph_pool_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ceph_pool_rrd)) {
|
||||
$rrd_filename = $ceph_pool_rrd;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ceph_pool_rrd = ceph_rrd('pool');
|
||||
|
||||
if (is_file($ceph_pool_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ceph_pool_rrd)) {
|
||||
$rrd_filename = $ceph_pool_rrd;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ceph_pool_rrd = ceph_rrd('df');
|
||||
|
||||
if (is_file($ceph_pool_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ceph_pool_rrd)) {
|
||||
$rrd_filename = $ceph_pool_rrd;
|
||||
}
|
||||
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$drbd_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-drbd-'.$app['app_instance'].'.rrd';
|
||||
$drbd_rrd = rrd_name($device['hostname'], array('app', 'drbd', $app['app_instance']));
|
||||
|
||||
if (is_file($drbd_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($drbd_rrd)) {
|
||||
$rrd_filename = $drbd_rrd;
|
||||
}
|
||||
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$drbd_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-drbd-'.$app['app_instance'].'.rrd';
|
||||
$drbd_rrd = rrd_name($device['hostname'], array('app', 'drbd', $app['app_instance']));
|
||||
|
||||
if (is_file($drbd_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($drbd_rrd)) {
|
||||
$rrd_filename = $drbd_rrd;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-drbd-'.$app['app_instance'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'drbd', $app['app_instance']));
|
||||
|
||||
$array = array(
|
||||
'lo' => 'Local I/O',
|
||||
@@ -12,7 +12,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$drbd_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-drbd-'.$app['app_instance'].'.rrd';
|
||||
$drbd_rrd = rrd_name($device['hostname'], array('app', 'drbd', $app['app_instance']));
|
||||
|
||||
if (is_file($drbd_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($drbd_rrd)) {
|
||||
$rrd_filename = $drbd_rrd;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$nototal = (($width < 550) ? 1 : 0);
|
||||
$unit_text = 'Messages/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mailscannerV2-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mailscannerV2', $app['app_id']));
|
||||
$array = array(
|
||||
'msg_rejected' => array('descr' => 'Rejected'),
|
||||
'msg_relay' => array('descr' => 'Relayed'),
|
||||
@@ -16,7 +16,7 @@ $array = array(
|
||||
$i = 0;
|
||||
$x = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
$max_colours = count($config['graph_colours'][$colours]);
|
||||
foreach ($array as $ds => $vars) {
|
||||
$x = (($x <= $max_colours) ? $x : 0);
|
||||
|
@@ -15,9 +15,9 @@ $colour_area_out = 'CECEFF66';
|
||||
$colour_area_in_max = 'CC88CC';
|
||||
$colour_area_out_max = 'FFEFAA';
|
||||
|
||||
$mailscanner_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-mailscannerV2-'.$app['app_id'].'.rrd';
|
||||
$mailscanner_rrd = rrd_name($device['hostname'], array('app', 'mailscannerV2', $app['app_id']));
|
||||
|
||||
if (is_file($mailscanner_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($mailscanner_rrd)) {
|
||||
$rrd_filename = $mailscanner_rrd;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ require 'includes/graphs/common.inc.php';
|
||||
$scale_min = 0;
|
||||
$nototal = (($width < 550) ? 1 : 0);
|
||||
$unit_text = 'Messages/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mailscannerV2-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mailscannerV2', $app['app_id']));
|
||||
$array = array(
|
||||
'spam' => array(
|
||||
'descr' => 'Spam',
|
||||
@@ -19,7 +19,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-memcached-'.$app['app_id'].'.rrd';
|
||||
if (is_file($rrd)) {
|
||||
$rrd = rrd_name($device['hostname'], array('app', 'memcached', $app['app_id']));
|
||||
if (rrdtool_check_rrd_exists($rrd)) {
|
||||
$rrd_filename = $rrd;
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -20,7 +20,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -16,7 +16,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'CDe' => array(
|
||||
@@ -44,7 +44,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -2,9 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'MaCs' => array(
|
||||
@@ -34,7 +32,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'TOC' => array('descr' => 'Table Cache'),
|
||||
@@ -12,7 +12,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'IBPse' => 'Buffer Pool Size',
|
||||
@@ -12,7 +12,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'IBRd' => 'Pages Read',
|
||||
@@ -11,7 +11,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'IBIIs' => 'Inserts',
|
||||
@@ -11,7 +11,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,35 +2,35 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$mysql_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$mysql_rrd = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
if (is_file($mysql_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($mysql_rrd)) {
|
||||
$rrd_filename = $mysql_rrd;
|
||||
|
||||
$rrd_options .= ' DEF:a=' . $rrd_filename . ':IBIRd:AVERAGE ';
|
||||
$rrd_options .= ' DEF:b=' . $rrd_filename . ':IBIWr:AVERAGE ';
|
||||
$rrd_options .= ' DEF:c=' . $rrd_filename . ':IBILg:AVERAGE ';
|
||||
$rrd_options .= ' DEF:d=' . $rrd_filename . ':IBIFSc:AVERAGE ';
|
||||
|
||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:a#22FF22:"File Reads " ';
|
||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:b#0022FF:"File Writes " ';
|
||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:c#FF0000:"Log Writes " ';
|
||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:d#00AAAA:"File syncs " ';
|
||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\\n" ';
|
||||
}
|
||||
|
||||
$rrd_options .= ' DEF:a='.$rrd_filename.':IBIRd:AVERAGE ';
|
||||
$rrd_options .= ' DEF:b='.$rrd_filename.':IBIWr:AVERAGE ';
|
||||
$rrd_options .= ' DEF:c='.$rrd_filename.':IBILg:AVERAGE ';
|
||||
$rrd_options .= ' DEF:d='.$rrd_filename.':IBIFSc:AVERAGE ';
|
||||
|
||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:a#22FF22:"File Reads " ';
|
||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:b#0022FF:"File Writes " ';
|
||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:c#FF0000:"Log Writes " ';
|
||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\\n" ';
|
||||
|
||||
$rrd_options .= 'LINE1:d#00AAAA:"File syncs " ';
|
||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\\n" ';
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'IBILog' => 'AIO Log',
|
||||
@@ -15,7 +15,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$mysql_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$mysql_rrd = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
if (is_file($mysql_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($mysql_rrd)) {
|
||||
$rrd_filename = $mysql_rrd;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'IDBRDd' => 'Deletes',
|
||||
@@ -12,7 +12,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'IBSRs' => 'Spin Rounds',
|
||||
@@ -11,7 +11,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,12 +2,12 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array('IBTNx' => 'Transactions created');
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'KRRs' => 'read requests',
|
||||
@@ -12,7 +12,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$mysql_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$mysql_rrd = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
if (is_file($mysql_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($mysql_rrd)) {
|
||||
$rrd_filename = $mysql_rrd;
|
||||
}
|
||||
|
||||
|
@@ -2,13 +2,12 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$mysql_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$mysql_rrd = rrd_name($device['hostname'], array('app', mysql, $app['app_id']));
|
||||
|
||||
if (is_file($mysql_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($mysql_rrd)) {
|
||||
$rrd_filename = $mysql_rrd;
|
||||
}
|
||||
|
||||
$array = array(
|
||||
$array = array(
|
||||
'QCQICe' => array(
|
||||
'descr' => 'Queries in cache',
|
||||
'colour' => '22FF22',
|
||||
@@ -31,18 +30,19 @@ $array = array(
|
||||
),
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
|
||||
$rrd_list = array();
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
$rrd_list[$i]['ds'] = $ds;
|
||||
// $rrd_list[$i]['colour'] = $vars['colour'];
|
||||
$i++;
|
||||
$rrd_list[] = array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => $vars['descr'],
|
||||
'ds' => $ds,
|
||||
// 'colour' => $vars['colour']
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "file missing: $file";
|
||||
echo "data missing: $mysql_rrd";
|
||||
}
|
||||
|
||||
$colours = 'mixed';
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'QCs' => 'Cache size',
|
||||
@@ -10,7 +10,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'SFJn' => 'Full Join',
|
||||
@@ -13,7 +13,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,12 +2,12 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array('SQs' => 'Slow queries');
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'SRows' => 'Rows Sorted',
|
||||
@@ -12,7 +12,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'-status.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id'], 'status'));
|
||||
|
||||
$array = array(
|
||||
'State_closing_tables' => 'd2',
|
||||
@@ -24,7 +24,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $vars => $ds) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'TLIe' => 'immed',
|
||||
@@ -10,7 +10,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-mysql-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'CTMPDTs' => 'disk tables',
|
||||
@@ -11,7 +11,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
if (is_array($vars)) {
|
||||
|
@@ -4,7 +4,7 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nginx-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'nginx', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'Reading' => array(
|
||||
@@ -26,7 +26,7 @@ $array = array(
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nginx-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'nginx', $app['app_id']));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
$rrd_options .= ' -b 1000 ';
|
||||
$rrd_options .= ' -l 0 ';
|
||||
$rrd_options .= ' DEF:a='.$rrd_filename.':Requests:AVERAGE';
|
||||
|
@@ -9,9 +9,9 @@ $colour_line = 'B3D0DB';
|
||||
$colour_area_max = 'FFEE99';
|
||||
$graph_max = 100;
|
||||
$unit_text = 'Frequency';
|
||||
$ntpclient_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpclient-'.$app['app_id'].'.rrd';
|
||||
$ntpclient_rrd = rrd_name($device['hostname'], array('app', 'ntpclient', $app['app_id']));
|
||||
|
||||
if (is_file($ntpclient_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ntpclient_rrd)) {
|
||||
$rrd_filename = $ntpclient_rrd;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ require 'includes/graphs/common.inc.php';
|
||||
$colours = 'mixed';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Milliseconds';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpclient-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'ntpclient', $app['app_id']));
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
@@ -15,7 +15,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -20,9 +20,9 @@ $colour_area_out = 'FFDD88';
|
||||
$colour_area_in_max = 'CC88CC';
|
||||
$colour_area_out_max = 'FFEFAA';
|
||||
|
||||
$ntpdserver_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$ntpdserver_rrd = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Buffer';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
$array = array(
|
||||
'buffer_recv' => array('descr' => 'Received'),
|
||||
'buffer_used' => array('descr' => 'Used'),
|
||||
@@ -15,7 +15,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -9,9 +9,9 @@ $colour_line = 'B3D0DB';
|
||||
$colour_area_max = 'FFEE99';
|
||||
$graph_max = 100;
|
||||
$unit_text = 'Frequency';
|
||||
$ntpdserver_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$ntpdserver_rrd = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ require 'includes/graphs/common.inc.php';
|
||||
$scale_min = 0;
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Packets';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
$array = array(
|
||||
'packets_drop' => array(
|
||||
'descr' => 'Dropped',
|
||||
@@ -19,7 +19,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -5,7 +5,7 @@ require 'includes/graphs/common.inc.php';
|
||||
$colours = 'mixed';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Milliseconds';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
@@ -15,7 +15,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -9,9 +9,9 @@ $colour_line = '880000';
|
||||
$colour_area_max = 'FFCCCC';
|
||||
$graph_max = 0;
|
||||
$unit_text = 'Stratum';
|
||||
$ntpdserver_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$ntpdserver_rrd = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
|
@@ -11,9 +11,9 @@ $colour_line = '36393D';
|
||||
$colour_area_max = 'FFEE99';
|
||||
$graph_max = 0;
|
||||
$unit_text = 'Seconds';
|
||||
$ntpdserver_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-ntpdserver-'.$app['app_id'].'.rrd';
|
||||
$ntpdserver_rrd = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'red';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Packets/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
$array = array(
|
||||
'corruptPackets' => array(
|
||||
'descr' => 'Corrupt',
|
||||
@@ -24,7 +24,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -9,9 +9,9 @@ $colour_line = 'B3D0DB';
|
||||
$colour_area_max = 'FFEE99';
|
||||
$graph_max = 100;
|
||||
$unit_text = 'Latency';
|
||||
$powerdns_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$powerdns_rrd = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
|
||||
if (is_file($powerdns_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($powerdns_rrd)) {
|
||||
$rrd_filename = $powerdns_rrd;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'blue';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Packets/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
$array = array(
|
||||
'pc_hit' => array(
|
||||
'descr' => 'Hits',
|
||||
@@ -24,7 +24,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Packets/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
$array = array(
|
||||
'q_tcpAnswers' => array(
|
||||
'descr' => 'TCP Answers',
|
||||
@@ -28,7 +28,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$nototal = (($width < 224) ? 1 : 0);
|
||||
$unit_text = 'Packets/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
$array = array(
|
||||
'q_udp4Answers' => array(
|
||||
'descr' => 'UDP4 Answers',
|
||||
@@ -28,7 +28,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$nototal = 0;
|
||||
$unit_text = 'Packets/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
$array = array(
|
||||
'qc_miss' => array(
|
||||
'descr' => 'Misses',
|
||||
@@ -20,7 +20,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -6,7 +6,7 @@ $scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$nototal = 0;
|
||||
$unit_text = 'Packets/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
|
||||
$array = array(
|
||||
'rec_questions' => array(
|
||||
'descr' => 'Questions',
|
||||
@@ -20,7 +20,7 @@ $array = array(
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
|
@@ -20,7 +20,7 @@ require 'includes/graphs/common.inc.php';
|
||||
|
||||
$proxmox_rrd = $config['rrd_dir'].'/proxmox/'.$vars['cluster'].'/'.$vars['vmid'].'_netif_'.$vars['port'].'.rrd';
|
||||
|
||||
if (is_file($proxmox_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($proxmox_rrd)) {
|
||||
$rrd_filename = $proxmox_rrd;
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,6 @@
|
||||
*/
|
||||
|
||||
$rrd = rrd_name($device['hostname'], array('app', 'rrdcached', $app['app_id']));
|
||||
if (is_file($rrd)) {
|
||||
if (rrdtool_check_rrd_exists($rrd)) {
|
||||
$rrd_filename = $rrd;
|
||||
}
|
||||
|
@@ -18,8 +18,7 @@ $colour_line_out = '000099';
|
||||
$colour_area_in = 'CDEB8B';
|
||||
$colour_area_out = 'C3D9FF';
|
||||
|
||||
$rrddir = $config['rrd_dir'].'/'.$device['hostname'];
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : 'unkown');
|
||||
$rrd_filename = $rrddir.'/app-shoutcast-'.$app['app_id'].'-'.$hostname.'.rrd';
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : 'unknown');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], $hostname));
|
||||
|
||||
require 'includes/graphs/generic_data.inc.php';
|
||||
|
@@ -20,30 +20,18 @@ $colour_line_out = '000099';
|
||||
$colour_area_in = 'CDEB8B';
|
||||
$colour_area_out = 'C3D9FF';
|
||||
|
||||
$rrddir = $config['rrd_dir'].'/'.$device['hostname'];
|
||||
$files = array();
|
||||
$i = 0;
|
||||
|
||||
if ($handle = opendir($rrddir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != '.' && $file != '..') {
|
||||
if (stripos($file, 'app-shoutcast-'.$app['app_id']) != false) {
|
||||
array_push($files, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($files as $id => $file) {
|
||||
$hostname = str_ireplace('app-shoutcast-'.$app['app_id'].'-', '', $file);
|
||||
$hostname = str_ireplace('.rrd', '', $hostname);
|
||||
$rrd_list = array();
|
||||
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], '*')));
|
||||
foreach ($rrd_filenames as $file) {
|
||||
$pieces = explode('-', basename($file, '.rrd'));
|
||||
$hostname = end($pieces);
|
||||
list($host, $port) = explode('_', $hostname, 2);
|
||||
$rrd_filenames[] = $rrddir.'/'.$file;
|
||||
$rrd_list[$i]['filename'] = $rrddir.'/'.$file;
|
||||
$rrd_list[$i]['descr'] = $host.':'.$port;
|
||||
$rrd_list[$i]['ds_in'] = $ds_in;
|
||||
$rrd_list[$i]['ds_out'] = $ds_out;
|
||||
$i++;
|
||||
$rrd_list[] = array(
|
||||
'filename' => $file,
|
||||
'descr' => $host.':'.$port,
|
||||
'ds_in' => $ds_in,
|
||||
'ds_out' => $ds_out
|
||||
);
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_multi_bits_separated.inc.php';
|
||||
|
@@ -7,30 +7,17 @@ $unit_text = 'ShoutCast Server';
|
||||
$total_text = 'Total of all ShoutCast Servers';
|
||||
$nototal = 0;
|
||||
|
||||
$rrddir = $config['rrd_dir'].'/'.$device['hostname'];
|
||||
$files = array();
|
||||
$i = 0;
|
||||
$x = 0;
|
||||
|
||||
if ($handle = opendir($rrddir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != '.' && $file != '..') {
|
||||
if (stripos($file, 'app-shoutcast-'.$app['app_id']) !== false) {
|
||||
array_push($files, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($files as $id => $file) {
|
||||
$hostname = str_ireplace('app-shoutcast-'.$app['app_id'].'-', '', $file);
|
||||
$hostname = str_ireplace('.rrd', '', $hostname);
|
||||
$rrd_list = array();
|
||||
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], '*')));
|
||||
foreach ($rrd_filenames as $file) {
|
||||
$pieces = explode('-', basename($file, '.rrd'));
|
||||
$hostname = end($pieces);
|
||||
list($host, $port) = explode('_', $hostname, 2);
|
||||
$rrd_filenames[] = $rrddir.'/'.$file;
|
||||
$rrd_list[$i]['filename'] = $rrddir.'/'.$file;
|
||||
$rrd_list[$i]['descr'] = $host.':'.$port;
|
||||
$rrd_list[$i]['colour'] = $colour;
|
||||
$i++;
|
||||
$rrd_list[] = array(
|
||||
'filename' => $file,
|
||||
'descr' => $host.':'.$port,
|
||||
// 'colour' => $colour
|
||||
);
|
||||
}
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
@@ -1,8 +1,7 @@
|
||||
<?php
|
||||
|
||||
$rrddir = $config['rrd_dir'].'/'.$device['hostname'];
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : 'unkown');
|
||||
$rrd_filename = $rrddir.'/app-shoutcast-'.$app['app_id'].'-'.$hostname.'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], $hostname));
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
|
@@ -30,7 +30,7 @@ $i = 0;
|
||||
$scale_min = 0;
|
||||
$nototal = 1;
|
||||
$unit_text = 'Query/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-tinydns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'tinydns', $app['app_id']));
|
||||
// $array = explode(":","hinfo:rp:sig:key:axfr:total");
|
||||
$array = array(
|
||||
'key',
|
||||
@@ -39,7 +39,7 @@ $array = array(
|
||||
$colours = 'mixed';
|
||||
$rrd_list = array();
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = strtoupper($ds);
|
||||
|
@@ -30,7 +30,7 @@ $i = 0;
|
||||
$scale_min = 0;
|
||||
$nototal = 1;
|
||||
$unit_text = 'Query/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-tinydns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'tinydns', $app['app_id']));
|
||||
$array = array(
|
||||
'notauth',
|
||||
'notimpl',
|
||||
@@ -40,7 +40,7 @@ $array = array(
|
||||
$colours = 'oranges';
|
||||
$rrd_list = array();
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = strtoupper($ds);
|
||||
|
@@ -30,7 +30,7 @@ $i = 0;
|
||||
$scale_min = 0;
|
||||
$nototal = 1;
|
||||
$unit_text = 'Query/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-tinydns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'tinydns', $app['app_id']));
|
||||
$array = array(
|
||||
'other',
|
||||
'hinfo',
|
||||
@@ -40,7 +40,7 @@ $array = array(
|
||||
$colours = 'mixed';
|
||||
$rrd_list = array();
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = strtoupper($ds);
|
||||
|
@@ -30,7 +30,7 @@ $i = 0;
|
||||
$scale_min = 0;
|
||||
$nototal = 1;
|
||||
$unit_text = 'Query/sec';
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-tinydns-'.$app['app_id'].'.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'tinydns', $app['app_id']));
|
||||
// $array = explode(":","hinfo:rp:sig:key:axfr:total");
|
||||
$array = array(
|
||||
'any',
|
||||
@@ -48,7 +48,7 @@ $rrd_list = array();
|
||||
|
||||
$config['graph_colours']['merged'] = array_merge($config['graph_colours']['greens'], $config['graph_colours']['blues']);
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = strtoupper($ds);
|
||||
|
@@ -13,5 +13,5 @@ if ($auth || port_permitted($vp['port_id'])) {
|
||||
$title .= ' :: Port '.generate_port_link($port);
|
||||
$title .= ' :: VP '.$vp['vp_id'];
|
||||
$auth = true;
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$vp['hostname'].'/'.safename('vp-'.$vp['ifIndex'].'-'.$vp['vp_id'].'.rrd');
|
||||
$rrd_filename = rrd_name($vp['hostname'], array('vp', $vp['ifIndex'], $vp['vp_id']));
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cbgp-'.$data['bgpPeerIdentifier'].'.ipv4.multicast.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cbgp', $data['bgpPeerIdentifier'].'.ipv4.multicast'));
|
||||
|
||||
require 'includes/graphs/bgp/prefixes.inc.php';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cbgp-'.$data['bgpPeerIdentifier'].'.ipv4.unicast.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cbgp', $data['bgpPeerIdentifier'].'.ipv4.unicast'));
|
||||
|
||||
require 'includes/graphs/bgp/prefixes.inc.php';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cbgp-'.$data['bgpPeerIdentifier'].'.ipv4.vpn.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cbgp', $data['bgpPeerIdentifier'].'.ipv4.vpn'));
|
||||
|
||||
require 'includes/graphs/bgp/prefixes.inc.php';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cbgp-'.$data['bgpPeerIdentifier'].'.ipv6.multicast.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cbgp', $data['bgpPeerIdentifier'].'.ipv6.multicast'));
|
||||
|
||||
require 'includes/graphs/bgp/prefixes.inc.php';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cbgp-'.$data['bgpPeerIdentifier'].'.ipv6.unicast.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cbgp', $data['bgpPeerIdentifier'].'.ipv6.unicast'));
|
||||
|
||||
require 'includes/graphs/bgp/prefixes.inc.php';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cbgp-'.$data['bgpPeerIdentifier'].'.ipv6.vpn.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cbgp', $data['bgpPeerIdentifier'].'.ipv6.vpn.'));
|
||||
|
||||
require 'includes/graphs/bgp/prefixes.inc.php';
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
$scale_min = '0';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('bgp-'.$data['bgpPeerIdentifier'].'.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('bgp', $data['bgpPeerIdentifier']));
|
||||
|
||||
$ds_in = 'bgpPeerInUpdates';
|
||||
$ds_out = 'bgpPeerOutUpdates';
|
||||
|
@@ -5,7 +5,7 @@ $i = 0;
|
||||
|
||||
foreach ($ports as $port) {
|
||||
$rrd_file = get_port_rrdfile_path ($port['hostname'], $port['port_id']);
|
||||
if (is_file($rrd_file)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_file)) {
|
||||
$rrd_list[$i]['filename'] = $rrd_file;
|
||||
$rrd_list[$i]['descr'] = $port['ifDescr'];
|
||||
$i++;
|
||||
|
@@ -10,5 +10,5 @@ if ($auth && is_numeric($_GET['mod']) && is_numeric($_GET['chan'])) {
|
||||
|
||||
$graph_title = shorthost($device['hostname']).'::'.$entity['entPhysicalName'].'::Fabric'.$_GET['chan'];
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/c6kxbar-'.safename($_GET['mod'].'-'.$_GET['chan'].'.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('c6kxbar', $_GET['mod'], $_GET['chan']));
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ if (is_numeric($vars['id'])) {
|
||||
if (is_numeric($cef['device_id']) && ($auth || device_permitted($cef['device_id']))) {
|
||||
$device = device_by_id_cache($cef['device_id']);
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('cefswitching-'.$cef['entPhysicalIndex'].'-'.$cef['afi'].'-'.$cef['cef_index'].'.rrd');
|
||||
$rrd_filename = rrd_name($device['hostname'], array('cefswitching', $cef['entPhysicalIndex'], $cef['afi'], $cef['cef_index']));
|
||||
|
||||
$title = generate_device_link($device);
|
||||
$title .= ' :: CEF Switching :: '.htmlentities($cef['cef_descr']);
|
||||
|
@@ -8,7 +8,7 @@ $oids = array(
|
||||
);
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($oids as $oid) {
|
||||
$oid = str_replace('dot3Stats', '', $oid);
|
||||
$oid_ds = truncate($oid, 19, '');
|
||||
|
@@ -11,7 +11,7 @@ $descr_type = "'".implode("', '", $config['customers_descr'])."'";
|
||||
|
||||
foreach (dbFetchRows('SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` IN (?) AND `port_descr_descr` = ? AND D.device_id = I.device_id', array(array($descr_type), $vars['id'])) as $port) {
|
||||
$rrd_filename = get_port_rrdfile_path ($port['hostname'], $port['port_id']); // FIXME: Unification OK?
|
||||
if (is_file($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $port['hostname'].'-'.$port['ifDescr'];
|
||||
$rrd_list[$i]['descr_in'] = shorthost($port['hostname']);
|
||||
|
@@ -4,9 +4,9 @@ $scale_min = 0;
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$agent_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/agent.rrd';
|
||||
$agent_rrd = rrd_name($device['hostname'], 'agent');
|
||||
|
||||
if (is_file($agent_rrd)) {
|
||||
if (rrdtool_check_rrd_exists($agent_rrd)) {
|
||||
$rrd_filename = $agent_rrd;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/aruba-controller.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], 'aruba-controller');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Number of APs';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/aruba-controller.rrd';
|
||||
$rrd_filename = rrd_name($device['hostname'], 'aruba-controller');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Clients';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user