Hello!
I am using Zabbix 3.4 with an external tool (Nagios SAP CCMS Plugin) that collects via an external check item specific informations from an SAP system. As the script returns a string I need to preprocess it in order to extract only the required value, for example:
- Script output --> ResponseTime=293msec | ResponseTime=293msec;3000.000000;5000.000000;0;
- Information needed --> 293
The script is collecting and returing data correctly:

This is the item configuration (I've tried both Text and Numeric Unsigned in the Type of Information):

This is the preprocessing (I've tested on regex101 and it seems fine) to remove the data that is not the value. I've created two steps to remove the beggining and the end of the text (substitution
/^ResponseTime=
/msec*.*

When the collector runs the following error occurs:
Item preprocessing step #1 failed: cannot perform regular expression match on value "ResponseTime=3msec | ResponseTime=3msec;3000.000000;5000.000000;0;" of type "string": pattern does not match

Do you have any suggestions or ideas on how could I fix this issue? I'm not sure if the regular expression is wrong or I misunderstood how the preprocessing works. Maybe the is also another way of doing that.
Thanks in advance!
I am using Zabbix 3.4 with an external tool (Nagios SAP CCMS Plugin) that collects via an external check item specific informations from an SAP system. As the script returns a string I need to preprocess it in order to extract only the required value, for example:
- Script output --> ResponseTime=293msec | ResponseTime=293msec;3000.000000;5000.000000;0;
- Information needed --> 293
The script is collecting and returing data correctly:
This is the item configuration (I've tried both Text and Numeric Unsigned in the Type of Information):
This is the preprocessing (I've tested on regex101 and it seems fine) to remove the data that is not the value. I've created two steps to remove the beggining and the end of the text (substitution
/^ResponseTime=
/msec*.*
When the collector runs the following error occurs:
Item preprocessing step #1 failed: cannot perform regular expression match on value "ResponseTime=3msec | ResponseTime=3msec;3000.000000;5000.000000;0;" of type "string": pattern does not match
Do you have any suggestions or ideas on how could I fix this issue? I'm not sure if the regular expression is wrong or I misunderstood how the preprocessing works. Maybe the is also another way of doing that.
Thanks in advance!
Comment