Merge remote-tracking branch 'upstream/master' into rrd-create-remote

This commit is contained in:
Tony Murray
2016-07-26 19:29:11 -05:00
55 changed files with 5762 additions and 162 deletions

View File

@@ -0,0 +1,37 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Operations';
$unitlen = 10;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'fh_lookup' => array('descr' => 'lookup','colour' => '136421',),
'fh_anon' => array('descr' => 'anon','colour' => 'B2C945',),
'fh_ncachedir' => array('descr' => 'ncachedir','colour' => '778D0D',),
'fh_ncachenondir' => array('descr' => 'ncachenondir','colour' => '536400',),
'fh_stale' => array('descr' => 'stale','colour' => '832119',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,34 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Operations';
$unitlen = 10;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'io_read' => array('descr' => 'read','colour' => '2B9220',),
'io_write' => array('descr' => 'write','colour' => 'B0262D',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,36 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'net stats';
$unitlen = 15;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'net_all' => array('descr' => 'total','colour' => '000000',),
'net_udp' => array('descr' => 'udp','colour' => 'AA3F39',),
'net_tcp' => array('descr' => 'tcp','colour' => '2C8437',),
'net_tcpconn' => array('descr' => 'tcp conn','colour' => '576996',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,44 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Cached seconds';
$unitlen = 15;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'ra_size' => array('descr' => 'size','colour' => '091B40',),
'ra_range01' => array('descr' => '0-10','colour' => '8293B3',),
'ra_range02' => array('descr' => '10-20','colour' => '566B95',),
'ra_range03' => array('descr' => '20-30','colour' => '1B315D',),
'ra_range04' => array('descr' => '30-40','colour' => '091B40',),
'ra_range05' => array('descr' => '40-50','colour' => '296F6A',),
'ra_range06' => array('descr' => '50-60','colour' => '498984',),
'ra_range07' => array('descr' => '60-70','colour' => '125651',),
'ra_range08' => array('descr' => '70-80','colour' => '023B37',),
'ra_range09' => array('descr' => '80-90','colour' => '14623A',),
'ra_range10' => array('descr' => '90-100','colour' => '034423',),
'ra_notfound' => array('descr' => 'not found','colour' => '590315',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,35 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Reply cache';
$unitlen = 15;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'rc_hits' => array('descr' => 'hits','colour' => '2B9220',),
'rc_misses' => array('descr' => 'misses','colour' => 'B36326',),
'rc_nocache' => array('descr' => 'nocache','colour' => 'B0262D',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,37 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'RPC Stats';
$unitlen = 15;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'rpc_calls' => array('descr' => 'calls','colour' => '000000',),
'rpc_badcalls' => array('descr' => 'bad calls','colour' => '600604',),
'rpc_badfmt' => array('descr' => 'bad fmt','colour' => '8C201D',),
'rpc_badauth' => array('descr' => 'bad auth','colour' => 'DF7A77',),
'rpc_badclnt' => array('descr' => 'bad clnt','colour' => 'FFB3B1',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,54 @@
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Operations';
$unitlen = 10;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 33;
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-nfs-stats-'.$app['app_id'].'.rrd';
$array = array(
'proc3_null' => array('descr' => 'Null','colour' => '630606',),
'proc3_getattr' => array('descr' => 'Get attributes','colour' => '50C150',),
'proc3_setattr' => array('descr' => 'Set attributes','colour' => '4D65A2',),
'proc3_lookup' => array('descr' => 'Lookup','colour' => '8B64A1',),
'proc3_access' => array('descr' => 'Access','colour' => 'AAAA39',),
'proc3_read' => array('descr' => 'Read','colour' => '308A30',),
'proc3_write' => array('descr' => 'Write','colour' => '457A9A',),
'proc3_create' => array('descr' => 'Create','colour' => '690D87',),
'proc3_mkdir' => array('descr' => 'Make dir','colour' => '3A3478',),
'proc3_mknod' => array('descr' => 'Make nod','colour' => '512E74',),
'proc3_link' => array('descr' => 'Link','colour' => '072A3F',),
'proc3_remove' => array('descr' => 'Remove','colour' => 'F16464',),
'proc3_rmdir' => array('descr' => 'Remove dir','colour' => '57162D',),
'proc3_rename' => array('descr' => 'Rename','colour' => 'A40B62',),
'proc3_readlink' => array('descr' => 'Read link','colour' => '557917',),
'proc3_readdir' => array('descr' => 'Read dir','colour' => 'A3C666',),
'proc3_symlink' => array('descr' => 'Symlink','colour' => '85C490',),
'proc3_readdirplus' => array('descr' => 'Read dir plus','colour' => 'F1F164',),
'proc3_fsstat' => array('descr' => 'FS stat','colour' => 'F1F191',),
'proc3_fsinfo' => array('descr' => 'FS info','colour' => '6E2770',),
'proc3_pathconf' => array('descr' => 'Pathconf','colour' => '993555',),
'proc3_commit' => array('descr' => 'Commit','colour' => '463176',),
);
$i = 0;
if (is_file($rrd_filename)) {
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++;
}
}
else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_v3_multiline.inc.php';

View File

@@ -0,0 +1,30 @@
<?php
/**
* powerdns-recursor.inc.php
*
* -Description-
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
$rrd = rrd_name($device['hostname'], array('app', 'powerdns-recursor', $app['app_id']));
if (is_file($rrd)) {
$rrd_filename = $rrd;
}
$simple_rrd = true;

View File

@@ -0,0 +1,64 @@
<?php
/**
* powerdns-recursor_answers.inc.php
*
* Graph of answers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
include 'powerdns-recursor.inc.php';
$colours = 'oranges';
$unit_text = 'Answers/sec';
$print_total = true;
if (is_file($rrd_filename)) {
$rrd_list = array(
array(
'ds' => 'answers0-1',
'filename' => $rrd_filename,
'descr' => '0-1ms',
),
array(
'ds' => 'answers1-10',
'filename' => $rrd_filename,
'descr' => '1-10ms',
),
array(
'ds' => 'answers10-100',
'filename' => $rrd_filename,
'descr' => '10-100ms',
),
array(
'ds' => 'answers100-1000',
'filename' => $rrd_filename,
'descr' => '100-1000ms',
),
array(
'ds' => 'answers-slow',
'filename' => $rrd_filename,
'descr' => '>1s',
),
);
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_multi.inc.php';

View File

@@ -0,0 +1,65 @@
<?php
/**
* powerdns-recursor_cache_performance.inc.php
*
* -Description-
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
include 'powerdns-recursor.inc.php';
$colours = 'mixed';
$unit_text = 'Packets/sec';
if (is_file($rrd_filename)) {
$rrd_list = array(
array(
'filename' => $rrd_filename,
'ds' => 'cache-hits',
'descr' => 'Query Cache Hits',
'colour' => '297159',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'cache-misses',
'descr' => 'Query Cache Misses',
'colour' => '73AC61',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'packetcache-hits',
'descr' => 'Packet Cache Hits',
'colour' => 'BC7049',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'packetcache-misses',
'descr' => 'Packet Cache Misses',
'colour' => 'C98F45',
'area' => true,
)
);
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_multi_line.inc.php';

View File

@@ -0,0 +1,50 @@
<?php
/**
* powerdns-recursor_cache_size.inc.php
*
* -Description-
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
include 'powerdns-recursor.inc.php';
$colours = 'purples';
$unit_text = 'Entries';
if (is_file($rrd_filename)) {
$rrd_list = array(
array(
'filename' => $rrd_filename,
'ds' => 'cache-entries',
'descr' => 'Query Cache',
'colour' => '202048',
),
array(
'filename' => $rrd_filename,
'ds' => 'packetcache-entries',
'descr' => 'Packet Cache',
'colour' => 'CC7CCC',
)
);
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_multi_line.inc.php';

View File

@@ -0,0 +1,68 @@
<?php
/**
* powerdns-recursor_outqueries.inc.php
*
* -Description-
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
include 'powerdns-recursor.inc.php';
$colours = 'mixed';
$unit_text = 'Queries/sec';
if (is_file($rrd_filename)) {
$rrd_list = array(
array(
'filename' => $rrd_filename,
'ds' => 'all-outqueries',
'descr' => 'Total',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'ipv6-outqueries',
'descr' => 'IPv6',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'tcp-outqueries',
'descr' => 'TCP',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'throttled-out',
'descr' => 'Throttled',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'outgoing-timeouts',
'descr' => 'Timeouts',
'area' => true,
)
);
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_multi_line.inc.php';

View File

@@ -0,0 +1,68 @@
<?php
/**
* powerdns-recursor_questions.inc.php
*
* -Description-
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
include 'powerdns-recursor.inc.php';
$colours = 'mixed';
$unit_text = 'Questions/sec';
if (is_file($rrd_filename)) {
$rrd_list = array(
array(
'filename' => $rrd_filename,
'ds' => 'questions',
'descr' => 'Total Questions',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'ipv6-questions',
'descr' => 'IPv6 Questions',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'tcp-questions',
'descr' => 'TCP Questions',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'over-capacity-drops',
'descr' => 'Over Capacity Drops',
'area' => true,
),
array(
'filename' => $rrd_filename,
'ds' => 'policy-drops',
'descr' => 'Policy Drops',
'area' => true,
)
);
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_multi_line.inc.php';