Ad Widget

Collapse

Zabbix LLD problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hakanozanlagan
    Member
    • Nov 2021
    • 35

    #1

    Zabbix LLD problem

    Hello, I am configuring an LLD Macro with the $.data jsonpath query in a json file as below. The $.data query loading the "data_1, data_2, aaa_1, aaa_2" values in the json into the Macro. I need to load only data_1 and data_2 into the macro with using "data" keyword. is there a way to do this?

    [
    {
    "data": "data_1",
    "value": "1"
    },
    {
    "data": "data_2",
    "value": "2"
    },
    {
    "data": "aaa_1",
    "value": "104.0"
    },
    {
    "data": "aaa_2",
    "value": "0.0"
    }
    ]
    Last edited by hakanozanlagan; 01-02-2025, 11:20.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    There is a way!
    Read the documentation carefully and completely…

    Pay attention to the "Filter" section.

    {#DATA}=$.data
    {#DATA} matches ^data_\d+$

    Comment

    • hakanozanlagan
      Member
      • Nov 2021
      • 35

      #3
      Originally posted by Hamardaban
      There is a way!
      Read the documentation carefully and completely…

      Pay attention to the "Filter" section.

      {#DATA}=$.data
      {#DATA} matches ^data_\d+$
      Hello Hamardaban,
      thanks for reply, problem solved.
      I created 2 LLD macro with same query but filtered with different regex.
      Last edited by hakanozanlagan; 02-02-2025, 01:25.

      Comment

      Working...