This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url="http://localhost/api/v0/devices"; | |
$graph_api_token = ''; | |
function hit_api($Url) { | |
global $graph_api_token; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $Url); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Auth-Token: $graph_api_token")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `pollers` (`id` int(11) NOT NULL AUTO_INCREMENT, `poller_name` varchar(255) NOT NULL, `last_polled` datetime NOT NULL, `devices` int(11) NOT NULL, `time_taken` double NOT NULL, KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html/includes/print-menubar.php | |
+ <a href="#"><img src="images/16/clock.png" alt="Performance" width="16" height="16" /> Performance</a> | |
+ <ul class="dropdown-menu scrollable-menu"> | |
+ <li><a href="/performance/tab=pollers/"><img src="images/16/clock_link.png" alt="Pollers" width="16" height="16" /> Pollers</a></li> | |
+ </ul> | |
+ </li> | |
+ <li role="presentation" class="divider"></li> | |
+ <li class="dropdown-submenu"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/poller-wrapper.py b/poller-wrapper.py | |
index 35579cc..9200e42 100755 | |
--- a/poller-wrapper.py | |
+++ b/poller-wrapper.py | |
@@ -74,66 +74,9 @@ db_password = config['db_pass'] | |
db_server = config['db_host'] | |
db_dbname = config['db_name'] | |
-# (c) 2015, GPLv3, Daniel Preussker <f0o@devilcode.org> <<<EOC1 | |
-if 'distributed_poller_group' in config: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/poller.php b/poller.php | |
index 4bee7f6..2a1f348 100755 | |
--- a/poller.php | |
+++ b/poller.php | |
@@ -118,7 +118,7 @@ $poller_end = utime(); $poller_run = $poller_end - $poller_start; $poller_time = | |
if ($polled_devices) | |
{ | |
- dbInsert(array('type' => 'poll', 'doing' => $doing, 'start' => $poller_start, 'duration' => $poller_time, 'devices' => $polled_devices, 'poller' => $config['distributed_poller_name'] ), 'perf_times'); | |
+ dbInsert(array('type' => 'poll', 'doing' => $doing, 'start' => $poller_start, 'duration' => $poller_time, 'devices' => $polled_devices ), 'perf_times'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* LibreNMS | |
* | |
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa> | |
* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$queries = array( | |
'alert_rules'=>'SELECT COUNT(`severity`) AS `total`,`severity` FROM `alert_rules` WHERE `disabled`=0 GROUP BY `severity`', | |
'alert_templates'=>'SELECT COUNT(`id`) AS `total` FROM `alert_templates`', | |
'api_tokens'=>'SELECT COUNT(`id`) AS `total` FROM `api_tokens` WHERE `disabled`=0', | |
'applications'=>'SELECT COUNT(`app_type`) AS `total`,`app_type` FROM `applications` GROUP BY `app_type`', | |
'bgppeer_state'=>'SELECT COUNT(`bgpPeerState`) AS `total`,`bgpPeerState` FROM `bgpPeers` GROUP BY `bgpPeerState`', | |
'bgppeer_status'=>'SELECT COUNT(`bgpPeerAdminStatus`) AS `total`,`bgpPeerAdminStatus` FROM `bgpPeers` GROUP BY `bgpPeerAdminStatus`', | |
'bills'=>'SELECT COUNT(`bill_type`) AS `total`,`bill_type` FROM `bills` GROUP BY `bill_type`', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/html/includes/print-map.inc.php b/html/includes/print-map.inc.php | |
index d096a5c..198c96a 100644 | |
--- a/html/includes/print-map.inc.php | |
+++ b/html/includes/print-map.inc.php | |
@@ -20,35 +20,41 @@ if (!empty($device['hostname'])) { | |
$sql = ' WHERE 1'; | |
} | |
-$sql .= ' AND `local_device_id` != 0 AND `remote_device_id` != 0'; | |
+$sql .= ' AND `local_device_id` != 0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/discovery/processors.inc.php b/includes/discovery/processors.inc.php | |
index bb23e62..f93cbff 100755 | |
--- a/includes/discovery/processors.inc.php | |
+++ b/includes/discovery/processors.inc.php | |
@@ -25,7 +25,7 @@ foreach (dbFetchRows($sql) as $test_processor) | |
if (!$valid['processor'][$processor_type][$processor_index]) | |
{ | |
echo("-"); | |
- dbDelete('Processors', '`processor_id` = ?', array($test_processor['processor_id'])); | |
+ dbDelete('processors', '`processor_id` = ?', array($test_processor['processor_id'])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hit_api($Url) { | |
global $graph_api_token; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $Url); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Auth-Token: $graph_api_token")); | |
curl_setopt($ch, CURLOPT_USERAGENT, "Noc/1.0"); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 10); | |
$output = curl_exec($ch); |
OlderNewer