Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Datadog grok logstash rules for standard sidekiq logs

Sample:

I, [2020-04-05T20:10:03.013349 #4]  INFO -- : [Paypal::Transactions] jid:39d5996400fa48a, too account_id:3, end_date:2020-04-04T23:59:59Z, page:1

Rules:

sidekiq %{notSpace:log.letter},\s+\[%{date("yyyy-MM-dd'T'HH:mm:ss.SSSSSS"):log.date}\s+#.\]\s+%{word:log.level}\s+--\s+\:\s+\[%{notSpace:sidekiq.job.class}]\s+jid:%{word:sidekiq.job.jid}%{data::keyvalue(":", "", ",")}

Match:

{
  "log": {
    "letter": "I",
    "date": 1586117403013,
    "level": "INFO"
  },
  "sidekiq": {
    "job": {
      "class": "Paypal::Transactions",
      "jid": "39d5996400fa48a"
    }
  },
  "account_id": 3,
  "page": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment