Hi all !
I am trying to do some "partial" preprocessing on a numeric item. By partial i meen that i want to replace one value and maintain all possible others.
It concerns monitoring speed of network interfaces : via snmp 10Gb speed returns 4294967295.
My preprocessing regex is working for 4294967295 (4.29Gbps becomes 10Gbps) but i get an error message for other values. The point is that this item is used in a discovery rule for 10Gb, 1G, 100M (and under speed) interfaces.
Here is my regex :
Step1
param : (.*)
output : \1:4294967295=10000000000
Step2
param : (4294967295)(?=.*:\1=(\d*))
output : \2
Is it possible to use special characters in order not to have to define all possible values that have to be maintenained by the regex ?
Thanks in advance for reading me. Not working for the next 2 days I will read answers and reply on Monday.
Best regards.
Mickael
I am trying to do some "partial" preprocessing on a numeric item. By partial i meen that i want to replace one value and maintain all possible others.
It concerns monitoring speed of network interfaces : via snmp 10Gb speed returns 4294967295.
My preprocessing regex is working for 4294967295 (4.29Gbps becomes 10Gbps) but i get an error message for other values. The point is that this item is used in a discovery rule for 10Gb, 1G, 100M (and under speed) interfaces.
Here is my regex :
Step1
param : (.*)
output : \1:4294967295=10000000000
Step2
param : (4294967295)(?=.*:\1=(\d*))
output : \2
Is it possible to use special characters in order not to have to define all possible values that have to be maintenained by the regex ?
Thanks in advance for reading me. Not working for the next 2 days I will read answers and reply on Monday.
Best regards.
Mickael
Comment