I am using Zabbix 2.0.4 to monitor several Java applications. Most values are exported via JMX. One of those exported attributes is a string that is constructed like this: [IP_1],[port_1],[ms_time_1];[IP_2],[port_2],[ms_time_2]; eg:
192.168.105.20,5060,15638;192.168.105.30,5060,9753;
I want to construct a trigger based on the ms_time value for a given IP address. My first problem is: how do I get this value from the string? I have this regexp, which captures the correct number when I test it in several regular expression test tools:
192\.168\.105\.20,[\d]+,([\d]+)
But somehow, this doesn't seem to work in Zabbix. I have tried different versions of the regexp, e.g. using [0-9] or [:digit:] instead of [\d], but to no avail.
My trigger should get active when the ms_time value exceeds 15000, so my whole trigger definition currently looks like this:
{MY_HOST:jmx["com.example:type=Attributes",StringValue].regexp("192\.168\.105\.20,[\d]+,([\d]+)")}>15000
I couldn't find any examples where a regexp was used to extract a value from a string and use that value for further processing.