LoginSignup
4
0

More than 3 years have passed since last update.

Datadog のログを正規表現を使って検索する

Last updated at Posted at 2021-05-11

部分文字列を検索

* を使う。
例えば、 IllegalArgumentException という文字列を含むログを検索したいときは、下記のようにする。

@stack:*IllegalArgumentException*

スペースありの文字列を含む部分文字列を検索

スペースを ? で置き換え、前後に * を付ける。
例えば、Cannot find record という文字列を含むエラーを検索したいときは、下記のようにする。

@stack:*Cannot?find?record*

スラッシュありの文字列を含む部分文字列を検索

/\/ とエスケープして、前後に * を付ける。
例えば、/v1/users という文字列を含むエラーを検索したいときは、下記のようにする。

@stack:*\/v1\/users*
4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0