No unpolled devices, yet get "15 minute" warning

I’m tearing my hair out - I have no unpolled devices, yet I can’t get rid of the “Unpolled devices” message. My validate is perfectly fine and up to date, I use rrdcached and my pollers appear to be polling correctly.

I am at a loss as what else to include that wouldn’t waste your time - my validate is fine, I use rrdcached, and my device poll times seem good.

Thank you for reading my post.

MariaDB [librenms]> SELECT COUNT(*) FROM `devices` WHERE `last_polled` <= DATE_ADD(NOW(), INTERVAL - 15 minute) AND `ignore` = 0 AND `disabled` = 0 AND status = 1;
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

Well, that’s not it, even 5 minutes is in the single digits. Any next step troubleshooting hints greatly appreciated, thank you.

            $warn_sec = Config::get('rrd.step', 300) * 3;
            if (Device::isUp()->where('last_polled', '<=', Carbon::now()->subSeconds($warn_sec))->exists()) {
                $warn_min = $warn_sec / 60; 
                Toastr::warning('It appears as though you have some devices that haven\'t completed polling within the last ' . $warn_min . ' minutes, you may want to check that out :)', 'Devices unpolled');
            }

That appears to be right, I’m not sure why it isn’t working.

How long have you been experiencing this?

Sounds like somewhere the time isn’t correct, worth checking time across mysql / php / system, try run this in sql e.g

SELECT NOW();

Can you show the validate.php output too

Can only be apache php - that’s why SQL was still correct. That indeed were a stupid mistake, thanks much Chas.

For those who arrive here by means of Google, make sure your timezone is right in your ini files. Ubuntu, for instance:
/etc/php/7.2/apache2/php.ini
/etc/php/7.2/cli/php.ini

A php --ini will giv you a good idea where that file may be, change cli to apache2 and you can check there or for nginx.

Run ‘date’ from command line - should be right, if it isn’t, google it for your distro.

mysql can be checked as Chas says, but I think you have to try pretty hard to screw that up by changing my.sql or something.

1 Like