mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Security fix: unauthorized access Affects nginx users: Moved php files outside of public html directory (Apache was protected by .htaccess) Affects all users: Some files did not check for authentication and could disclose some info. Better checks before including files from user input * git mv html/includes/ includes/html git mv html/pages/ includes/html/
109 lines
2.3 KiB
PHP
109 lines
2.3 KiB
PHP
<?php
|
|
/*
|
|
* Copyright (C) 2015 Daniel Preussker <f0o@devilcode.org>
|
|
* 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/>.
|
|
*/
|
|
|
|
/*
|
|
* Bind9 Query Graph
|
|
* @author Daniel Preussker <f0o@devilcode.org>
|
|
* @copyright 2015 f0o, LibreNMS
|
|
* @license GPL
|
|
* @package LibreNMS
|
|
* @subpackage Graphs
|
|
*/
|
|
|
|
$unitlen = 10;
|
|
$bigdescrlen = 9;
|
|
$smalldescrlen = 9;
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$unit_text = 'query/sec';
|
|
$colours = 'psychedelic';
|
|
$rrd_list = array();
|
|
|
|
$rrd_filename = rrd_name($device['hostname'], array('app', 'bind', $app['app_id']));
|
|
$array = array(
|
|
'any',
|
|
'a',
|
|
'aaaa',
|
|
'cname',
|
|
'mx',
|
|
'ns',
|
|
'ptr',
|
|
'soa',
|
|
'srv',
|
|
'spf',
|
|
);
|
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
|
foreach ($array as $ds) {
|
|
$rrd_list[]=array(
|
|
'filename' => $rrd_filename,
|
|
'descr' => strtoupper($ds),
|
|
'ds' => $ds,
|
|
);
|
|
}
|
|
} else {
|
|
echo "file missing: $file";
|
|
}
|
|
|
|
$rrd_filename = rrd_name($device['hostname'], array('app', 'bind', $app['app_id'], 'incoming'));
|
|
$array = array(
|
|
'afsdb',
|
|
'apl',
|
|
'caa',
|
|
'cdnskey',
|
|
'cds',
|
|
'cert',
|
|
'dhcid',
|
|
'dlv',
|
|
'dnskey',
|
|
'ds',
|
|
'ipseckey',
|
|
'key',
|
|
'kx',
|
|
'loc',
|
|
'naptr',
|
|
'nsec',
|
|
'nsec3',
|
|
'nsec3param',
|
|
'rrsig',
|
|
'rp',
|
|
'sig',
|
|
'sshfp',
|
|
'ta',
|
|
'tkey',
|
|
'tlsa',
|
|
'tsig',
|
|
'txt',
|
|
'uri',
|
|
'dname',
|
|
'axfr',
|
|
'ixfr',
|
|
'opt',
|
|
);
|
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
|
foreach ($array as $ds) {
|
|
$rrd_list[]=array(
|
|
'filename' => $rrd_filename,
|
|
'descr' => strtoupper($ds),
|
|
'ds' => $ds,
|
|
);
|
|
}
|
|
} else {
|
|
echo "file missing: $file";
|
|
}
|
|
|
|
require 'includes/html/graphs/generic_multi_line.inc.php';
|