1<?php 2/* 3 Copyright (C) 2015 Daniel Preussker <f0o@devilcode.org> 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 18/* 19 * TinyDNS Error Graph 20 * @author Daniel Preussker <f0o@devilcode.org> 21 * @copyright 2015 f0o, LibreNMS 22 * @license GPL 23 * @package LibreNMS 24 * @subpackage Graphs 25 */ 26 27require 'includes/html/graphs/common.inc.php'; 28 29$i = 0; 30$scale_min = 0; 31$nototal = 1; 32$unit_text = 'Query/sec'; 33$rrd_filename = Rrd::name($device['hostname'], ['app', 'tinydns', $app['app_id']]); 34$array = [ 35 'notauth', 36 'notimpl', 37 'badclass', 38 'noquery', 39]; 40$colours = 'oranges'; 41$rrd_list = []; 42 43if (Rrd::checkRrdExists($rrd_filename)) { 44 foreach ($array as $ds) { 45 $rrd_list[$i]['filename'] = $rrd_filename; 46 $rrd_list[$i]['descr'] = strtoupper($ds); 47 $rrd_list[$i]['ds'] = $ds; 48 $i++; 49 } 50} else { 51 echo "file missing: $file"; 52} 53 54require 'includes/html/graphs/generic_multi_simplex_seperated.inc.php'; 55