New python service for poller, discovery + more (#8455)

Currently has a file handle leak (and will eventually run out of handles) related to the self update process.

Either need to fix that or rip out self-update and leave that up to cron or something.


DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
Tony Murray
2018-06-30 06:19:49 -05:00
committed by Neil Lathwood
parent 461e7067f3
commit 0ba76e6d62
27 changed files with 1903 additions and 227 deletions

View File

@@ -125,7 +125,7 @@ if (!empty($config['distributed_poller_group'])) {
global $device;
foreach (dbFetch("SELECT * FROM `devices` WHERE disabled = 0 AND snmp_disable = 0 $where ORDER BY device_id DESC", $sqlparams) as $device) {
discover_device($device, $options);
$discovered_devices += discover_device($device, $options);
}
$end = microtime(true);
@@ -152,3 +152,8 @@ if (!isset($options['q'])) {
}
logfile($string);
if ($discovered_devices == 0) {
# No discoverable devices, either down or disabled
exit(5);
}