Ad Widget

Collapse

Item prototype name changing with Overrides

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #1

    Item prototype name changing with Overrides

    With LLD Overrides, I thought of changing item prototype names whenever an LLD macro matches a Regex.
    But I just can't see a way to do so.

    Is there a way?
  • Answer selected by markfree at 15-07-2022, 03:00.
    Semiadmin
    Senior Member
    • Oct 2014
    • 1625

    It's possible if you may slightly change an item prototype key also.
    Just create several similar item prototypes with different names, keys and empty "discover" checkbox. After that you may turn on needed item prototype for each case via overrides.

    Comment

    • Semiadmin
      Senior Member
      • Oct 2014
      • 1625

      #2
      It's possible if you may slightly change an item prototype key also.
      Just create several similar item prototypes with different names, keys and empty "discover" checkbox. After that you may turn on needed item prototype for each case via overrides.

      Comment

      • Semiadmin
        Senior Member
        • Oct 2014
        • 1625

        #3
        Another way: in JS preprocessing add a new LLD macro to LLD JSON with different value for each case and use this macro as a part of prototype name.
        Last edited by Semiadmin; 13-07-2022, 22:18.

        Comment


        • markfree
          markfree commented
          Editing a comment
          Oh JSONPath again! :-( I'll try that.
      • markfree
        Senior Member
        • Apr 2019
        • 868

        #4
        Originally posted by Semiadmin
        It's possible if you may slightly change an item prototype key also.
        Just create several similar item prototypes with different names, keys and empty "discover" checkbox. After that you may turn on needed item prototype for each case via overrides.
        I tried messing up with JSON but I ended up having to double the item prototypes and macros. What a mess.
        Then, I tried adding just one more item with key changes and added a few override steps.
        Click image for larger version

Name:	log_override.png
Views:	881
Size:	29.6 KB
ID:	447959

        That worked like magic! Great Semiadmin
        Last edited by markfree; 15-07-2022, 02:59.

        Comment

        Working...