---
title: Datadog OctoPrint
description: Monitor OctoPrint, a web interface for managing 3d printers
breadcrumbs: Docs > Integrations > Datadog OctoPrint
---

# Datadog OctoPrint
Supported OS 
## Overview{% #overview %}

This check monitors [OctoPrint](https://octoprint.org/) through the Datadog Agent.

## Setup{% #setup %}

Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations/) for guidance on applying these instructions.

### Installation{% #installation %}

To install the OctoPrint check on your host by running:

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

**Note**: The `VERSION` is listed at the top of this page.

#### Install from source (optional){% #install-from-source-optional %}

1. Install the [developer toolkit](https://docs.datadoghq.com/developers/integrations/python/) on any machine.

1. Run `ddev release build octoprint` to build the package.

1. [Download the Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest).

1. Upload the build artifact to any host with an Agent and run `datadog-agent integration install -w path/to/octoprint/dist/datadog_octoprint*.whl`.

### Configuration{% #configuration %}

1. From the OctoPrint web interface, create an API key for use with Datadog. This can be found within Settings –> Application Keys.

1. Edit the `octoprint.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory. Paste the OctoPrint API key as the value for `octo_api_key`. See the [sample octoprint.d/conf.yaml](https://github.com/DataDog/integrations-extras/blob/master/octoprint/datadog_checks/octoprint/data/conf.yaml.example) for all available configuration options.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent).

### Validation{% #validation %}

[Run the Agent's status subcommand](https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information) and look for `octoprint` under the Checks section.

### Logs{% #logs %}

By default this integration assumes that you are using the [OctoPi](https://octoprint.org/download/) image that is pre-configured to run OctoPrint from a Raspberry Pi.

The logs that it collects by default (and their default locations) are:

- OctoPrint App log: `/home/pi/.octoprint/logs`
- OctoPrint Webcam log: `/var/log/webcamd.log`
- HA Proxy log: `/var/log/haproxy.log`

Any or all of these may be changed or removed by modifying the integration's `conf.yaml` file.

#### Log processing{% #log-processing %}

OctoPrint uses its own log format (not an object format). To make use of the logs, create a log processing pipeline with some parsing rules, for example:

1. Main Pipeline: "OctoPrint"
   1. Sub Pipeline 1: "OctoPrint Print Job"
      1. Grok parser rule:
         - `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(":"," ,")}`
   1. Sub Pipeline 2: "General OctoPrint Log"
      1. Grok parser rule:
         - `General_OctoPrint_Log %{date("yyyy-MM-dd HH:mm:ss,SSS"):date}\s+-\s+%{notSpace:source}\s+-\s+%{word:level}\s+-\s+%{data:message}`

For more information, see the [Datadog Log Processing documentation](https://docs.datadoghq.com/logs/processing/).

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **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* |

### Events{% #events %}

OctoPrint does not include any events.

### Service Checks{% #service-checks %}

**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*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
