[ZBX-24696] Zabbix Agent Active: Trigger "System time is out of sync" is not working! Created: 2024 Jun 20 Updated: 2024 Jul 16 Resolved: 2024 Jun 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Templates (T) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Andrea Marconi | Assignee: | Alexander Vladishev |
Resolution: | Won't Do | Votes: | 3 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu 22.04 |
Description |
Good morning everyone. I would like to raise a case:
I had a serious problem on a server with the time monitored through an installed and working active agent (6.4): I was not notified about the wrong system time of the Linux server. There is a problem: fuzzytime only works with passive checks! How can we solve this in case an active agent is used to have a working trigger comparable to the passive one “System time is out of sync”? Thank you, |
Comments |
Comment by Dimitri Bellini [ 2024 Jun 20 ] |
Hi ZabbixDev Teams, |
Comment by Denis Rasikhov [ 2024 Jun 28 ] |
Hello! Yes, the fuzzytime() function will only work correctly with passive checks, as stated in documentation. Because of how it works: it compares the value (timestamp) with the timestamp of retrieval of that value. And in case with active agent, since it's the agent that creates the timestamp of the value retrieval, both timestamps will always be the same and even if the agent host time is not in sync, the trigger will never fire. The trigger for active templates was most likely added by mistake and has been removed in If you really need such trigger for active agents, you could come up with something like this: 1. Create dependent item from the "System local time" item, which will store the actual time difference. return Math.abs(Math.floor(Date.now()/1000 - value)); 3. Create a trigger for this metric, for example: min(/template/time.diff,5m)>{$SYSTEM.FUZZYTIME.MAX} Although, after discussing the possible solution with the DEV team, it was decided to leave the fuzzytime trigger only in passive agent templates and avoid using such workarounds. |
Comment by Dimitri Bellini [ 2024 Jun 28 ] |
Hi Denis, However, the decision to remove the trigger from the Zabbix Agent Active template, for me, it's not correct. For me, Zabbix must provide a "good User Experience" without such inconsistency between templates. Please leave the Trigger, maybe using the proposed workaround. Thanks so much |
Comment by Alex Kalimulin [ 2024 Jul 16 ] |
dimitri.bellini, the proposed workaround will work in many cases but not in all. Specifically, if the data send is delayed by some reason one can get very confusing false positives. |
Comment by Dimitri Bellini [ 2024 Jul 16 ] |
Kalimulin Thank you for the reply and I can understand it "but" this Trigger it's very helpful and provide a fast feedback on "Not sync Time". Thanks so much & Good work! |