---
title: uWSGI
description: >-
  Collect uWSGI logs in order to track requests per second, bytes served,
  request status, and more.
breadcrumbs: Docs > Integrations > uWSGI
---

# uWSGI
Supported OS 
## Overview{% #overview %}

Collect uWSGI logs in order to track requests per second, bytes served, request status (2xx, 3xx, 4xx, 5xx), service uptime, slowness, and more.

## Setup{% #setup %}

### Installation{% #installation %}

[Install the agent](https://app.datadoghq.com/account/settings/agent/latest) on the instance that runs the uWSGI server.

### Configuration{% #configuration %}

By default uWSGI server logs to stdout. Run the following command to start logging to a file or follow [uWSGI instructions to log to a file](https://uwsgi-docs.readthedocs.io/en/latest/Logging.html#logging-to-files):

```text
uwsgi --socket :3031 --logger file:logfile=/var/log/uwsgi/uwsgi.log,maxsize=2000000
```

Create the `uwsgi.d/conf.yaml` file in the root of your Agent's configuration directory.

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

*Available for Agent versions >6.0*

Collecting logs is disabled by default in the Datadog Agent. Enable it in your `datadog.yaml` file with:

```yaml
logs_enabled: true
```

Then add this configuration block to your `uwsgi.d/conf.yaml` file to start collecting your logs:

```yaml
logs:
    - type: file
      path: /var/log/uwsgi/uwsgi.log
      service: '<MY_APPLICATION>'
      source: uwsgi
```

Finally, [restart the agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-restart-the-agent).

By default the Datadog-uWSGI integration supports the [default uWSGI log format](https://uwsgi-docs.readthedocs.io/en/latest/LogFormat.html#uwsgi-default-logging) and the [Apache-like combined format](https://uwsgi-docs.readthedocs.io/en/latest/LogFormat.html#apache-style-combined-request-logging).

## Troubleshooting{% #troubleshooting %}

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