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_match
をfalse
で記述しておくことをおすすめします。
説明にも書かれていますが、このオプションが設定されていないと、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で対応させていただきます。
申し訳ありません。