---
title: Supervisord
description: Monitor the status, uptime, and number of supervisor-managed processes.
breadcrumbs: Docs > Integrations > Supervisord
---

# Supervisord
Supported OS Integration version4.4.0


## Overview{% #overview %}

This check monitors the uptime, status, and number of processes running under Supervisor.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The Supervisor check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, so you don't need to install anything else on servers where Supervisor is running.

### Configuration{% #configuration %}

#### Prepare supervisord{% #prepare-supervisord %}

The Agent can collect data from Supervisor through a HTTP server or UNIX socket. The Agent collects the same data no matter which collection method you configure.

##### HTTP server{% #http-server %}

Add a block like this to Supervisor's main configuration file (`/etc/supervisor.conf`):

```ini
[inet_http_server]
port=localhost:9001
;username=user  # optional
;password=pass  # optional
```

##### UNIX socket{% #unix-socket %}

Add blocks like these to `/etc/supervisor.conf` (if they're not already there):

```ini
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock

[unix_http_server]
file=/var/run/supervisor.sock
chmod=777
chown=nobody:nogroup
;username=user  # optional
;password=pass  # optional
```

If Supervisor is running as root, make sure `chmod` or `chown` is set so that non-root users, such as `dd-agent`, can read the socket.

Reload `supervisord`.

{% tab title="Host" %}
#### Host{% #host %}

To configure this check for an Agent running on a host:

Edit the `supervisord.d/conf.yaml` file in the `conf.d/` folder at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory). See the [sample supervisord.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/supervisord/datadog_checks/supervisord/data/conf.yaml.example) for all available configuration options:

```yaml
init_config:

instances:
  ## Used to tag service checks and metrics, i.e. supervisor_server:supervisord0
  - name: supervisord0
    host: localhost
    port: 9001
  ## To collect from the socket instead
  # - name: supervisord0
  #   socket: unix:///var/run/supervisor.sock
```

Use the `proc_names` and/or `proc_regex` options to list processes you want the Agent to collect metrics on and create service checks for. If you don't provide either option, the Agent tracks *all* child processes of Supervisor. If you provide both options, the Agent tracks processes from both lists meaning the two options are not mutually exclusive.

See the [example check configuration](https://github.com/DataDog/integrations-core/blob/master/supervisord/datadog_checks/supervisord/data/conf.yaml.example) for comprehensive descriptions of other check options.

[Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent) to start sending Supervisor metrics to Datadog.
{% /tab %}

{% tab title="Containerized" %}
#### Containerized{% #containerized %}

For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations/) for guidance on applying the parameters below.

| Parameter            | Value                                                                                                                      |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `<INTEGRATION_NAME>` | `supervisord`                                                                                                              |
| `<INIT_CONFIG>`      | blank or `{}`                                                                                                              |
| `<INSTANCE_CONFIG>`  | `{"name":"<SUPERVISORD_SERVER_NAME>", "host":"%%host%%", "port":"9001", "username":"<USERNAME>", "password":"<PASSWORD>"}` |

{% /tab %}

#### Log collection{% #log-collection %}

1. Collecting logs is disabled by default in the Datadog Agent, you need to enable it in `datadog.yaml`:

   ```yaml
   logs_enabled: true
   ```

1. Add this configuration block to your `supervisord.d/conf.yaml` file to start collecting your Supervisord Logs:

   ```yaml
   logs:
     - type: file
       path: /path/to/my/directory/file.log
       source: supervisord
   ```

Change the `path` parameter value and configure it for your environment. See the [sample supervisord.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/supervisord/datadog_checks/supervisord/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 `supervisord` under the Checks section.

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

### Metrics{% #metrics %}

|  |
|  |
| **supervisord.process.count**(gauge)  | The number of supervisord monitored processes*Shown as process* |
| **supervisord.process.uptime**(gauge) | The process uptime*Shown as second*                             |

### Events{% #events %}

The Supervisor check does not include any events.

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

**supervisord.can\_connect**

Returns `CRITICAL` if the Agent check is unable to connect to the supervisor daemon. Returns `OK` otherwise.

*Statuses: ok, critical*

**supervisord.process.status**

Returns `CRITICAL` if the process is not running or stopping, `UNKNOWN` if starting or unknown, `OK` otherwise.

*Statuses: ok, critical, unknown*

## Troubleshooting{% #troubleshooting %}

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

## Further Reading{% #further-reading %}

- [Monitor Supervisor with Datadog](https://www.datadoghq.com/blog/supervisor-monitors-your-processes-datadog-monitors-supervisor)
