Hello!
I'm using Zabbix 6.0.2 and facing a problem hard to solve.
One item in a host obtains a list of parameters from a device, using a SSH script. The return text is the following:
Once I have this data stored on a item, I create a discovery rule of "dependent" type pointing to this item. This discovery rule has to obtain the ID of each line (first number of the line) using regex, and create one set of discovered itens relative to each line. This regex need to enclose the results in JSON format. The regex on the discovery rule is the following:

Testing it using regex101, the result is exactly the expected. But, on regex101 site, there are the "global" and "multiline" options. I can enable multiline using the "(?m)" modifier, but not global.

I turn the regex JSON result into a macro to be used on the dependent itens, using an LLD macro, and it works well.

Each item prototype is an dependent item (master is the text item of the host), have it's own preprocessing regex in order to extract relevant data to the item.

Everything is working. Items are created with the correct data. My problem is that only the first line of the text data is processed. Only the ID 0.
What I'm doing wrong? What I need to change in order for the discovery rule to go through the other lines?
Thanks in advance,
I'm using Zabbix 6.0.2 and facing a problem hard to solve.
One item in a host obtains a list of parameters from a device, using a SSH script. The return text is the following:
Code:
0 mdisk0 online 0 Pool600Gb 744.2GB online raid5 1 256 tier0_flash no no 1 mdisk3 online 1 Pool800Gb 744.2GB online raid5 1 256 tier0_flash no no 2 mdisk7 online 2 Pool1Tb 1.1TB online raid1 1 256 tier_enterprise no no 3 mdisk1 online 0 Pool600Gb 6.0TB online raid6 2 256 tier_enterprise no no 4 mdisk2 online 0 Pool600Gb 5.4TB online raid6 2 256 tier_enterprise no no 5 mdisk4 online 1 Pool800Gb 9.0TB online raid6 2 256 tier_enterprise no no 6 mdisk5 online 1 Pool800Gb 8.1TB online raid6 2 256 tier_enterprise no no 7 mdisk6 online 1 Pool800Gb 8.1TB online raid6 2 256 tier_enterprise no no
Testing it using regex101, the result is exactly the expected. But, on regex101 site, there are the "global" and "multiline" options. I can enable multiline using the "(?m)" modifier, but not global.
I turn the regex JSON result into a macro to be used on the dependent itens, using an LLD macro, and it works well.
Each item prototype is an dependent item (master is the text item of the host), have it's own preprocessing regex in order to extract relevant data to the item.
Everything is working. Items are created with the correct data. My problem is that only the first line of the text data is processed. Only the ID 0.
What I'm doing wrong? What I need to change in order for the discovery rule to go through the other lines?
Thanks in advance,
Comment