Ad Widget

Collapse

Can I force the timestamp for an item?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ivo Palli
    Junior Member
    • Jul 2021
    • 13

    #1

    Can I force the timestamp for an item?

    Here's my example data

    15:24:30 3509.93
    15:25:30 3128.03
    15:26:30 2932.82
    15:27:30 1742.83
    15:28:30 986.60
    15:29:30 1328.72
    The list goes on a little longer. I want to store these values in an item, however I want the timestamp to be exactly what is provided. Can I force the timestamp in any way?

    If I were to pump this directly into the zabbix MySQL database instead. Would it work then? (This would solve the secondary problem of me needing to overwrite some values). Would Zabbix need some prodding to let it know the data has changed or will it just pick up what it has? Will it process triggers if I sneak the data in through the backdoor?

    Has there been a better way of getting multiple datapoints into Zabbix without doing a for loop with zabbix_send?

    Any insight would be welcome, thanks!
  • Ivo Palli
    Junior Member
    • Jul 2021
    • 13

    #2
    Hey, thanks! Inserting in the DB went ok as well, but I have no expectation that a trigger would work on that method.

    I do run into zabbix_send putting duplicates into the database (the data I have is values from the last 15 minutes, while I run the script every 10 minutes). I solved it by putting a unique index on (itemid,clock). Any reason why this isn't default in the `history` table? Should I put a ticket in the bug tracker to change this?

    Comment

    Working...