I'm trying to test out the new v4.2beta2 ZBXNEXT-4087 (LLD preprocessing) feature, using HTTP agent, which could become quite handy.
When on static item, test page data are roughly collected like this (which ain't problem at all, dependent items & preprocessing on the static item are working perfectly):
However, if I try to make it dynamic via the LLD with HTTP agent, and using the new LLD preprocessing feature (ZBXNEXT-4087) with regex, I'm getting only first object "example.Web" out of it.
The LLD rule looks like this:
- "Discovery rule" TAB edited = Name, Type, Key, URL, Follow redirects and Interval
- "Preprocessing" TAB edited = Regular expression:
parameters:
Pattern:
\<tr\>[[:cntrl:]][[:cntrl:]].*\<td\>(.*)\<\/td\>
Output:
[{"{#ITEMNAME}" : "\1"}]
The Pattern works perfectly when being tested, example on the regex101.com.
I got seven matches.
Now I'm wondering, why isn't the LLD processing the other six matches?
Thank you for any advices.
When on static item, test page data are roughly collected like this (which ain't problem at all, dependent items & preprocessing on the static item are working perfectly):
Code:
<span>example.Web</span><table bordercolor="Black" border="2">
<tr>
<th>Description</th>
<th>Result</th>
<th>ResultCode</th>
</tr>
<tr>
<td>example.Web</td>
<td></td>
<td>OK</td>
</tr>
</table>
<span>example.CORE [2019-03-12T10:05:58]</span><table bordercolor="Black" border="2">
<tr>
<th>Description</th>
<th>Result</th>
<th>ResultCode</th>
</tr>
<tr>
<td>example.blah1.blah2.blah3/Something1.Object1</td>
<td>222ms</td>
<td>OK</td>
</tr>
<tr>
<td>example.blah1.blah2/Something2.Object2</td>
<td>521ms</td>
<td>OK</td>
</tr>
<tr>
<td>example.blah1.blah2/Whatever1.Item1</td>
<td>10ms</td>
<td>OK</td>
</tr>
<tr>
<td>example.blah1.blah2/Whatever1.Item2</td>
<td>13ms</td>
<td>OK</td>
</tr>
<tr>
<td>example.blah1.blah2/Whatever1.Item3</td>
<td>15ms</td>
<td>OK</td>
</tr>
<tr>
<td>example.blah1.blah2/Whatever2.Item4</td>
<td>21ms</td>
<td>OK</td>
</tr>
</table>
The LLD rule looks like this:
- "Discovery rule" TAB edited = Name, Type, Key, URL, Follow redirects and Interval
- "Preprocessing" TAB edited = Regular expression:
parameters:
Pattern:
\<tr\>[[:cntrl:]][[:cntrl:]].*\<td\>(.*)\<\/td\>
Output:
[{"{#ITEMNAME}" : "\1"}]
The Pattern works perfectly when being tested, example on the regex101.com.
I got seven matches.
Now I'm wondering, why isn't the LLD processing the other six matches?
Thank you for any advices.