Ad Widget

Collapse

Change epoch time in notification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #1

    Change epoch time in notification

    Using zabbix 6.0 lts
    With {?last(/myHost/script.error)}
    I get the epoch time in my notification email. The reason for using epoch at item level is for the calculations I do for other triggers.
    In latest data I can see the 'normal' time because of the unixtime units.
    Is there some way to get the epoch time into more human readable format in the notification? Or maybe the timestamp when the entries was made? The Timestamp in zabbix is also fine because my notification doesn't depend on seconds
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    {ITEM.VALUE} and {ITEM.LASTVALUE} ?

    Comment

    • Brambo
      Senior Member
      • Jul 2023
      • 245

      #3
      No those result in data from the Item which triggers the notification rule. The epoch value is stored in a different item.
      For now i created and secondary text item where I push the same time in readable format. Not the nicest way but it is workable.​

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        Use the other item in trigger calculation also. In a way its always true and does not affect whole calculation. ie "and item2>0" or something... then refer to it via {ITEM.VALUE2}. An old trick, how to use values of other items in trigger names etc

        Comment

        Working...