---
title: OpenStack (legacy)
description: Track hypervisor and VM-level resource usage, plus Neutron metrics.
breadcrumbs: Docs > Integrations > OpenStack (legacy)
---

# OpenStack (legacy)
Supported OS Integration version4.3.0


## Overview{% #overview %}

**Note**: This integration only applies to OpenStack v12 and below. If you are looking to collect metrics from OpenStack v13+, use the [OpenStack Controller integration](https://docs.datadoghq.com/integrations/openstack_controller).

Get metrics from OpenStack service in real time to:

- Visualize and monitor OpenStack states.
- Be notified about OpenStack failovers and events.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

To capture your OpenStack metrics, [install the Agent](https://app.datadoghq.com/account/settings/agent/latest) on your hosts running hypervisors.

### Configuration{% #configuration %}

#### Prepare OpenStack{% #prepare-openstack %}

Configure a Datadog role and user with your identity server:

```console
openstack role create datadog_monitoring
openstack user create datadog \
    --password my_password \
    --project my_project_name
openstack role add datadog_monitoring \
    --project my_project_name \
    --user datadog
```

Then, update your `policy.json` files to grant the needed permissions. `role:datadog_monitoring` requires access to the following operations:

**Nova**

```json
{
  "compute_extension": "aggregates",
  "compute_extension": "hypervisors",
  "compute_extension": "server_diagnostics",
  "compute_extension": "v3:os-hypervisors",
  "compute_extension": "v3:os-server-diagnostics",
  "compute_extension": "availability_zone:detail",
  "compute_extension": "v3:availability_zone:detail",
  "compute_extension": "used_limits_for_admin",
  "os_compute_api:os-aggregates:index": "rule:admin_api or role:datadog_monitoring",
  "os_compute_api:os-aggregates:show": "rule:admin_api or role:datadog_monitoring",
  "os_compute_api:os-hypervisors": "rule:admin_api or role:datadog_monitoring",
  "os_compute_api:os-server-diagnostics": "rule:admin_api or role:datadog_monitoring",
  "os_compute_api:os-used-limits": "rule:admin_api or role:datadog_monitoring"
}
```

**Neutron**

```json
{
  "get_network": "rule:admin_or_owner or rule:shared or rule:external or rule:context_is_advsvc or role:datadog_monitoring"
}
```

**Keystone**

```json
{
  "identity:get_project": "rule:admin_required or project_id:%(target.project.id)s or role:datadog_monitoring",
  "identity:list_projects": "rule:admin_required or role:datadog_monitoring"
}
```

You may need to restart your Keystone, Neutron, and Nova API services to ensure that the policy changes take.

**Note**: Installing the OpenStack integration could increase the number of VMs that Datadog monitors. For more information on how this may affect your billing, see the Billing FAQ.

#### Agent configuration{% #agent-configuration %}

1. Configure the Datadog Agent to connect to your Keystone server, and specify individual projects to monitor. Edit the `openstack.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) with the configuration below. See the [sample openstack.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/openstack/datadog_checks/openstack/data/conf.yaml.example) for all available configuration options:

   ```yaml
   init_config:
     ## @param keystone_server_url - string - required
     ## Where your identity server lives.
     ## Note that the server must support Identity API v3
     #
     keystone_server_url: "https://<KEYSTONE_SERVER_ENDPOINT>:<PORT>/"
   
   instances:
     ## @param name - string - required
     ## Unique identifier for this instance.
     #
     - name: "<INSTANCE_NAME>"
   
       ## @param user - object - required
       ## User credentials
       ## Password authentication is the only auth method supported.
       ## `user` object expects the parameter `username`, `password`,
       ## and `user.domain.id`.
       ##
       ## `user` should resolve to a structure like:
       ##
       ##  {'password': '<PASSWORD>', 'name': '<USERNAME>', 'domain': {'id': '<DOMAINE_ID>'}}
       #
       user:
         password: "<PASSWORD>"
         name: datadog
         domain:
           id: "<DOMAINE_ID>"
   ```

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

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

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

   ```yaml
   logs_enabled: true
   ```

1. Add this configuration block to your `openstack.d/conf.yaml` file to start collecting your Openstack logs:

   ```yaml
   logs:
     - type: file
       path: "<LOG_FILE_PATH>"
       source: openstack
   ```

Change the `path` parameter value and configure them for your environment. See the [sample openstack.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/openstack/datadog_checks/openstack/data/conf.yaml.example) for all available configuration options.

### Validation{% #validation %}

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

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

### Metrics{% #metrics %}

|  |
|  |
| **openstack.nova.current\_workload**(gauge)                    | Current workload on the Nova hypervisor                                                                                                             |
| **openstack.nova.disk\_available\_least**(gauge)               | Disk available for the Nova hypervisor*Shown as gibibyte*                                                                                           |
| **openstack.nova.free\_disk\_gb**(gauge)                       | Free disk on the Nova hypervisor*Shown as gibibyte*                                                                                                 |
| **openstack.nova.free\_ram\_mb**(gauge)                        | Free RAM on the Nova hypervisor*Shown as mebibyte*                                                                                                  |
| **openstack.nova.hypervisor\_load.1**(gauge)                   | The average hypervisor load over one minute.                                                                                                        |
| **openstack.nova.hypervisor\_load.15**(gauge)                  | The average hypervisor load over fifteen minutes.                                                                                                   |
| **openstack.nova.hypervisor\_load.5**(gauge)                   | The average hypervisor load over five minutes.                                                                                                      |
| **openstack.nova.limits.max\_image\_meta**(gauge)              | The maximum allowed image metadata definitions for this tenant                                                                                      |
| **openstack.nova.limits.max\_personality**(gauge)              | The maximum allowed personalities for this tenant                                                                                                   |
| **openstack.nova.limits.max\_personality\_size**(gauge)        | The maximum size of a single personality allowed for this tenant                                                                                    |
| **openstack.nova.limits.max\_security\_group\_rules**(gauge)   | The maximum number of security group rules allowed for this tenant                                                                                  |
| **openstack.nova.limits.max\_security\_groups**(gauge)         | The maximum number of security groups allowed for this tenant                                                                                       |
| **openstack.nova.limits.max\_server\_meta**(gauge)             | The maximum allowed service metadata definitions for this tenant                                                                                    |
| **openstack.nova.limits.max\_total\_cores**(gauge)             | The maximum allowed cores for this tenant                                                                                                           |
| **openstack.nova.limits.max\_total\_floating\_ips**(gauge)     | The maximum allowed floating IPs for this tenant                                                                                                    |
| **openstack.nova.limits.max\_total\_instances**(gauge)         | The maximum number of instances allowed for this tenant                                                                                             |
| **openstack.nova.limits.max\_total\_keypairs**(gauge)          | The maximum allowed key pairs allowed for this tenant                                                                                               |
| **openstack.nova.limits.max\_total\_ram\_size**(gauge)         | The max allowed RAM size for this tenant in megabytes (MB)*Shown as mebibyte*                                                                       |
| **openstack.nova.limits.total\_cores\_used**(gauge)            | The total cores used by this tenant                                                                                                                 |
| **openstack.nova.limits.total\_floating\_ips\_used**(gauge)    | The total floating IPs used by this tenant                                                                                                          |
| **openstack.nova.limits.total\_instances\_used**(gauge)        | The total instances used by this tenant                                                                                                             |
| **openstack.nova.limits.total\_ram\_used**(gauge)              | The current RAM used by this tenant in megabytes (MB)*Shown as mebibyte*                                                                            |
| **openstack.nova.limits.total\_security\_groups\_used**(gauge) | The total number of security groups used by this tenant                                                                                             |
| **openstack.nova.local\_gb**(gauge)                            | The size in GB of the ephemeral disk present on this hypervisor host*Shown as gibibyte*                                                             |
| **openstack.nova.local\_gb\_used**(gauge)                      | The size in GB of disk used on this hypervisor host*Shown as gibibyte*                                                                              |
| **openstack.nova.memory\_mb**(gauge)                           | The size in MB of RAM present on this hypervisor host*Shown as mebibyte*                                                                            |
| **openstack.nova.memory\_mb\_used**(gauge)                     | The size in MB of RAM used on this hypervisor host*Shown as mebibyte*                                                                               |
| **openstack.nova.running\_vms**(gauge)                         | Number of running VMs on this hypervisor host                                                                                                       |
| **openstack.nova.server.cpu0\_time**(gauge)                    | CPU time in nanoseconds of this virtual CPU*Shown as nanosecond*                                                                                    |
| **openstack.nova.server.hdd\_errors**(gauge)                   | The number of errors seen by the server when accessing an HDD device                                                                                |
| **openstack.nova.server.hdd\_read**(gauge)                     | Number of bytes read from an HDD device by this server*Shown as byte*                                                                               |
| **openstack.nova.server.hdd\_read\_req**(gauge)                | The number of read requests made to an HDD device by this server                                                                                    |
| **openstack.nova.server.hdd\_write**(gauge)                    | Number of bytes written to an HDD device by this server*Shown as byte*                                                                              |
| **openstack.nova.server.hdd\_write\_req**(gauge)               | The number of write requests made to an HDD device by this server                                                                                   |
| **openstack.nova.server.memory**(gauge)                        | The amount of memory in MB provisioned for this server*Shown as mebibyte*                                                                           |
| **openstack.nova.server.memory\_actual**(gauge)                | The amount of memory in MB provisioned for this server*Shown as mebibyte*                                                                           |
| **openstack.nova.server.memory\_rss**(gauge)                   | The amount of memory used by the processes of this server that is not associated with disk pages - such as stack and heap memory*Shown as mebibyte* |
| **openstack.nova.server.vda\_errors**(gauge)                   | The number of errors seen by the server when accessing a VDA device                                                                                 |
| **openstack.nova.server.vda\_read**(gauge)                     | Number of bytes read from a VDA device by this server*Shown as byte*                                                                                |
| **openstack.nova.server.vda\_read\_req**(gauge)                | The number of read requests made to a VDA device by this server                                                                                     |
| **openstack.nova.server.vda\_write**(gauge)                    | Number of bytes written to a VDA device by this server*Shown as byte*                                                                               |
| **openstack.nova.server.vda\_write\_req**(gauge)               | The number of write requests made to a VDA device by this server                                                                                    |
| **openstack.nova.vcpus**(gauge)                                | Number of vCPUs available on this hypervisor host                                                                                                   |
| **openstack.nova.vcpus\_used**(gauge)                          | Number of vCPUS used on this hypervisor host                                                                                                        |

### Events{% #events %}

The OpenStack check does not include any events.

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

**openstack.neutron.api.up**

Returns `CRITICAL` if the Agent is unable to query the Neutron API, `UNKNOWN` if there is an issue with the Keystone API. Returns `OK` otherwise.

*Statuses: ok, critical, unknown*

**openstack.nova.api.up**

Returns `CRITICAL` if the Agent is unable to query the Nova API, `UNKNOWN` if there is an issue with the Keystone API. Returns `OK` otherwise.

*Statuses: ok, critical, unknown*

**openstack.keystone.api.up**

Returns `CRITICAL` if the Agent is unable to query the Keystone API. Returns `OK` otherwise.

*Statuses: ok, critical*

**openstack.nova.hypervisor.up**

Returns `UNKNOWN` if the Agent is unable to get the Hypervisor state, `CRITICAL` if the Hypervisor is down. Returns `OK` otherwise.

*Statuses: ok, critical, unknown*

**openstack.neutron.network.up**

Returns `UNKNOWN` if the Agent is unable to get the Network state, `CRITICAL` if the Network is down. Returns `OK` otherwise.

*Statuses: ok, critical, unknown*

## Troubleshooting{% #troubleshooting %}

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

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

- [Monitoring OpenStack Nova](https://www.datadoghq.com/blog/openstack-monitoring-nova)
- [Install OpenStack in two commands for dev and test](https://www.datadoghq.com/blog/install-openstack-in-two-commands)
- [OpenStack: host aggregates, flavors, and availability zones](https://www.datadoghq.com/blog/openstack-host-aggregates-flavors-availability-zones)
