Datadog-OpenStack Integration

OpenStack default dashboard

Overview

Get metrics from openstack service in real time to:

  • Visualize and monitor openstack states
  • Be notified about openstack failovers and events.

Setup

Installation

Install the dd-check-openstack package manually or with your favorite configuration manager.

Installing the OpenStack Integration could increase the number of VMs that Datadog monitors. For more information on how this may affect your billing, please visit our Billing FAQ.

Configuration

To capture OpenStack metrics you need to install the Datadog Agent on your hosts running hypervisors.

  1. First configure a Datadog role and user with your identity server

    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
    
  2. Update your policy.json files to grant the needed permissions. role:datadog_monitoring requires access to the following operations:

Nova

{
    "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

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

Keystone

{
    "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.

  1. Configure the Datadog Agent to connect to your Keystone server, and specify individual projects to monitor. Edit openstack.yaml. You can find a sample configuration in the conf.d directory in your agent install. See the sample openstack.yaml for all available configuration options.

  2. Restart the Agent

Validation

Run the Agent’s info subcommand and look for openstack under the Checks section:

Checks
======

    openstack
    -----------
      - instance #0 [OK]
      - Collected 39 metrics, 0 events & 7 service checks

Compatibility

The openstack check is compatible with all major platforms

Data Collected

Metrics

openstack.nova.current_workload
(gauge)
Current workload on the Nova hypervisor
shown as
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.
shown as
openstack.nova.hypervisor_load.5
(gauge)
The average hypervisor load over five minutes.
shown as
openstack.nova.hypervisor_load.15
(gauge)
The average hypervisor load over fifteen minutes.
shown as
openstack.nova.limits.max_image_meta
(gauge)
The maximum allowed image metadata definitions for this tenant
shown as
openstack.nova.limits.max_personality
(gauge)
The maximum allowed personalities for this tenant
shown as
openstack.nova.limits.max_personality_size
(gauge)
The maximum size of a single personality allowed for this tenant
shown as
openstack.nova.limits.max_security_group_rules
(gauge)
The maximum number of security group rules allowed for this tenant
shown as
openstack.nova.limits.max_security_groups
(gauge)
The maximum number of security groups allowed for this tenant
shown as
openstack.nova.limits.max_server_meta
(gauge)
The maximum allowed service metadata definitions for this tenant
shown as
openstack.nova.limits.max_total_cores
(gauge)
The maximum allowed cores for this tenant
shown as
openstack.nova.limits.max_total_floating_ips
(gauge)
The maximum allowed floating IPs for this tenant
shown as
openstack.nova.limits.max_total_instances
(gauge)
The maximum number of instances allowed for this tenant
shown as
openstack.nova.limits.max_total_keypairs
(gauge)
The maximum allowed keypairs allowed for this tenant
shown as
openstack.nova.limits.total_cores_used
(gauge)
The total cores used by this tenant
shown as
openstack.nova.limits.total_floating_ips_used
(gauge)
The total floating IPs used by this tenant
shown as
openstack.nova.limits.total_instances_used
(gauge)
The total instances used by this tenant
shown as
openstack.nova.limits.total_security_groups_used
(gauge)
The total number of security groups used by this tenant
shown as
openstack.nova.running_vms
(gauge)
Number of running VMs on this hypervisor host
shown as
openstack.nova.vcpus
(gauge)
Number of vCPUs available on this hypervisor host
shown as
openstack.nova.vcpus_used
(gauge)
Number of vCPUS used on this hypervisor host
shown as
openstack.nova.server.hdd_errors
(gauge)
The number of errors seen by the server when accessing an HDD device
shown as
openstack.nova.server.hdd_read_req
(gauge)
The number of read requests made to an HDD device by this server
shown as
openstack.nova.server.hdd_write_req
(gauge)
The number of write requests made to an HDD device by this server
shown as
openstack.nova.server.vda_errors
(gauge)
The number of errors seen by the server when accessing a VDA device
shown as
openstack.nova.server.vda_read_req
(gauge)
The number of read requests made to a VDA device by this server
shown as
openstack.nova.server.vda_write_req
(gauge)
The number of write requests made to a VDA device by this server
shown as
openstack.nova.limits.max_total_ram_size
(gauge)
The max allowed RAM size for this tenant
shown as gibibyte
openstack.nova.limits.total_ram_used
(gauge)
The current RAM used by this tenant
shown as gibibyte
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.server.hdd_read
(gauge)
Number of bytes read from an HDD device by this server
shown as byte
openstack.nova.server.hdd_write
(gauge)
Number of bytes written to an HDD device by this server
shown as byte
openstack.nova.server.vda_read
(gauge)
Number of bytes read from a VDA device by this server
shown as byte
openstack.nova.server.vda_write
(gauge)
Number of bytes written to a VDA device by this server
shown as byte
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.cpu0_time
(gauge)
CPU time in nanoseconds of this virtual CPU
shown as nanosecond

Events

The Openstack check does not include any event at this time.

Service Checks

The Openstack check does not include any service check at this time.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading

To get a better idea of how (or why) to integrate your Nova OpenStack compute module with Datadog, check out our series of blog posts about it.

See also our blog posts: