Ad Widget

Collapse

Send UTC or epoch time of event to trigger action script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanessa
    Member
    • Oct 2024
    • 38

    #1

    Send UTC or epoch time of event to trigger action script

    How can pass the equivalent of {EVENT.TIMESTAMP} or similar in zabbix 7.0 to a webhook?

    I need to send a notification via a webhook about when an event occurred in some kind of universal timezone and format.
    {EVENT.TIMESTAMP} would be perfect, but it's not supported by 7.0 LTS.
  • vanessa
    Member
    • Oct 2024
    • 38

    #2
    To make things worse, {EVENT.DATE} and {EVENT.TIME} are different for different users depending on their timezone..

    Comment

    • Blevar
      Member
      • Jan 2025
      • 68

      #3
      Maybe {EVENT.TIMESTAMP} could be of use? This wil ignore timezones and give unix time format.
      You can find more info on macros: https://www.zabbix.com/documentation...ed_by_location

      Comment

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

        #4
        Originally posted by Blevar
        Maybe {EVENT.TIMESTAMP} could be of use? This wil ignore timezones and give unix time format.
        You can find more info on macros: https://www.zabbix.com/documentation...ed_by_location
        As it was mentioned, it does not work in 7.0...

        That webhook is JS? Maybe youcan do some math there based on those date and time values? date to epoch

        Comment


        • vanessa
          vanessa commented
          Editing a comment
          That's what I ended up doing. The issue is that the formatting and timezone of {EVENT.DATE} and {EVENT.TIME} depends on whether it's raining and what not - it's not portable and scalable. These things aren't documented; you'll have to either read the source code or pay for support.
      Working...