i need to query date and time in zabbix server. which table exactly stores these 2 parameters?

Actually there is a table named history and there are two fields in that table named "clock" and "ns", but their formats is too odd and i cannot extract date/time from them. (also i dont know what "ns" means)

for i.e the formats are ---> "clock": "1351090996" and "ns": "563157632"


  • what do you mean with "i need to query date and time in zabbix server" ? date and time of what ? – Richlv Jun 27 '16 at 11:53
  • I write a program in c# and I use some sql queries in my codes in order to fetch some data from zabbix DB. In zabbix front-end u can select which date/time to give u a graph. so I want to do same things in my c# code not a front-end but i dont know which table should i select from! – samiranapper Jun 27 '16 at 13:50

Based on your comment, you want to retrieve historical data. You should query history/history_uint/history_str/history_text/history_log tables depending on the data type item receives.

  • clock is Unix timestamp.
  • ns is nanoseconds in that second. You can probably ignore it.
  • same as my previous post, u solve my problem. thanks ;) so I should convert unix timestamp in my c# code. – samiranapper Jun 27 '16 at 15:13

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.