Registry / aws / aodhclient

aodhclient

JSON →
library3.11.0pypypi✓ verified 84d ago

Python client library for the OpenStack Aodh alarming service. Provides programmatic access to alarm management (create, update, delete, list) and alarm evaluation history. Current version is 3.10.1, released for Python >=3.10. Maintained as part of the OpenStack project.

pip install aodhclient
INSTALL
IMPORT
SIG · AODHCLIENT
A
aodhclient
awspythonv3.11.0
Install
10.3s avg
Import
1864ms
Disk
117MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.888s · 108.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.3s · import 1.840s · 110MB
117MB installed
● package 117MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client
from aodhclient.v2 import client
from aodhclient import client
Wrong: top-level client may be missing or deprecated. Use v2 explicitly.

Authenticate using Keystone v3 and list all alarms.

from aodhclient.v2 import client from keystoneauth1.identity import v3 from keystoneauth1 import session auth = v3.Password(auth_url=os.environ.get('OS_AUTH_URL', 'http://localhost:5000/v3'), username=os.environ.get('OS_USERNAME', 'admin'), password=os.environ.get('OS_PASSWORD', 'password'), project_name=os.environ.get('OS_PROJECT_NAME', 'admin'), user_domain_name='Default', project_domain_name='Default') sess = session.Session(auth=auth) cli = client.Client(session=sess) try: alarms = cli.alarm.list() print(alarms) except Exception as e: print(f'Error: {e}')
aodh --version
Debug
Known issues
breakingIn version 3.x, the aodhclient.v2.client.Client is the correct entry point. Version 2.0.0 dropped Python 2 support and v1 client. Always use v2.
fix
Import from aodhclient.v2.client instead of aodhclient.client.
affects: >=3.0.0
gotchaThe aodhclient uses request bodies as dicts but expects proper formatting. A common mistake is forgetting to pass the correct project ID in the alarm payload, leading to 'Bad request' errors.
fix
Always include required fields like 'name', 'type', 'threshold_rule', etc. Check official Aodh documentation for valid alarm schemas.
affects: all
deprecatedUsing password authentication directly (Password auth plugin) is deprecated in favor of application credentials or token-based authentication for long-running services.
fix
Consider using keystoneauth1.identity.v3.ApplicationCredential instead.
affects: >=3.5.0
Errors
Common errors & fixes
AttributeError: module 'aodhclient' has no attribute 'client'
Importing from the wrong module; using from aodhclient import client instead of from aodhclient.v2 import client
fix
Use 'from aodhclient.v2 import client'
keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication.
Invalid or missing authentication credentials, or incorrect auth URL/domain.
fix
Double-check environment variables: OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, OS_PROJECT_NAME, OS_USER_DOMAIN_NAME, OS_PROJECT_DOMAIN_NAME.
aodhclient.exceptions.AodhClientException: Bad Request
The alarm data provided to create or update is missing required fields or has invalid values.
fix
Ensure all required fields (e.g., 'name', 'type', 'threshold_rule' with 'meter_name'/'threshold') are present and correct.
Upgrade
Version history
3.11.0latest on PyPI · released May 18, 2026
Audit
Dependencies
keystoneauth1requiredAuthentication for OpenStack services
Agent activity
44 hits · last 30 days
node
38
OpenAI (training)
1
Resources