Hello everyone,
I've been dealing with an issue regarding event tags.
We created this base escenario, very simple, in which an nginx with 3 webservers write the sites messages to the same log, and we creted 1 item which checks the state of the sites giving the following OUTPUT for the item:
(The item works ok)
```
Service boat is down 404 Not Found
Service appletree is online, 200 OK
Service fireplace is down 404 Not Found
```
Then, we have a trigger which checks for value "404", when this value is found then the trigger starts the problem, and here is where we found ourselves in problem, the tag is not working. See image attach (trigger-conf.png)
The trigger is configure like this:

NAME: Service {{ITEM.VALUE}.regsub("((?<=Service\s).*(?=\sis down))","\1")} stopped #THIS WORKS!, the name of the trigger shows up like "Service boat stopped"
Expression: {kaku-template-test:hostcheck.sh["boat appletree fireplace"].regexp("404")}>0 #This works ok
EXPRESSION
MULTIPLE
ALL PROBLEMSIF TAG VALUES MATCH
tag for matching: service
tags:
name: service | value: {{ITEM.VALUE}.regsub("(?<=Service\s).*(?=\sis down+)","\1")} ##THIS DOE NOT WORK!!!
Is the regex incorrect? Why does it work on the name of the trigger?
Can someone please check this, I can't get the trigger events to work properly, and we don' t even know how to use them properly, what's the idea of having the chance of creating multiple tags when you only get to search for one?
Any help will be much appreciate!
Thanks in advance!
I've been dealing with an issue regarding event tags.
We created this base escenario, very simple, in which an nginx with 3 webservers write the sites messages to the same log, and we creted 1 item which checks the state of the sites giving the following OUTPUT for the item:
(The item works ok)
```
Service boat is down 404 Not Found
Service appletree is online, 200 OK
Service fireplace is down 404 Not Found
```
Then, we have a trigger which checks for value "404", when this value is found then the trigger starts the problem, and here is where we found ourselves in problem, the tag is not working. See image attach (trigger-conf.png)
The trigger is configure like this:
NAME: Service {{ITEM.VALUE}.regsub("((?<=Service\s).*(?=\sis down))","\1")} stopped #THIS WORKS!, the name of the trigger shows up like "Service boat stopped"
Expression: {kaku-template-test:hostcheck.sh["boat appletree fireplace"].regexp("404")}>0 #This works ok
EXPRESSION
MULTIPLE
ALL PROBLEMSIF TAG VALUES MATCH
tag for matching: service
tags:
name: service | value: {{ITEM.VALUE}.regsub("(?<=Service\s).*(?=\sis down+)","\1")} ##THIS DOE NOT WORK!!!
Is the regex incorrect? Why does it work on the name of the trigger?
Can someone please check this, I can't get the trigger events to work properly, and we don' t even know how to use them properly, what's the idea of having the chance of creating multiple tags when you only get to search for one?
Any help will be much appreciate!
Thanks in advance!

Comment