Ad Widget

Collapse

HOSTNAME in a tag Service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fcddvd
    Junior Member
    • Aug 2024
    • 3

    #1

    HOSTNAME in a tag Service

    Hi,

    I want to add a tag to the triggers generated by the "Windows services discovery" discovery rule in the Windows services by Zabbix agent template. I need to get the name of the server.

    I have tried adding a tag with the name {#SERVICE.NAME} and value {HOST.NAME} , the name {#SERVICE.NAME} is OK but the value {HOST.NAME} don't works. It stays with the value {HOST.NAME}.

    Do you have a solution to get the hostname in a tag ?

    Thanks.
  • t00m1G
    Junior Member
    • Jan 2024
    • 26

    #2
    Hey,

    Did you saw part of documentation which is about Tagging? https://www.zabbix.com/documentation...config/tagging
    You want to add this to Trigger prototype named : "{#SERVICE.NAME}" ({#SERVICE.DISPLAYNAME}) is not running" ?

    Comment

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

      #3
      Global macros like {HOST.NAME} will be expanded during event creation. So even if after discovery you see {HOST.NAME} in trigger config and tag value, it should be expanded only when this trigger fires...

      Comment

      • fcddvd
        Junior Member
        • Aug 2024
        • 3

        #4
        Hi,

        Indeed, {HOST.NAME} take the right value when trigger fires ...

        Thanks.a lot.

        Comment

        Working...