Ad Widget

Collapse

Discovery finds only the first occurrence

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

    #1

    Discovery finds only the first occurrence

    For a discovery item, I have a simple Json similar to this:
    Code:
    [{
      "description": "ARM_4.10_1.2",
      "id": "7",
      "name": "ARM_4.10_1.2",
      "url": "/api/v1/kpi/current/sbc/callStats/ipGroup/7"
    },
    {
      "description": "ARM_4.10_3.8",
      "id": "8",
      "name": "ARM_4.10_3.8",
      "url": "/api/v1/kpi/current/sbc/callStats/ipGroup/8"
    },
    {
      "description": "ARM_4.10_2.4",
      "id": "9",
      "name": "ARM_4.10_2.4",
      "url": "/api/v1/kpi/current/sbc/callStats/ipGroup/9"
    }]
    The discovery rule use the following macros:
    Click image for larger version

Name:	image.png
Views:	105
Size:	8.6 KB
ID:	470728

    The Json has multiple items and some have the "ARM *" in the name.
    I added a filter with the following macro:
    Click image for larger version

Name:	image.png
Views:	200
Size:	6.6 KB
ID:	470727
    Code:
    {$IPGROUP.NAME} = ARM
    The issue is that, when the discovery item runs, it only finds the first occurrence, therefore, only one item is created.

    Any thoughts on that?​
    Last edited by markfree; 20-09-2023, 16:57.
  • Answer selected by markfree at 20-09-2023, 17:58.
    markfree
    Senior Member
    • Apr 2019
    • 868

    Found the issue.
    The JSON data had the characters "ARM" with different case.
    I had to use [Aa] in the regular expression.

    Comment

    • markfree
      Senior Member
      • Apr 2019
      • 868

      #2
      Found the issue.
      The JSON data had the characters "ARM" with different case.
      I had to use [Aa] in the regular expression.

      Comment

      Working...