Supported OS Linux

インテグレーションバージョン1.0.0

概要

このチェックは、Datadog Agent を通じて OctoPrint を監視します。

計画と使用

ホストで実行されている Agent 用にこのチェックをインストールおよび構成する場合は、以下の手順に従ってください。コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照してこの手順を行ってください。

インフラストラクチャーリスト

以下を実行して OctoPrint チェックをホストにインストールするには

sudo -u dd-agent -- datadog-agent integration install datadog-octoprint==<VERSION>

: このページの一番上に VERSION が記載されています。

ソースからインストール (オプション)

  1. マシンに開発ツールキットをインストールします。

  2. ddev release build octoprint を実行してパッケージをビルドします。

  3. Datadog Agent をダウンロードします

  4. ビルドの成果物を Agent をインストール済みのホストにアップロードし、以下を実行します。 datadog-agent integration install -w path/to/octoprint/dist/datadog_octoprint*.whl.

ブラウザトラブルシューティング

  1. OctoPrint の Web インターフェースから、Datadog で使用する API キーを作成します。作成したキーは Settings –> Application Keys に表示されます。

  2. Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの octoprint.d/conf.yaml ファイルを編集します。OctoPrint API キーを octo_api_key の値として貼り付けます。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル octoprint.d/conf.yamlを参照してください。

  3. 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 は独自のログ形式(オブジェクト形式ではない)を使用します。ログを活用するにはパース規則を使用してログ処理パイプラインを作成します。たとえば、

  1. メインパイプライン: “OctoPrint”
    1. サブパイプライン 1: “OctoPrint 印刷ジョブ”
      1. 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. サブパイプライン 2: “一般的な OctoPrint ログ”
      1. 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 のサポートチームまでお問合せください。