- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Supported OS
このチェックは、Systemd と、Systemd が Datadog Agent を介して管理するユニットを監視します。
Systemd チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。
ホストで実行中の Agent に対してこのチェックを構成するには:
Agent の構成ディレクトリのルートにある conf.d/
フォルダーの systemd.d/conf.yaml
ファイルを編集して、
Systemd パフォーマンスデータの収集を開始します。
使用可能なすべての構成オプションの詳細については、サンプル systemd.d/conf.yaml
を参照してください。
コンテナ環境の場合は、Systemd データの取得に必要なソケット /run/systemd/private
を含む /run/systemd/
フォルダーをマウントする必要があります。たとえば、以下のとおりです。
docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup/:ro \
-v /run/systemd/:/host/run/systemd/:ro \
-e DD_API_KEY=<YOUR_API_KEY> \
datadog/agent:latest
Agent の status サブコマンドを実行
し、Checks セクションの systemd
を探します。
systemd.units_total (gauge) | The total number of units Shown as unit |
systemd.units_loaded_count (gauge) | The number of loaded units Shown as unit |
systemd.units_monitored_count (gauge) | The number of monitored units Shown as unit |
systemd.units_by_state (gauge) | Sum by state to count units Shown as unit |
systemd.unit.monitored (gauge) | Indicates that the unit is monitored (the value is always 1) |
systemd.unit.active (gauge) | Whether the unit is currently in active state |
systemd.unit.loaded (gauge) | Whether the unit is currently in loaded state |
systemd.unit.uptime (gauge) | The unit uptime in seconds since it's activation Shown as second |
systemd.service.cpu_time_consumed (gauge) | The overall cpu consumed by the service in nanoseconds (CPUUsageNSec), requires Systemd configuration CPUAccounting to be enabled and Systemd version >= 220 Shown as nanosecond |
systemd.service.memory_usage (gauge) | The memory currently used by the service in bytes (MemoryCurrent), requires Systemd configuration MemoryAccounting to be enabled Shown as byte |
systemd.service.task_count (gauge) | The current number of tasks in the service (TasksCurrent), requires Systemd configuration TasksAccounting to be enabled Shown as task |
systemd.service.restart_count (gauge) | The number of times the service has been restarted due to Restart= (NRestarts), requires Systemd version >= 235Shown as time |
systemd.socket.connection_accepted_count (gauge) | The number of accepted socket connections (NAccepted) Shown as connection |
systemd.socket.connection_count (gauge) | The current number of socket connections (NConnections) Shown as connection |
systemd.socket.connection_refused_count (gauge) | The total number of refused socket connections (NRefused), requires Systemd version >= 239 Shown as connection |
以下は、対応する構成が有効な場合にのみ報告されるメトリクスです。
systemd.service.cpu_time_consumed
: Systemd 構成 CPUAccounting
を有効にする必要があります。systemd.service.memory_usage
: Systemd 構成 MemoryAccounting
を有効にする必要があります。systemd.service.task_count
: Systemd 構成 TasksAccounting
を有効にする必要があります。以下は、特定バージョンの Systemd でのみ使用できるメトリクスです。
systemd.service.cpu_time_consumed
: Systemd v220 が必要です。systemd.service.restart_count
: Systemd v235 が必要です。systemd.socket.connection_refused_count
: Systemd v239 が必要です。Systemd チェックには、イベントは含まれません。
systemd.can_connect
Returns OK
if Systemd is reachable, CRITICAL
otherwise.
Statuses: ok, critical
systemd.system.state
Returns OK
if Systemd’s system state is running. Returns CRITICAL
if the state is degraded, maintenance, or stopping. Returns UNKNOWN
if the state is initializing, starting, or other.
Statuses: ok, critical, unknown
systemd.unit.state
Returns OK
if the unit active state is active. Returns CRITICAL
if the state is inactive, deactivating, or failed. Returns UNKNOWN
if the state is activating or other.
Statuses: ok, critical, unknown
systemd.unit.substate
Returns OK
CRITICAL
or UNKNOWN
based on the substate of the unit and the user-provided mapping in systemd.d/conf.yaml.
Statuses: ok, critical, unknown
ご不明な点は、Datadog のサポートチーム までお問合せください。