Ad Widget

Collapse

Using INVENTORY.SERIALNO.A as a macro in the name of the trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobf
    Junior Member
    • Feb 2021
    • 6

    #1

    Using INVENTORY.SERIALNO.A as a macro in the name of the trigger

    Hi. I'm trying to standardise the triggers being generated so they always contain the serial number of the host. I've been able to do it using a custom script and putting the serial number in that but since the value is in the inventory for each of the hosts I thought I could get the value automatically (one thing less to remember). I'm trying "{$SHORT_NAME}: S/N-{INVENTORY.SERIALNO.A}: Zabbix not active" is the name of the trigger but unfortunately all I get is "{INVENTORY.SERIALNO.A}" and not its contents but ($SHORT_NAME} works as expected. I'm using Zabbix 5.2.5 Anyone have an idea of what I may be doing wrong (or a work around) or is it just not possible and I have to use my original approach ? Thanks in advance. Bob
  • bobf
    Junior Member
    • Feb 2021
    • 6

    #2
    Thanks cyber. I thought it was something like that. Just hoping there may have been an alternative but looks like not so I'll stick to my original approach. Thanks again

    Comment

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

      #3
      Not all macros are usable everywhere...

      {INVENTORY.SERIALNO.A}
      → Trigger-based notifications and commands
      → Problem update notifications and commands
      → Internal notifications
      → Tag names and values
      → Map element labels, map URL names and values
      Do you see here "Trigger name"? No... so you cannot use it there.

      {$SHORT_NAME} is your own "user macro", which can be used in Trigger name

      Comment

      Working...