mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge branch 'master' into thecityofguanyu/add-calix-e5-support
This commit is contained in:
@@ -2,10 +2,7 @@
|
||||
|
||||
> Please read this information carefully.
|
||||
|
||||
[ ] Is your install up to date? [Updating your install](http://docs.librenms.org/General/Updating/)
|
||||
|
||||
[ ] Please include all of the information between the `====================================` section of `./validate.php`.
|
||||
|
||||
[ ] If you would like us to add a new device then please provide the information asked for [here](http://docs.librenms.org/Support/FAQ/#faq20)
|
||||
|
||||
[ ] Please provide as much detail as possible.
|
||||
- [ ] Is your install up to date? [Updating your install](http://docs.librenms.org/General/Updating/)
|
||||
- [ ] Please include all of the information between the `====================================` section of `./validate.php`.
|
||||
- [ ] If you would like us to add a new device then please provide the information asked for [here](http://docs.librenms.org/Support/FAQ/#faq20)
|
||||
- [ ] Please provide as much detail as possible.
|
||||
|
||||
@@ -2,6 +2,5 @@
|
||||
|
||||
> Please read this information carefully.
|
||||
|
||||
[ ] Have you signed the [Contributors agreement](http://docs.librenms.org/General/Contributing/)
|
||||
|
||||
[ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)
|
||||
- [ ] Have you signed the [Contributors agreement](http://docs.librenms.org/General/Contributing/)
|
||||
- [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
!/.editorconfig
|
||||
!/.scrutinizer.yml
|
||||
!/.travis.yml
|
||||
!/.php_cs
|
||||
!/.github/
|
||||
|
||||
# Others #
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
// PHP CS Fixer config file
|
||||
|
||||
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->exclude('html/includes/geshi')
|
||||
->exclude('html/includes/jpgraph')
|
||||
->exclude('html/includes/Slim')
|
||||
->exclude('html/lib')
|
||||
->exclude('lib')
|
||||
->exclude('logs')
|
||||
->exclude('mibs')
|
||||
->exclude('rrd')
|
||||
->in(__DIR__);
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
|
||||
->finder($finder);
|
||||
+16
-10
@@ -1,13 +1,19 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- hhvm
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.3
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.4
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.5
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.6
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 7.0
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: hhvm
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: 7.0
|
||||
- php: hhvm
|
||||
|
||||
@@ -114,6 +114,7 @@ LibreNMS contributors:
|
||||
- Cercel Valentin <crc@nuamchefazi.ro> (crcro)
|
||||
- Ahmed Sajid <ahmed4343@hotmail.com> (ahmedsajid)
|
||||
- Karsten Schmidt <git@guggemand.dk> (guggemand)
|
||||
- Maxence POULAIN <maxence.poulain@eriador.info> (Linutux42)
|
||||
- Florian Beer <fb@42dev.eu> (florianbeer)
|
||||
|
||||
[1]: http://observium.org/ "Observium web site"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[](https://scrutinizer-ci.com/g/librenms/librenms/build-status/master) [](https://scrutinizer-ci.com/g/librenms/librenms/?branch=master) [](https://travis-ci.org/librenms/librenms)
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
|
||||
+19
-15
@@ -37,9 +37,9 @@ if (isset($options['f']) && $options['f'] == 0) {
|
||||
$cmd = array_shift($argv);
|
||||
array_shift($argv);
|
||||
array_unshift($argv, $cmd);
|
||||
$force_add = 1;
|
||||
$force_add = true;
|
||||
} else {
|
||||
$force_add = 0;
|
||||
$force_add = false;
|
||||
}
|
||||
|
||||
$port_assoc_mode = $config['default_port_association_mode'];
|
||||
@@ -49,7 +49,7 @@ if (isset ($options['p'])) {
|
||||
if (! in_array ($port_assoc_mode, $valid_assoc_modes)) {
|
||||
echo "Invalid port association mode '" . $port_assoc_mode . "'\n";
|
||||
echo 'Valid modes: ' . join (', ', $valid_assoc_modes) . "\n";
|
||||
exit(2);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$cmd = array_shift($argv);
|
||||
@@ -115,7 +115,7 @@ if (!empty($argv[1])) {
|
||||
$v3['authalgo'] = $arg;
|
||||
} else {
|
||||
echo 'Invalid argument: '.$arg."\n";
|
||||
exit(2);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ if (!empty($argv[1])) {
|
||||
$v3['cryptoalgo'] = $arg;
|
||||
} else {
|
||||
echo 'Invalid argument: '.$arg."\n";
|
||||
exit(2);
|
||||
exit(1);
|
||||
}
|
||||
}//end while
|
||||
|
||||
@@ -165,16 +165,20 @@ if (!empty($argv[1])) {
|
||||
}
|
||||
}//end if
|
||||
|
||||
$result = addHost($host, $snmpver, $port, $transport, 0, $poller_group, $force_add, $port_assoc_mode);
|
||||
|
||||
if (is_numeric($result)) {
|
||||
$device = device_by_id_cache($result);
|
||||
echo 'Added device '.$device['hostname'].' ('.$result.")\n";
|
||||
try {
|
||||
$device_id = addHost($host, $snmpver, $port, $transport, $poller_group, $force_add, $port_assoc_mode);
|
||||
$device = device_by_id_cache($device_id);
|
||||
echo "Added device {$device['hostname']} ($device_id)\n";
|
||||
exit(0);
|
||||
}
|
||||
else {
|
||||
print $console_color->convert("%rWe couldn't add this device:\n " . $result . "%n\n");
|
||||
exit(1);
|
||||
} catch (HostUnreachableException $e) {
|
||||
print_error($e->getMessage());
|
||||
foreach ($e->getReasons() as $reason) {
|
||||
echo " $reason\n";
|
||||
}
|
||||
exit(2);
|
||||
} catch (Exception $e){
|
||||
print_error($e->getMessage());
|
||||
exit(3);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -197,5 +201,5 @@ if (!empty($argv[1])) {
|
||||
%rRemember to run discovery for the host afterwards.%n
|
||||
'
|
||||
);
|
||||
exit(2);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+11
-2
@@ -28,8 +28,7 @@ if (isset($options['d'])) {
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_reporting', 1);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$debug = false;
|
||||
// ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
@@ -37,6 +36,16 @@ else {
|
||||
// ini_set('error_reporting', 0);
|
||||
}
|
||||
|
||||
if (isset($options['f'])) {
|
||||
$config['noinfluxdb'] = true;
|
||||
}
|
||||
|
||||
if ($config['noinfluxdb'] !== true && $config['influxdb']['enable'] === true) {
|
||||
$influxdb = influxdb_connect();
|
||||
} else {
|
||||
$influxdb = false;
|
||||
}
|
||||
|
||||
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
||||
|
||||
foreach (dbFetchRows('SELECT * FROM `devices` AS D, `services` AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC') as $service) {
|
||||
|
||||
+1
-1
@@ -629,7 +629,7 @@ Output:
|
||||
```text
|
||||
{
|
||||
"status": "ok",
|
||||
"message": "Device localhost.localdomain has been added successfully"
|
||||
"message": "Device localhost.localdomain (57) has been added successfully"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+16
-7
@@ -1,14 +1,23 @@
|
||||
## Updating your install ##
|
||||
|
||||
LibreNMS by default performs updates on a daily basis. This can be disabled
|
||||
by ensuring:
|
||||
|
||||
$config['update'] = 0;
|
||||
|
||||
is no longer commented out. If you would like to perform a manual update
|
||||
then you can do this by running the following command as the librenms user:
|
||||
If you would like to perform a manual update
|
||||
then you can do this by running the following command as the **librenms** user:
|
||||
|
||||
./daily.sh
|
||||
|
||||
This will update both the core LibreNMS files but also update the database
|
||||
structure if updates are available.
|
||||
|
||||
## Configuring the update channel ##
|
||||
LibreNMS follows the master branch on github for daily updates.
|
||||
You can change to the monthly releases by setting:
|
||||
|
||||
$config['update_channel'] == 'release';
|
||||
|
||||
## Disabling automatic updates ##
|
||||
LibreNMS by default performs updates on a daily basis. This can be disabled
|
||||
by ensuring:
|
||||
|
||||
$config['update'] = 0;
|
||||
|
||||
is no longer commented out.
|
||||
@@ -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';
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -289,14 +289,13 @@ function add_device() {
|
||||
$message = "You haven't specified an SNMP version to use";
|
||||
}
|
||||
if (empty($message)) {
|
||||
$result = addHost($hostname, $snmpver, $port, $transport, 1, $poller_group, $force_add);
|
||||
if (is_numeric($result)) {
|
||||
try {
|
||||
$device_id = addHost($hostname, $snmpver, $port, $transport, $poller_group, $force_add);
|
||||
$code = 201;
|
||||
$status = 'ok';
|
||||
$message = "Device $hostname has been added successfully";
|
||||
}
|
||||
else {
|
||||
$message = $result;
|
||||
$message = "Device $hostname ($device_id) has been added successfully";
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 .= ' 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 .= '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: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: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: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 .= '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,47 +2,47 @@
|
||||
|
||||
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(
|
||||
'QCQICe' => array(
|
||||
'descr' => 'Queries in cache',
|
||||
'colour' => '22FF22',
|
||||
),
|
||||
'QCHs' => array(
|
||||
'descr' => 'Cache hits',
|
||||
'colour' => '0022FF',
|
||||
),
|
||||
'QCIs' => array(
|
||||
'descr' => 'Inserts',
|
||||
'colour' => 'FF0000',
|
||||
),
|
||||
'QCNCd' => array(
|
||||
'descr' => 'Not cached',
|
||||
'colour' => '00AAAA',
|
||||
),
|
||||
'QCLMPs' => array(
|
||||
'descr' => 'Low-memory prunes',
|
||||
'colour' => 'FF00FF',
|
||||
),
|
||||
);
|
||||
$array = array(
|
||||
'QCQICe' => array(
|
||||
'descr' => 'Queries in cache',
|
||||
'colour' => '22FF22',
|
||||
),
|
||||
'QCHs' => array(
|
||||
'descr' => 'Cache hits',
|
||||
'colour' => '0022FF',
|
||||
),
|
||||
'QCIs' => array(
|
||||
'descr' => 'Inserts',
|
||||
'colour' => 'FF0000',
|
||||
),
|
||||
'QCNCd' => array(
|
||||
'descr' => 'Not cached',
|
||||
'colour' => '00AAAA',
|
||||
),
|
||||
'QCLMPs' => array(
|
||||
'descr' => 'Low-memory prunes',
|
||||
'colour' => 'FF00FF',
|
||||
),
|
||||
);
|
||||
|
||||
$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);
|
||||
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();
|
||||
$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_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);
|
||||
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();
|
||||
$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_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']));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user