Seperate alret for each logline from loki and send whole log line to slack

Hi

I want to send all the log lines that contain error message in the logline from loki to slack.


I have my logs in the grafana through loki as datasourse, there are only two labels on the log {namespace and pod}. I want to filter all the error logs from the loki datasourse with filter {pod = “something” and linecontains = ‘error’} time range 1min, now i want to send all the error logs to the slack, can i acheive this forwarding of logs to slack through grafana.

Or another functionality i want to implement is to send seperate message to slack for each error detected in log, and to send the whole log line, can we do this in grafana to forward whole log line to slack.

Please first let me know can we achieve this forwarding of error log message to slack using grafana.

And secondly please let me know how to achieve this.

Also if anyone can provide link to documentation relating to fire an alert for each logline and sending whole log message to slack.