---
title: Lighttpd
description: Track uptime, bytes served, requests per second, response codes, and more.
breadcrumbs: Docs > Integrations > Lighttpd
---

# Lighttpd
Supported OS Integration version5.4.0


## Overview{% #overview %}

The Agent's lighttpd check tracks uptime, bytes served, requests per second, response codes, and more.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The Lighttpd 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 your Lighttpd servers.

In addition, install `mod_status` on your Lighttpd servers.

### Configuration{% #configuration %}

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

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

1. Edit the `lighttpd.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 lighttpd.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/lighttpd/datadog_checks/lighttpd/data/conf.yaml.example) for all available configuration options:

   ```yaml
   init_config:
   
   instances:
     ## @param lighttpd_status_url - string - required
     ## Status url of your Lighttpd server.
     #
     - lighttpd_status_url: http://localhost/server-status?auto
   ```

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

{% /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>` | `lighttpd`                                                      |
| `<INIT_CONFIG>`      | blank or `{}`                                                   |
| `<INSTANCE_CONFIG>`  | `{"lighttpd_status_url": "http://%%host%%/server-status?auto"}` |

{% /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 `lighttpd.d/conf.yaml` file to start collecting your lighttpd Logs:

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

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

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

### Metrics{% #metrics %}

|  |
|  |
| **lighttpd.connections.state\_handle\_request**(gauge) | [Lighttpd 2 only] The number of active connections in the state of handling the request internally.*Shown as connection*     |
| **lighttpd.connections.state\_keep\_alive**(gauge)     | [Lighttpd 2 only] The number of idle connections.*Shown as connection*                                                       |
| **lighttpd.connections.state\_read\_header**(gauge)    | [Lighttpd 2 only] The number of active connections in the state of reading the http request header.*Shown as connection*     |
| **lighttpd.connections.state\_start**(gauge)           | [Lighttpd 2 only] The number of active connections in the state of initializing the read-idle timer.*Shown as connection*    |
| **lighttpd.connections.state\_write\_response**(gauge) | [Lighttpd 2 only] The number of active connections in the state of writing the response to the network.*Shown as connection* |
| **lighttpd.net.bytes**(gauge)                          | [Lighttpd 1 only] The number of bytes sent and received since start.*Shown as byte*                                          |
| **lighttpd.net.bytes\_in**(rate)                       | [Lighttpd 2 only] The number of bytes received per second.*Shown as byte*                                                    |
| **lighttpd.net.bytes\_in\_avg**(gauge)                 | [Lighttpd 2 only] The average number of bytes received per second since start.*Shown as byte*                                |
| **lighttpd.net.bytes\_in\_avg\_5sec**(gauge)           | [Lighttpd 2 only] The average number of bytes received per second in the past 5 seconds.*Shown as byte*                      |
| **lighttpd.net.bytes\_out**(rate)                      | [Lighttpd 2 only] The number of bytes sent per second.*Shown as byte*                                                        |
| **lighttpd.net.bytes\_out\_avg**(gauge)                | [Lighttpd 2 only] The average number of bytes sent per second since start.*Shown as byte*                                    |
| **lighttpd.net.bytes\_out\_avg\_5sec**(gauge)          | [Lighttpd 2 only] The average number of bytes sent per second in the past 5 seconds.*Shown as byte*                          |
| **lighttpd.net.bytes\_per\_s**(gauge)                  | [Lighttpd 1 only] The number of bytes sent and received per second.*Shown as byte*                                           |
| **lighttpd.net.connections\_avg**(gauge)               | [Lighttpd 2 only] The average number of connections per second since start.*Shown as connection*                             |
| **lighttpd.net.connections\_avg\_5sec**(gauge)         | [Lighttpd 2 only] The average number of connections per second in the past 5 seconds.*Shown as connection*                   |
| **lighttpd.net.connections\_total**(rate)              | [Lighttpd 2 only] The total number of connections per second.*Shown as connection*                                           |
| **lighttpd.net.hits**(gauge)                           | [Lighttpd 1 only] The number of hits since start.*Shown as hit*                                                              |
| **lighttpd.net.request\_per\_s**(gauge)                | [Lighttpd 1 only] The number of requests per second.*Shown as request*                                                       |
| **lighttpd.net.requests\_avg**(gauge)                  | [Lighttpd 2 only] The average number of requests per second since start.*Shown as request*                                   |
| **lighttpd.net.requests\_avg\_5sec**(gauge)            | [Lighttpd 2 only] The average number of requests per second in the past 5 seconds.*Shown as request*                         |
| **lighttpd.net.requests\_total**(rate)                 | [Lighttpd 2 only] The number of requests per second.*Shown as request*                                                       |
| **lighttpd.performance.busy\_servers**(gauge)          | [Lighttpd 1 only] The number of active connections.*Shown as connection*                                                     |
| **lighttpd.performance.idle\_server**(gauge)           | [Lighttpd 1 only] The number of idle connections.*Shown as connection*                                                       |
| **lighttpd.performance.memory\_usage**(gauge)          | [Lighttpd 2 only] The amount of memory used by the server.*Shown as byte*                                                    |
| **lighttpd.performance.uptime**(gauge)                 | [Lighttpd 1 only] The amount of time the server has been up and running.*Shown as second*                                    |
| **lighttpd.response.status\_1xx**(rate)                | [Lighttpd 2 only] The number of 1xx status codes generated per second.*Shown as response*                                    |
| **lighttpd.response.status\_2xx**(rate)                | [Lighttpd 2 only] The number of 2xx status codes generated per second.*Shown as response*                                    |
| **lighttpd.response.status\_3xx**(rate)                | [Lighttpd 2 only] The number of 3xx status codes generated per second.*Shown as response*                                    |
| **lighttpd.response.status\_4xx**(rate)                | [Lighttpd 2 only] The number of 4xx status codes generated per second.*Shown as response*                                    |
| **lighttpd.response.status\_5xx**(rate)                | [Lighttpd 2 only] The number of 5xx status codes generated per second.*Shown as response*                                    |

### Events{% #events %}

The Lighttpd check does not include any events.

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

**lighttpd.can\_connect**

Returns `CRITICAL` if the Agent is unable to connect to and collect metrics from the monitored Lighttpd instance. Returns `OK` otherwise.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

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

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

- [Monitor Lighttpd web server metrics with Datadog](https://www.datadoghq.com/blog/monitor-lighttpd-web-server-metrics)
