{"id":23255,"library":"aodhclient","title":"Aodh Client Library","description":"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.","status":"active","version":"3.10.1","language":"python","source_language":"en","source_url":"https://opendev.org/openstack/aodhclient","tags":["openstack","alarming","aodh","cloud"],"install":[{"cmd":"pip install aodhclient","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Authentication for OpenStack services","package":"keystoneauth1","optional":false}],"imports":[{"note":"Wrong: top-level client may be missing or deprecated. Use v2 explicitly.","wrong":"from aodhclient import client","symbol":"client","correct":"from aodhclient.v2 import client"}],"quickstart":{"code":"from aodhclient.v2 import client\nfrom keystoneauth1.identity import v3\nfrom keystoneauth1 import session\n\nauth = v3.Password(auth_url=os.environ.get('OS_AUTH_URL', 'http://localhost:5000/v3'),\n                   username=os.environ.get('OS_USERNAME', 'admin'),\n                   password=os.environ.get('OS_PASSWORD', 'password'),\n                   project_name=os.environ.get('OS_PROJECT_NAME', 'admin'),\n                   user_domain_name='Default',\n                   project_domain_name='Default')\nsess = session.Session(auth=auth)\ncli = client.Client(session=sess)\ntry:\n    alarms = cli.alarm.list()\n    print(alarms)\nexcept Exception as e:\n    print(f'Error: {e}')","lang":"python","description":"Authenticate using Keystone v3 and list all alarms."},"warnings":[{"fix":"Import from aodhclient.v2.client instead of aodhclient.client.","message":"In 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.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Always include required fields like 'name', 'type', 'threshold_rule', etc. Check official Aodh documentation for valid alarm schemas.","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using keystoneauth1.identity.v3.ApplicationCredential instead.","message":"Using password authentication directly (Password auth plugin) is deprecated in favor of application credentials or token-based authentication for long-running services.","severity":"deprecated","affected_versions":">=3.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from aodhclient.v2 import client'","cause":"Importing from the wrong module; using from aodhclient import client instead of from aodhclient.v2 import client","error":"AttributeError: module 'aodhclient' has no attribute 'client'"},{"fix":"Double-check environment variables: OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, OS_PROJECT_NAME, OS_USER_DOMAIN_NAME, OS_PROJECT_DOMAIN_NAME.","cause":"Invalid or missing authentication credentials, or incorrect auth URL/domain.","error":"keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication."},{"fix":"Ensure all required fields (e.g., 'name', 'type', 'threshold_rule' with 'meter_name'/'threshold') are present and correct.","cause":"The alarm data provided to create or update is missing required fields or has invalid values.","error":"aodhclient.exceptions.AodhClientException: Bad Request"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}