Supported OS
![Mac OS]()
概要
Gearman のメトリクスを収集して、以下のことができます。
- Gearman のパフォーマンスを視覚化できます。
- キューに置かれているタスクまたは実行中のタスクの数を知ることができます。
- Gearman のパフォーマンスをアプリケーションの他の部分と関連付けることができます。
セットアップ
インストール
Gearman チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。
構成
コンテナ化
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
パラメーター | 値 |
---|
<INTEGRATION_NAME> | gearmand |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {"server":"%%host%%", "port":"4730"} |
ログ収集
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml
ファイルでこれを有効にします。
Gearman ログの収集を開始するには、次のコンフィギュレーションブロックを gearmand.d/conf.yaml
ファイルに追加します。
logs:
- type: file
path: /var/log/gearmand.log
source: gearman
path
パラメーターの値を環境に合わせて変更します。使用可能なすべてのコンフィギュレーションオプションについては、gearmand.d/conf.yaml のサンプルを参照してください。
Agent を再起動します。
Kubernetes 環境でのログ収集のための Agent の構成については、Kubernetes のログ収集を参照してください。
検証
Agent の status
サブコマンドを実行し、Checks セクションで gearmand
を探します。
収集データ
メトリクス
| |
---|
gearman.queued (gauge) | The total number of jobs in the queue. Shown as task |
gearman.queued_by_task (gauge) | The number of jobs in the queue by task. Shown as task |
gearman.running (gauge) | The total number of running Gearman jobs. Shown as task |
gearman.running_by_task (gauge) | The number of running Gearman jobs by task. Shown as task |
gearman.unique_tasks (gauge) | The number of all functions registered with Gearman. Shown as task |
gearman.workers (gauge) | The total number of capable Gearman workers. Shown as process |
gearman.workers_by_task (gauge) | The number of capable Gearman workers by task. Shown as process |
イベント
Gearman チェックには、イベントは含まれません。
サービスチェック
gearman.can_connect
Returns CRITICAL
if the Agent check is unable to connect to the monitored Gearman instance. Returns OK
otherwise.
Statuses: ok, critical
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問合せください。