Skip to content

OpenStack monitoring plugin

Article last updated: 2026-12-02.

What it does

The OpenStack monitoring plugin reads the hypervisors and the running instances of an OpenStack compute service and creates one Pandora FMS agent per hypervisor and one per instance. Each run queries the compute API, builds the agent documents with the hypervisor resources and the instance diagnostics, and copies them into a local data folder.

The plugin is a standalone agent generator. It does not use Tentacle and does not print module XML for an agent to collect: it writes the .data files directly into --data_dir.

Prepare

Compatibility

Scope State Evidence
OpenStack compute API reachable from the plugin host Required The plugin requests /os-hypervisors/detail, /servers and /servers/<id>/diagnostics
A valid OpenStack token Required The token is sent in the X-Auth-Token header
Python 3 and the requests library Required when running from source The script imports requests
Write access to the Pandora FMS data folder Required The plugin writes the agent documents there
Pandora FMS NG 784 and later Not validated No release-specific validation record exists

Requirements

  1. The OpenStack compute API base URL, the endpoint that exposes /os-hypervisors/detail, /servers and /servers/<id>/diagnostics. The script calls it --url; the help text calls it a Keystone URL, but the requests are made against the compute API.
  2. A valid OpenStack token with permission to list servers and read diagnostics.
  3. Network access from the plugin host to the compute API.
  4. A writable data folder, usually /var/spool/pandora/data_in.

Install the plugin

Copy pandora_openstack.py (or the packaged executable) to the host that will run it. The source version needs Python 3 and requests.

Configure

Run the plugin with the compute API URL and a token:

./pandora_openstack.py -u <COMPUTE_API_URL> -t <TOKEN>
Option Required Default Description
-u, --url Yes — OpenStack compute API base URL, without a trailing slash.
-t, --token Yes — OpenStack authentication token.
-g, --group No openstack Agent group.
--data_dir No /var/spool/pandora/data_in/ Folder for the agent documents.

Example:

./pandora_openstack.py -u http://controller:8774/v2.1 -t '<TOKEN>' -g OpenStack --data_dir /var/spool/pandora/data_in/

The plugin creates:

  • One agent per hypervisor, named Openstack Hypervisor_<id>.
  • One agent per server returned by /servers, named Openstack instance id: <id>.

The token is sent as X-Auth-Token. It is a credential: keep it out of shell history when possible and restrict access to the host.

Verify

Run the plugin and check the data folder:

./pandora_openstack.py -u <COMPUTE_API_URL> -t '<TOKEN>' --data_dir /tmp/openstack_test
ls -l /tmp/openstack_test

A successful run writes one .data file per hypervisor and per instance. If the API cannot be read, the script prints Error requesting ... please check conectivity and exits.

You can check the API directly with the same token:

curl -s -H "X-Auth-Token: <TOKEN>" <COMPUTE_API_URL>/os-hypervisors/detail | head
curl -s -H "X-Auth-Token: <TOKEN>" <COMPUTE_API_URL>/servers | head

Understand the results

Hypervisor agents

Openstack Hypervisor_<id> contains:

Module Meaning
free_disk_gb Free disk in GB.
free_ram_mb Free RAM in MB.
disk_available_least Least available disk across the hypervisor.
local_gb Local disk in GB.
local_gb_used Local disk used in GB.
memory_mb Total memory in MB.
memory_mb_used Memory used in MB.
vcpus Virtual CPUs.
vcpus_used Virtual CPUs used.
current_workload Current workload.
host_ip Hypervisor host IP.
hypervisor_type Hypervisor type.
hypervisor_version Hypervisor version.
running_vms Running virtual machines.

Instance agents

Openstack instance id: <id> contains the diagnostics returned by /servers/<id>/diagnostics:

Module Meaning
memory Memory allocated to the instance.
memory-actual Actual memory used.
memory-rss Resident memory.
vda_errors Virtual disk errors.
vda_read Virtual disk read bytes.
vda_read_req Virtual disk read requests.
vda_write Virtual disk write bytes.
vda_write_req Virtual disk write requests.

The exact set depends on the OpenStack version and the diagnostics returned for each instance. The plugin does not add units or thresholds.

Operate and troubleshoot

  • Error requesting ... please check conectivity — the URL or the token is wrong, or the compute API is not reachable.
  • Only hypervisor agents are created — the /servers response is empty or the token cannot list servers.
  • Only instance agents are created — the /servers response has no hypervisor data, or the hypervisor endpoint is not available.
  • The API returns 401 — the token has expired. Generate a new token.
  • No files in the data folder — the folder does not exist or is not writable.
  • The URL help text mentions Keystone — the script expects the compute API endpoint. Use the endpoint that answers /servers.

Reference

Command-line options

Option Description
-u, --url OpenStack compute API base URL.
-t, --token OpenStack token.
-g, --group Agent group.
--data_dir Data folder.

API endpoints

Endpoint Data
/os-hypervisors/detail Hypervisor list with resource details
/servers Server list
/servers/<id>/diagnostics Instance diagnostics

Addon identity

Field Value
Marketplace identifier pandorafms.openstack
Marketplace name OpenStack monitoring
Package pandora_openstack.zip
Type Standalone plugin, agent generator
Executable pandora_openstack
License Free download