[ZBXNEXT-457] Support of nanoseconds for history tables Created: 2010 Jul 23 Updated: 2023 Mar 04 Resolved: 2010 Aug 02 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F), Proxy (P), Server (S) |
Affects Version/s: | 2.0.0 |
Fix Version/s: | 2.0.0 |
Type: | Change Request | Priority: | Major |
Reporter: | Alexander Vladishev | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
||||||||||||
Issue Links: |
|
Description |
If the historical information (for example log monitoring) comes very intensively, i.e. some values in a second, macro {ITEM.VALUE}work incorrectly. |
Comments |
Comment by Oleksii Zagorskyi [ 2010 Jul 29 ] |
Alexander, I was testing a nano-second |
Comment by Alexander Vladishev [ 2010 Jul 30 ] |
Windows agents is available in svn://svn.zabbix.com/branches/dev/zbxnext-457 branch. |
Comment by Oleksii Zagorskyi [ 2010 Jul 30 ] |
Bug founded for windows agent. Windows not like nanoseconds IMHO |
Comment by Aleksandrs Saveljevs [ 2010 Jul 30 ] |
Can we add some dummy nanoseconds if the clock+ns pairs turn out to be identical? In the attachment above, if we are about to send several items with clock=1280483969 and ns=711000000, can we change the second ns to 711000001, etc.? We will not get real nanosecond precision anyway. |
Comment by Alexei Vladishev [ 2010 Jul 30 ] |
Good point! |
Comment by Oleksii Zagorskyi [ 2010 Jul 30 ] |
FreeBSD8.0 also not get REAL nanosecond (maybe is normally - i don't now). |
Comment by Alexei Vladishev [ 2010 Jul 30 ] |
Note that not all platforms support nanoseconds. It is a platform specific feature. |
Comment by Alexander Vladishev [ 2010 Jul 30 ] |
Added support nanoseconds for BSD and Linux platforms. Windows later. |
Comment by Alexander Vladishev [ 2010 Jul 30 ] |
r13724 - added support of nanoseconds under Windows. |
Comment by Oleksii Zagorskyi [ 2010 Jul 31 ] |
Tested. Now it seems everything is normal - windows agent generates the 'ns' of 9 digits. FreeBSD 8.0 also - 9 digits. |
Comment by Alexander Vladishev [ 2010 Aug 02 ] |
Added support of nanoseconds in ver. pre2.0 r13742. |
Comment by Oleksii Zagorskyi [ 2012 Jan 29 ] |
Just for record: available in first alpha 1.9.0 |
Comment by Oleksii Zagorskyi [ 2023 Feb 28 ] |
Just an update after ... 11 years Now zabbix server generates nanoseconds consequently with step just 1, not 9 digits as before. If send the same data again, it will generate SQL errors, which is expected in zabbix 6.0 due to primary keys (itemid-clock-ns): 227944:20230228:162907.374 [Z3008] query failed due to primary key constraint: [1062] Duplicate entry '42741-1677593860-1' for key 'history_str.PRIMARY' 227944:20230228:162907.374 skipped 1 duplicates 227944:20230228:162907.374 [Z3008] query failed due to primary key constraint: [1062] Duplicate entry '42741-1677593860-2' for key 'history_str.PRIMARY' 227944:20230228:162907.374 skipped 1 duplicates 227944:20230228:162907.375 [Z3008] query failed due to primary key constraint: [1062] Duplicate entry '42741-1677593860-3' for key 'history_str.PRIMARY' 227944:20230228:162907.375 skipped 1 duplicates 227944:20230228:162907.375 [Z3008] query failed due to primary key constraint: [1062] Duplicate entry '42741-1677593860-4' for key 'history_str.PRIMARY' 227944:20230228:162907.375 skipped 1 duplicates <sasha> This is because of the unique primary keys added in scope of
<zalex_ua> That's right and that's ok. I left the comment as just a note, it might help in future. I had a case where such SQL errors have been logged on a production installation, so we figured out that the same data with timestamps has been sent a few times by mistake. |