Hello forum,
I am trying to use a regex in preprocessing.
The text ist
and I want to find the two values for "leader", in this example "11" and "12".
I was playing around with regex101.com and got to this regex:
which gives me a Match 1/Group 1 and Match 2/Group 1.
When using output option \1 in Zabbix, I can access the 11 in this example. However using \2 does not give me the 12. I guess I have to access the Match2/Group1 another way.
But as a matter of fact, I am clueless on how this can be achieved, I am no regex king.
Can someone give me a hint?
Thanks!
I am trying to use a regex in preprocessing.
The text ist
Code:
Service Local Status Time in State Distributed Node Status leaderl running (pid 6889) 67d 1h 46m 47s leader: 11; waiting: 0; follower: 2; total: 3 epmd running (pid 6892) 67d 1h 46m 47s status: local-only etcd running (pid 6895) 67d 1h 46m 47s health: green; healthy nodes: 3/3 postgresql running (pid 7346) 67d 1h 44m 18s leader: 12; offline: 0; syncing: 0; synced: 2 elasticsearch running (pid 6962) 67d 1h 46m 47s state: green; nodes online: 3/3 System Local Status Distributed Node Status disks /var/log/chef-backend: OK; /var/opt/chef-backend: OK health: green; healthy nodes: 3/3
I was playing around with regex101.com and got to this regex:
Code:
leader: (.\d?)
When using output option \1 in Zabbix, I can access the 11 in this example. However using \2 does not give me the 12. I guess I have to access the Match2/Group1 another way.
But as a matter of fact, I am clueless on how this can be achieved, I am no regex king.
Can someone give me a hint?
Thanks!
Comment