Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone mismatch causes Poller Cluster Health report unhealthy despite working #13416

Open
duhow opened this issue Oct 23, 2021 · 0 comments
Open

Comments

@duhow
Copy link
Contributor

duhow commented Oct 23, 2021

The problem

If MySQL / MariaDB uses a different timezone than the pollers or the main LibreNMS application does, Poller Cluster Health appears in red, as Last CheckIn time "exceeds" the allowed time (UTC -> UTC+2 = 2h exceed last checkin) , despite pollers are actually working and scanning devices properly.

Since MySQL uses NOW(), it will default to Database Timezone.

self._db.query(
"INSERT INTO poller_cluster(node_id, poller_name, poller_version, last_report, master) "
'values("{0}", "{1}", "{2}", NOW(), {3}) '
'ON DUPLICATE KEY UPDATE poller_version="{2}", last_report=NOW(), master={3}; '.format(

Both application and database should be comparing against UTC in order to solve this problem.
Use UTC_TIMESTAMP() function instead of NOW().

Output of ./validate.php

N/A

What was the last working version of LibreNMS?

No response

Anything in the logs that might be useful for us?

No response

dgiron-midokura pushed a commit to midokura/helm-charts-community that referenced this issue Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant