-
Hi, I'm new here and I'm not sure if I'm posting in the right place or in the right way. Redirections are welcome :) I'm creating an alert to detect if one or more servers are not sending logs. It works fine, but I can't get it to print the fields that I need ("event.created" or any other time field and "host.name") in the email notification. Both fields exist and I can check them through Kibana. This is my code:
What's lacking here? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello! You are in the right place. Flatline alerts trigger on the absence of events. Without an event there is almost no dynamic data available to include in your alert message. I believe you can get counts and a timestamp, perhaps also a query key if used. But that's probably all that is available. |
Beta Was this translation helpful? Give feedback.
-
Hi, @jertel, thanks for the quick reply! I'm not sure I fully understand what you're saying: I've been stopping the event collector to test the alert, and it works fine. I do get an email when a server doesn't send any logs. The problem's that it doesn't show which of the servers is triggering the alert.
Is there a way to show "host.name" changing something in the alert code, or do I need to use other alert type to get this information? I'm a newby to Elasticsearch, so it would be great if you could walk me a bit through it :) Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @jertel, thanks for the explanation. Please re-read my question :):
I need to find a way to know when a server is not sending logs -which I do-, and to see which one is not. I've looked everywhere for the way to get this type of outcome and I don't seem to be able to find it. Thanks again. |
Beta Was this translation helpful? Give feedback.
In your rule replace
host.name
withkey
. Example: