{"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,"search_vec":"'3.10':34 '3.10.1':30 'access':15 'alarm':11,17,24,43 'aodh':1,10,44 'client':2,5 'cloud':45 'creat':19 'current':27 'delet':21 'evalu':25 'histori':26 'librari':3,6 'list':22 'maintain':35 'manag':18 'openstack':9,40,42 'part':37 'programmat':14 'project':41 'provid':13 'python':4,33 'releas':31 'servic':12 'updat':20 'version':28","created_at":"2026-05-01T08:06:47.037692+00:00","updated_at":"2026-05-01T08:06:47.037692+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.11.0","cli_name":"aodh","cli_version":"aodh 3.10.1","type":"library","homepage":"https://docs.openstack.org/python-aodhclient","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/aodhclient/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","http-networking","observability"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}