Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanVaughan/a86704fab159b5570983e59909e51510 to your computer and use it in GitHub Desktop.
Save IanVaughan/a86704fab159b5570983e59909e51510 to your computer and use it in GitHub Desktop.
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