Only list polling as overdue when it is 20% over the rrd_step value. (#8848)

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 02:53:24 -05:00
committed by Neil Lathwood
parent e151aa94e4
commit 461e7067f3
2 changed files with 7 additions and 3 deletions

View File

@@ -21,7 +21,8 @@ if (isset($searchPhrase) && !empty($searchPhrase)) {
}
if ($vars['type'] == "unpolled") {
$sql .= " AND `last_polled` <= DATE_ADD(NOW(), INTERVAL - 15 minute)";
$overdue = (int)(Config::get('rrd_step', 300) * 1.2);
$sql .= " AND `last_polled` <= DATE_ADD(NOW(), INTERVAL - $overdue SECOND)";
}
if (!isset($sort) || empty($sort)) {