Files
librenms-librenms/includes/polling/applications/tinydns.inc.php

60 lines
2.4 KiB
PHP
Raw Normal View History

<?php
2015-07-13 20:10:26 +02:00
/*
* 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.
2015-07-13 20:10:26 +02:00
*
* 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.
2015-07-13 20:10:26 +02:00
*
* You should have received a copy of the GNU General Public License
2015-07-13 20:10:26 +02:00
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2015-07-13 20:10:26 +02:00
/*
* TinyDNS Statistics
* @author Daniel Preussker <f0o@devilcode.org>
* @copyright 2015 f0o, LibreNMS
* @license GPL
* @package LibreNMS
* @subpackage Polling
*/
use LibreNMS\RRD\RrdDefinition;
$name = 'tinydns';
$app_id = $app['app_id'];
if (!empty($agent_data['app'][$name]) && $app_id > 0) {
update_application($app, $name);
2016-06-08 21:13:01 -05:00
echo ' tinydns';
$rrd_name = array('app', $name, $app_id);
$rrd_def = RrdDefinition::make()
->addDataset('a', 'COUNTER', 0, 125000000000)
->addDataset('ns', 'COUNTER', 0, 125000000000)
->addDataset('cname', 'COUNTER', 0, 125000000000)
->addDataset('soa', 'COUNTER', 0, 125000000000)
->addDataset('ptr', 'COUNTER', 0, 125000000000)
->addDataset('hinfo', 'COUNTER', 0, 125000000000)
->addDataset('mx', 'COUNTER', 0, 125000000000)
->addDataset('txt', 'COUNTER', 0, 125000000000)
->addDataset('rp', 'COUNTER', 0, 125000000000)
->addDataset('sig', 'COUNTER', 0, 125000000000)
->addDataset('key', 'COUNTER', 0, 125000000000)
->addDataset('aaaa', 'COUNTER', 0, 125000000000)
->addDataset('axfr', 'COUNTER', 0, 125000000000)
->addDataset('any', 'COUNTER', 0, 125000000000)
->addDataset('total', 'COUNTER', 0, 125000000000)
->addDataset('other', 'COUNTER', 0, 125000000000)
->addDataset('notauth', 'COUNTER', 0, 125000000000)
->addDataset('notimpl', 'COUNTER', 0, 125000000000)
->addDataset('badclass', 'COUNTER', 0, 125000000000)
->addDataset('noquery', 'COUNTER', 0, 125000000000);
2015-07-13 20:10:26 +02:00
$tags = compact('name', 'app_id', 'rrd_name', 'rrd_def');
data_update($device, 'app', $tags, $fields);
2015-07-13 20:10:26 +02:00
}//end if