diff --git a/AUTHORS.md b/AUTHORS.md index f2845cd340..cd334a7743 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -204,6 +204,7 @@ LibreNMS contributors: - Svenn D'Hert (svennd) - Dominik Bay (eimann) - Nick Peelman (peelman) +- Patrick Ryon (slashdoom) Observium was written by: - Adam Armstrong diff --git a/html/includes/graphs/application/unbound_cache.inc.php b/html/includes/graphs/application/unbound_cache.inc.php new file mode 100644 index 0000000000..fd1fe1af82 --- /dev/null +++ b/html/includes/graphs/application/unbound_cache.inc.php @@ -0,0 +1,30 @@ + 'Unbound - Queries' + 'unbound_queries' => 'Unbound - Queries', + 'unbound_cache' => 'Unbound - Cache' ); foreach ($graphs as $key => $text) { $graph_type = $key; diff --git a/includes/polling/applications/unbound.inc.php b/includes/polling/applications/unbound.inc.php index 715e4e992d..8395f1f275 100644 --- a/includes/polling/applications/unbound.inc.php +++ b/includes/polling/applications/unbound.inc.php @@ -62,4 +62,18 @@ $fields = array ( ); $tags = compact('name', 'app_id', 'rrd_name', 'rrd_def'); data_update($device, 'app', $tags, $fields); +#Unbound Cache +$rrd_name = array('app', $name,'cache',$app_id); +$rrd_def = RrdDefinition::make() + ->addDataset('queries', 'DERIVE', 0, 125000000000) + ->addDataset('hits', 'DERIVE', 0, 125000000000) + ->addDataset('misses', 'DERIVE', 0, 125000000000); +$fields = array ( + 'queries' => $unbound['total.num.queries'], + 'hits' => $unbound['total.num.cachehits'], + 'misses' => $unbound['total.num.cachemiss'] + ); +$tags = compact('name', 'app_id', 'rrd_name', 'rrd_def'); +data_update($device, 'app', $tags, $fields); + unset($lines , $unbound, $rrd_name, $rrd_def, $fields, $tags);