I’m trying to use Loki to detect specific log messages in my collection of syslog data, and report these messages via a webhook if they match a specific text.
I have a hard time figuring out how to write a alert rule and a notification for this. I can detect if there are any of these specific these messages:
count_over_time({job="networking"} |= "abcdefghijklmnopqrst"[10s]) or vector(0)
But if I then dump all data via a webhook, the value is the number of messages found of course, not the exact message lines. If I don’t use the ‘count_over_time’ function, I can’t determine if any matching lines are found.
Due to my inexperience with loki I’m probably missing something, but I wasn’t able to figure it out reading the docs. Any help would be appreciated.