I'm trying to extract part of value from "log" type item as value for dependent item with regex.
Source values are complex string and I'm triyng to extract from them only some part as float value. Values should be extracted only from that strings which correspond regex pattern.
Problem is that for strings that do not correspond regex zabbix server puts to log a lot of messages like this:
This happens only for strings that aren't correspond to regex, whilst those values that correspond to regex added successfully. Also dependent item stays marked as not supported.
Next are regex expression:
and sample source strings:
Only last field should extracted as value into dependend item and only from that strings which contains Authenticate word.
My question - is I'm on right way for decide this task? May be using of dependent items and preprocessing with regex aren't intended for this task?
Or may I should change some in my item definitions?
Any advice is velcome.
Source values are complex string and I'm triyng to extract from them only some part as float value. Values should be extracted only from that strings which correspond regex pattern.
Problem is that for strings that do not correspond regex zabbix server puts to log a lot of messages like this:
Code:
changed: Item preprocessing step #1 failed: cannot perform regular expression match on value "******" of type "string": pattern does not match
Next are regex expression:
Code:
^.*\s[[:alnum:]]+:[[:alnum:]]+:\s+Authenticate\s+#[0-9]+\s+([[:digit:]]+\.[[:digit:]]+)$
Code:
Dec 12 17:15:23 877528832:14b2e6: GetXXXXInfo #0 0.012805 Dec 12 17:15:23 869136128:14b2e4: GetXXXXInfo #0 0.009473 Dec 12 17:15:23 877528832:14b2e2: GetXXXXInfo #0 0.011441 Dec 12 17:15:23 877528832:14b2d7: Authenticate #0 0.639479 Dec 12 17:15:23 869136128:14b2e1: ChangeXXXXInfo #0 0.007684 Dec 12 17:15:23 869136128:14b2e0: GetXXXXInfo #0 0.007750 Dec 12 17:15:23 869136128:14b2df: GetXXXXInfo #0 0.008042 Dec 12 17:15:23 869136128:14b2de: GetXXXXInfo #0 0.012597 Dec 12 17:15:23 869136128:14b2da: GetXXXXInfo #0 0.013268 Dec 12 17:15:23 860743424:14b2d9: GetXXXXInfo #0 0.022908 Dec 12 17:15:23 869136128:14b2d8: GetXXXXInfo #0 0.039698 Dec 12 17:15:22 877528832:14b2d6: GetXXXXInfo #0 0.010486 Dec 12 17:15:22 877528832:14b2c1: Authenticate #0 0.641668 Dec 12 17:15:22 860743424:14b2d5: GetXXXXInfo #0 0.009540 Dec 12 17:15:22 869136128:14b2d4: INTXXXXPrepare #0 0.012958
My question - is I'm on right way for decide this task? May be using of dependent items and preprocessing with regex aren't intended for this task?
Or may I should change some in my item definitions?
Any advice is velcome.