# python-observabilityclient
observabilityclient is an OpenStackClient (OSC) plugin implementation that
implements commands for management of Prometheus.
## Development
Install your OpenStack environment and patch your `openstack` client application using python.
```
# if using standalone, the following commands come after 'sudo dnf install -y python3-tripleoclient'
su - stack
# clone and install observability client plugin
git clone https://opendev.org/openstack/python-observabilityclient.git
cd python-observabilityclient
sudo python setup.py install --prefix=/usr
```
## Usage
Use `openstack metric query somequery` to query for metrics in prometheus.
To use the python api do the following:
```
from observabilityclient import client
c = client.Client(
'1', keystone_client.get_session(conf),
adapter_options={
'interface': conf.service_credentials.interface,
'region_name': conf.service_credentials.region_name})
c.query.query("somequery")
```
## List of commands
openstack metric list - lists all metrics
openstack metric show - shows current values of a metric
openstack metric query - queries prometheus and outputs the result
openstack metric delete - deletes some metrics
openstack metric snapshot - takes a snapshot of the current data
openstack metric clean-tombstones - cleans the tsdb tombstones
## List of functions provided by the python library
c.query.list - lists all metrics
c.query.show - shows current values of a metric
c.query.query - queries prometheus and outputs the result
c.query.delete - deletes some metrics
c.query.snapshot - takes a snapshot of the current data
c.query.clean-tombstones - cleans the tsdb tombstones
Raw data
{
"_id": null,
"home_page": "https://opendev.org/openstack/python-observabilityclient",
"name": "python-observabilityclient",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "OpenStack",
"author_email": "openstack-discuss@lists.openstack.org",
"download_url": "https://files.pythonhosted.org/packages/69/8e/90a87c435d9386ab4807660771f494f8af2f5d70055fdcfc1acb2cb12364/python_observabilityclient-1.2.0.tar.gz",
"platform": null,
"description": "# python-observabilityclient\n\nobservabilityclient is an OpenStackClient (OSC) plugin implementation that\nimplements commands for management of Prometheus.\n\n## Development\n\nInstall your OpenStack environment and patch your `openstack` client application using python.\n\n```\n# if using standalone, the following commands come after 'sudo dnf install -y python3-tripleoclient'\n\nsu - stack\n\n# clone and install observability client plugin\ngit clone https://opendev.org/openstack/python-observabilityclient.git\ncd python-observabilityclient\nsudo python setup.py install --prefix=/usr\n```\n\n## Usage\n\nUse `openstack metric query somequery` to query for metrics in prometheus.\n\nTo use the python api do the following:\n```\nfrom observabilityclient import client\n\nc = client.Client(\n '1', keystone_client.get_session(conf),\n adapter_options={\n 'interface': conf.service_credentials.interface,\n 'region_name': conf.service_credentials.region_name})\nc.query.query(\"somequery\")\n```\n\n## List of commands\n\nopenstack metric list - lists all metrics\nopenstack metric show - shows current values of a metric\nopenstack metric query - queries prometheus and outputs the result\nopenstack metric delete - deletes some metrics\nopenstack metric snapshot - takes a snapshot of the current data\nopenstack metric clean-tombstones - cleans the tsdb tombstones\n\n## List of functions provided by the python library\nc.query.list - lists all metrics\nc.query.show - shows current values of a metric\nc.query.query - queries prometheus and outputs the result\nc.query.delete - deletes some metrics\nc.query.snapshot - takes a snapshot of the current data\nc.query.clean-tombstones - cleans the tsdb tombstones\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "OpenStack Observability Client",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://opendev.org/openstack/python-observabilityclient"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "509f86847909a3d25a4bd7e007a7caf9818270b0b2f0d6769bc620bce7cd1174",
"md5": "669e79307fa02bce060eb715e88319d4",
"sha256": "e5ed18fe1836e59e7b72f10f3037790ae690d796b59070d6753bd277978259b9"
},
"downloads": -1,
"filename": "python_observabilityclient-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "669e79307fa02bce060eb715e88319d4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 38394,
"upload_time": "2025-08-28T09:48:05",
"upload_time_iso_8601": "2025-08-28T09:48:05.945198Z",
"url": "https://files.pythonhosted.org/packages/50/9f/86847909a3d25a4bd7e007a7caf9818270b0b2f0d6769bc620bce7cd1174/python_observabilityclient-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "698e90a87c435d9386ab4807660771f494f8af2f5d70055fdcfc1acb2cb12364",
"md5": "cd30e35ef5de0af353a7ade199ffd38f",
"sha256": "a486ce0fc9e1721e343907b05a5afe88b6afb4c187b5ed5b498f77178dfe7982"
},
"downloads": -1,
"filename": "python_observabilityclient-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "cd30e35ef5de0af353a7ade199ffd38f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 36195,
"upload_time": "2025-08-28T09:48:06",
"upload_time_iso_8601": "2025-08-28T09:48:06.769771Z",
"url": "https://files.pythonhosted.org/packages/69/8e/90a87c435d9386ab4807660771f494f8af2f5d70055fdcfc1acb2cb12364/python_observabilityclient-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 09:48:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-observabilityclient"
}