# 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://github.com/infrawatch/python-observabilityclient
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://infrawatch.github.io/documentation/",
"name": "python-observabilityclient",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "OpenStack",
"author_email": "openstack-discuss@lists.openstack.org",
"download_url": "https://files.pythonhosted.org/packages/d2/b8/debb1536256dd31abec40ea9dc52ec2ec3119cd5d66ff09fb4f061464c0f/python-observabilityclient-0.3.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://github.com/infrawatch/python-observabilityclient\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\n\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "OpenStack Observability Client",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://infrawatch.github.io/documentation/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8e8c13d904b2358a9d30ab25c7565b2bac63bd59c9a2147ab06c8df15425f9d0",
"md5": "98be932bfd5de687791d54902f85c24e",
"sha256": "3c770d1c9e51a7b9bdb1fb69ed1c28880dd4c8b05e4719722da8c41973459383"
},
"downloads": -1,
"filename": "python_observabilityclient-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98be932bfd5de687791d54902f85c24e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 35608,
"upload_time": "2024-07-05T11:50:22",
"upload_time_iso_8601": "2024-07-05T11:50:22.041091Z",
"url": "https://files.pythonhosted.org/packages/8e/8c/13d904b2358a9d30ab25c7565b2bac63bd59c9a2147ab06c8df15425f9d0/python_observabilityclient-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d2b8debb1536256dd31abec40ea9dc52ec2ec3119cd5d66ff09fb4f061464c0f",
"md5": "2e04af2547321325342640195ae3682b",
"sha256": "2e564afee05cc25d8e5949d80dc50fed27bbff73ab11f161fbdbe6da540346d9"
},
"downloads": -1,
"filename": "python-observabilityclient-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "2e04af2547321325342640195ae3682b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 27103,
"upload_time": "2024-07-05T11:50:23",
"upload_time_iso_8601": "2024-07-05T11:50:23.585576Z",
"url": "https://files.pythonhosted.org/packages/d2/b8/debb1536256dd31abec40ea9dc52ec2ec3119cd5d66ff09fb4f061464c0f/python-observabilityclient-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-05 11:50:23",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-observabilityclient"
}