Ad Widget

Collapse

Action with system uptime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arunas G.
    Junior Member
    • Nov 2017
    • 6

    #1

    Action with system uptime

    Hello,

    I need to implement host system uptime in every action email. How to do it?

    Is there a way to do it like with {INVENTORY.OS} macro, or should I add sysUptime>0 in every trigger and use {ITEM.VALUEx} to get system uptime in action?

    Problem started at {EVENT.TIME} on {EVENT.DATE}
    Problem name: {TRIGGER.NAME}
    Host: {HOST.NAME} {HOST.IP}
    Severity: {TRIGGER.SEVERITY}
    Value: {ITEM.VALUE1}
    OS: {INVENTORY.OS1}
    Uptime: {HOST.NAME:sysUptime.last()} <------- Uptime reported as *UNKNOWN*
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Please try use this macro.
    Code:
    {{HOST.HOST}:sysUptime.last()}

    Comment

    • Arunas G.
      Junior Member
      • Nov 2017
      • 6

      #3
      Atsushi - Problem still persist with {{HOST.HOST}:sysUptime.last()} - Email:

      Severity: High
      Value: 8 %
      OS: 8.0.6
      Uptime: *UNKNOWN*

      Comment


      • Atsushi
        Atsushi commented
        Editing a comment
        Are you setting an item whose key value is sysUptime?
        For example, if you are using Template OS Linux, it looks like the following.
        {{HOST.HOST}:system.uptime.last()}
    • Arunas G.
      Junior Member
      • Nov 2017
      • 6

      #4
      Atsushi - Yes, key is sysUptime and it is set up properly:
      HTML Code:
      https://imgur.com/Tq7Jad3
      Last edited by Arunas G.; 17-04-2018, 12:02.

      Comment


      • Atsushi
        Atsushi commented
        Editing a comment
        Please tell me the detailed version of Zabbix you are using.

        Also, have you got the value of the item?
        Please check Monitoring -> Latest Data.
    • BP_Vital
      Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Feb 2016
      • 42

      #5
      Try double brackets:
      Uptime: {{HOST.NAME}:sysUptime.last()}

      And decide either use {HOST.NAME} -Visible host name or {HOST.HOST} - regular host name.
      Last edited by BP_Vital; 17-04-2018, 14:01.

      Comment


      • Arunas G.
        Arunas G. commented
        Editing a comment
        Still sends email with *UNKNOWN*
    • Arunas G.
      Junior Member
      • Nov 2017
      • 6

      #6
      Atsushi - Zabbix 3.4.8. Latest data for item sysUptime:
      System Uptime 2018-04-18 08:39:24 23:55:17 +00:00:53

      Comment


      • Atsushi
        Atsushi commented
        Editing a comment
        Please temporarily raise the debug level and let the log output why the macro can not be expanded.
    Working...