8

Is it possible to send log messages(content in the log message) in Datadog to one of the slack channel? I have tried using the monitors. But there it just provides an alert if log messages exceeds the provided threshold level. I need the exact log message to be sent to the slack channel.

ouflak
  • 2,458
  • 10
  • 44
  • 49

1 Answers1

1

This can now be accomplished by referencing {{log.message}}.

More details are here.

Nunie123
  • 18
  • 1
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 30 '21 at 00:41
  • 2
    this answer is also based on monitors which will post all messages that occurred within a timeframe (let's say 1 minute) as 1 condensed post to slack which is a poor solution. a proper solution needs to post 1 log entry matching a predicate as 1 slack post – hotzen Aug 19 '22 at 14:38
  • It can't if the alert is triggered due to a certain metric in an aggregate number of logs. So if you are dealing with many logs, you should first choose a specific one and then retrieve it. – Berni Mar 27 '23 at 09:23