Ad Widget

Collapse

LLD Macros overrides and User macro howto?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jhermsen
    Junior Member
    • Apr 2025
    • 5

    #1

    LLD Macros overrides and User macro howto?

    I'm looking to automate a bit more in the vmware discovery process, but I'm kinda stuck on finding the right approach.

    What I want to achieve is have a vmware discovery for VM's and depending on tags add different templates.
    Some templates have items that need additional setup so I want to use User macro's for that.

    The current situation:
    The discovery has host prototype. I can add User macro's here, but then would have to add also ones for templates not used on the specific hosts.
    Host overrides, managed to get this working based on tags in LLD macros adding the required templates.

    The issue(s):
    1. Host override condition is based on name so not useful to do it based on different prototypes
    2. Host override does not have the option to add User macro's only tags which I cannot seem to use in user macro in the template

    Anyone able to offer workaround or suggest a better solution?

    Thanks,
    John
  • Answer selected by jhermsen at 28-04-2025, 13:29.
    jhermsen
    Junior Member
    • Apr 2025
    • 5

    I found I was making it to difficult for my self.

    Resolved by:
    - Adding the templates with the host override.
    - Adding Discovery within the template to get additional details and values for use in item prototypes.

    Comment

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

      #2
      Disclaimer.. I have not tried this myself
      but vmware discovery has "tags" and "vm_customattributes"... I would assume those are set on vmware side and then returned during discovery.. maybe you can utilize those somehow.. ?

      Comment

      • jhermsen
        Junior Member
        • Apr 2025
        • 5

        #3
        I use tags at the moment, but I want to keep the results as clean as possible and not have to many user macros on the resulting hosts which are not needed.

        The situation I'm in is we have multiple types of application servers with different setups.
        Based on the tags I can add everything like templates using the host overrides.
        But I need application specific user macro's on the resulting hosts for the different applications.
        I could create different discovery setups for all application types, but that would get messy and harder to manage.
        My preference would be if I could use the host override to add user macro's, but that is not possible.
        I can add tags, but can't use that as options within triggers or items (as far as I have been able to figure out).

        Comment

        • jhermsen
          Junior Member
          • Apr 2025
          • 5

          #4
          I found I was making it to difficult for my self.

          Resolved by:
          - Adding the templates with the host override.
          - Adding Discovery within the template to get additional details and values for use in item prototypes.

          Comment

          Working...