Supported OS
![Linux]()
To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email [email protected].
概要
このチェックは、Datadog Agent を通じて OctoPrint を監視します。
セットアップ
ホストで実行されている Agent 用にこのチェックをインストールおよび構成する場合は、以下の手順に従ってください。コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照してこの手順を行ってください。
インストール
以下を実行して OctoPrint チェックをホストにインストールするには
sudo -u dd-agent -- datadog-agent integration install datadog-octoprint==<VERSION>
注: このページの一番上に VERSION が記載されています。
ソースからインストール (オプション)
マシンに開発ツールキットをインストールします。
ddev release build octoprint を実行してパッケージをビルドします。
Datadog Agent をダウンロードします。
ビルドの成果物を Agent をインストール済みのホストにアップロードし、以下を実行します。
datadog-agent integration install -w path/to/octoprint/dist/datadog_octoprint*.whl.
構成
OctoPrint の Web インターフェースから、Datadog で使用する API キーを作成します。作成したキーは Settings –> Application Keys に表示されます。
Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの octoprint.d/conf.yaml ファイルを編集します。OctoPrint API キーを octo_api_key の値として貼り付けます。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル octoprint.d/conf.yamlを参照してください。
Agent を再起動します。
検証
Agent の status サブコマンドを実行し、Checks セクションで octoprint を探します。
ログ
デフォルトでは、このインテグレーションは、Raspberry Pi から OctoPrint を実行するように予め構成された OctoPi イメージを使うことを想定しています。
デフォルトでで収集するログ(およびデフォルトの場所)は、次のとおりです。
- OctoPrint アプリログ:
/home/pi/.octoprint/logs - OctoPrint Webcam ログ:
/var/log/webcamd.log - HA プロキシログ:
/var/log/haproxy.log
これらの一部またはすべてを変更したり削除したりするには、インテグレーションの conf.yaml ファイルを変更します。
ログ処理
OctoPrint は独自のログ形式(オブジェクト形式ではない)を使用します。ログを活用するにはパース規則を使用してログ処理パイプラインを作成します。たとえば、
- メインパイプライン: “OctoPrint”
- サブパイプライン 1: “OctoPrint 印刷ジョブ”
- Grok パーサー規則:
OctoPrint_Print_Job %{date("yyyy-MM-dd HH:mm:ss,SSS"):date}\s+-\s+%{notSpace:source}\s+-\s+%{word:level}\s+-\s+Print\s+job\s+%{notSpace:job_status}\s+-\s+%{data::keyvalue(":"," ,")}
- サブパイプライン 2: “一般的な OctoPrint ログ”
- Grok パーサー規則:
General_OctoPrint_Log %{date("yyyy-MM-dd HH:mm:ss,SSS"):date}\s+-\s+%{notSpace:source}\s+-\s+%{word:level}\s+-\s+%{data:message}
詳細については、Datadog ログ処理ドキュメントを参照してください。
収集データ
メトリクス
| |
|---|
octoprint.rpi_core_temp (gauge) | Temp (in C) of Raspberry Pi Core Shown as degree celsius |
octoprint.printer_state (gauge) | Current state of OctoPrint Shown as operation |
octoprint.est_print_time (gauge) | Estimated print time of current job Shown as minute |
octoprint.pct_completed (gauge) | Percentage of current Print job completed Shown as percent |
octoprint.print_job_time (gauge) | Elapsed print time Shown as minute |
octoprint.print_job_time_left (gauge) | Estimated remaining print time Shown as minute |
octoprint.current_tool_temp (gauge) | Temp (in C) of each extruder Shown as degree celsius |
octoprint.target_tool_temp (gauge) | Target Temp (in C) of each extruder Shown as degree celsius |
octoprint.current_bed_temp (gauge) | Temp (in C) of each printer bed Shown as degree celsius |
octoprint.target_bed_temp (gauge) | Target Temp (in C) of each extruder Shown as degree celsius |
イベント
OctoPrint には、イベントは含まれません。
サービスチェック
octoprint.search
CRITICAL if the page can’t be accessed, WARNING if the search string isn’t found, or OK otherwise.
Statuses: ok, warning, critical
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問合せください。