Hi all,
I want to send email from x-pack watcher and content in email varies depending on values. I tried writing if else condition, its not evaluating the condition treating as a text.
Any idea how to do it?
"actions": {
"send_email": {
"email": {
"profile": "standard",
"to": [
"xxxx@gmail.com"
],
"subject": " Alert",
"body": {
"html": "
Hi Team,
Here is comparison report of 'Add To Bag' trends form each source for past 2 hours:
Application | Page | Sourcr | Earlier Count | Latest Count | Trending Up/Down |
---|---|---|---|---|---|
{{App}} | {{page}} | {{src}} | {{earlier}} | {{latest}} | if({{percentage < 0.0}}){{percentage}} |
}
}
}
}
I want to change color of percentage cell to red is less than 0 , to green if greater than zero.
But instead of evaluating the condition if printing as text replace {{percentage}} variable as text like this : -46.75156796093264 < 0.0
Any idea how to tell watcher to evaluate the condition and not to treat as text.