LoginSignup
18
12

More than 5 years have passed since last update.

DatadogのProcess Checkを使う際の注意点

Last updated at Posted at 2015-09-01

Datadogが提供するProcess Checkは非常に強力です、サーバー内で動作しているProcessの状況をメトリクスとして集めてくれるます。しかしながら、yamlを設定する際に注意して欲しい点があります。

まず、サンプルyamlのオプションの部分を見てください。

#  - name: (required) STRING. It will be used to uniquely identify your metrics as they will be tagged with this name
#    search_string: (required) LIST OF STRINGS. If one of the elements in the list matches,
#                    return the counter of all the processes that contain the string
#    exact_match: (optional) Boolean. Default to True, if you want to look for an arbitrary
#                 string, use exact_match: False
#    cpu_check_interval: (optional) CPU percent check interval: 0.1 - 1.0 sec.
#    ignore_denied_access: (optional) Boolean. Default to True, when getting the number of files descriptors, dd-agent user might
#    get a denied access. Set this to true to not issue a warning if that happens.
#    thresholds: (optional) Two ranges: critical and warning
#         warning: (optional) List of two values: If the number of processes found is below the first value or
#                  above the second one, the process check will return WARNING.
#         critical: (optional) List of two values: If the number of processes found is below the first value or
#                   above the second one, the process check will return CRITICAL.
#     In this example, process check will return OK for 3 to 5 process. WARNING for 1, 2, 6, 7 processes and Critical below 1 or above 7.
#     CRITICAL is always dominant in case of overlapping.

この中の、 exact_matchfalseで記述しておくことをおすすめします。

説明にも書かれていますが、このオプションが設定されていないと、search_stringに記述した文字列に完全一致したprocessを抜き出してきます。search_stringとその前後に文字列がある場合、それらのprocessは検索結果に含まれません。

Process checkを設定してみて、実際にprocessが実行されているのに検索している結果が0出ている場合は、yaml設定ファイルにexact_match: Falseを設定してみてください。

記述例:

  - name: postgres
    search_string: ['postgres']
    ignore_denied_access: True
    exact_match: False    

ドキュメントのアップデートが完了するまでは、Qiitaで対応させていただきます。
申し訳ありません。

18
12
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
18
12