openmldb-exporter


Nameopenmldb-exporter JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://openmldb.ai
Summaryprometheus exporter for OpenMLDB
upload_time2023-12-30 04:14:44
maintainer
docs_urlNone
authoraceforeverd
requires_python>=3.8,<4.0
licenseApache-2.0
keywords openmldb prometheus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenMLDB Exporter

[![PyPI](https://img.shields.io/pypi/v/openmldb-exporter?label=openmldb-exporter)](https://pypi.org/project/openmldb-exporter/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openmldb-exporter)

## Features

- [OpenMLDB](https://github.com/4paradigm/OpenMLDB) Prometheus Exporter exposing metrics
- [OpenMLDB](https://github.com/4paradigm/OpenMLDB) mixin provides well-configured examples for [Prometheus](https://prometheus.io/) server and [Grafana](https://grafana.com/) dashboard

## Requirements

- A runnable OpenMLDB instance that is accessible from your network
- OpenMLDB version >= 0.5.0
- Python >= 3.8


## Quick Start

**You can run openmdlb-exporter from docker, or install and run directly from PyPI.**

<details open=true><summary>Use docker</summary>

```sh
docker run ghcr.io/4paradigm/openmldb-exporter \
    --config.zk_root=<openmldb_zk_addr> \
    --config.zk_path=<openmldb_zk_path>
```

</details>

<details open=true><summary>Install and Run from PyPI</summary>

```sh
pip install openmldb-exporter

# start
openmldb-exporter \
    --config.zk_root=<openmldb_zk_addr> \
    --config.zk_path=<openmldb_zk_path>
```
</details></br>

And replace `<openmdlb_zk_addr>` and `<openmldb_zk_path>` to correct value. Afterwards, you can check metrics with curl:

```sh
curl http://<IP>:8000/metrics
```
`<IP>` is docker container IP, or `127.0.0.1` if installing from PyPI.

<details><summary>Example output</summary>

```sh
# HELP openmldb_connected_seconds_total duration for a component conncted time in seconds                              
# TYPE openmldb_connected_seconds_total counter                                                                        
openmldb_connected_seconds_total{endpoint="172.17.0.15:9520",role="tablet"} 208834.70900011063                         
openmldb_connected_seconds_total{endpoint="172.17.0.15:9521",role="tablet"} 208834.70700001717                         
openmldb_connected_seconds_total{endpoint="172.17.0.15:9522",role="tablet"} 208834.71399998665                         
openmldb_connected_seconds_total{endpoint="172.17.0.15:9622",role="nameserver"} 208833.70000004768                     
openmldb_connected_seconds_total{endpoint="172.17.0.15:9623",role="nameserver"} 208831.70900011063                     
openmldb_connected_seconds_total{endpoint="172.17.0.15:9624",role="nameserver"} 208829.7230000496                      
# HELP openmldb_connected_seconds_created duration for a component conncted time in seconds                            
# TYPE openmldb_connected_seconds_created gauge                                                                        
openmldb_connected_seconds_created{endpoint="172.17.0.15:9520",role="tablet"} 1.6501813860467942e+09                   
openmldb_connected_seconds_created{endpoint="172.17.0.15:9521",role="tablet"} 1.6501813860495396e+09                   
openmldb_connected_seconds_created{endpoint="172.17.0.15:9522",role="tablet"} 1.650181386050323e+09                    
openmldb_connected_seconds_created{endpoint="172.17.0.15:9622",role="nameserver"} 1.6501813860512116e+09               
openmldb_connected_seconds_created{endpoint="172.17.0.15:9623",role="nameserver"} 1.650181386051238e+09                
openmldb_connected_seconds_created{endpoint="172.17.0.15:9624",role="nameserver"} 1.6501813860512598e+09               
```

</details>

## Configuration

You can view the help from:
```sh
openmldb-exporter -h
```
`--config.zk_root` and `--config.zk_path` are mandatory.

<details><summary>Available options</summary>

```
usage: openmldb-exporter [-h] [--log.level LOG.LEVEL] [--web.listen-address WEB.LISTEN_ADDRESS]
                        [--web.telemetry-path WEB.TELEMETRY_PATH] [--config.zk_root CONFIG.ZK_ROOT]
                        [--config.zk_path CONFIG.ZK_PATH] [--config.interval CONFIG.INTERVAL]

OpenMLDB exporter

optional arguments:
 -h, --help            show this help message and exit
 --log.level LOG.LEVEL
                       config log level, default WARN
 --web.listen-address WEB.LISTEN_ADDRESS
                       process listen port, default 8000
 --web.telemetry-path WEB.TELEMETRY_PATH
                       Path under which to expose metrics, default metrics
 --config.zk_root CONFIG.ZK_ROOT
                       endpoint to zookeeper, default 127.0.0.1:6181
 --config.zk_path CONFIG.ZK_PATH
                       root path in zookeeper for OpenMLDB, default /
 --config.interval CONFIG.INTERVAL
                       interval in seconds to pull metrics periodically, default 30.0
```

</details>

## Development

### Extra Requirements

- Same in [Requirements](#requirements)
- [poetry](https://github.com/python-poetry/poetry) as build tool

### Run

1. Setup python dependencies:

   ```sh
   poetry install
   ```

2. Start openmldb exporter

   ```sh
   poetry run openmldb-exporter
   ```

   Pass in necessary flags after `openmldb-exporter`. Run `poetry run openmldb-exporter --help` to get the help info.


## Compatibility

| OpenMLDB Exporter version | OpenMLDB supported version | Explaination |
| ---- | ---- | ---- |
| >= 0.9.0 | >= 0.8.4 | OpenMLDB removed deploy response time in database since 0.8.4 |
| < 0.9.0  | >= 0.5.0, < 0.8.4 | |


## Release History

- 0.9.0
    * Features
      - **BREAKING** support OpenMLDB 0.8.4. OpenMLDB 0.8.4 removed deploy response time, please use openmldb-exporter >= 0.9.0. Ref [Compatibility](#compatibility) info above
    * Chores
      - update deps

- 0.8.2
    * Chores
      - deps: restrict OpenMLDB version < 0.8.4

- 0.8.1
    * Features
      - update openmldb-exporter docker image
    * Chores
      - doc and workflow updates

- 0.8.0
    * Features
        - Upgrade OpenMLDB SDK to v0.8
        - improve test code

- 0.7.1
    * Features
        - Upgrade OpenMLDB SDK to v0.7
        - Upgrade prometheus client to 0.16
- 0.6.0
    * Features
        - Depends on OpenMLDB SDK v0.6

            

Raw data

            {
    "_id": null,
    "home_page": "https://openmldb.ai",
    "name": "openmldb-exporter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "openmldb,prometheus",
    "author": "aceforeverd",
    "author_email": "teapot@aceforeverd.com",
    "download_url": "https://files.pythonhosted.org/packages/c5/48/18bec06791bf395694f2e272d663f548f803350c11bf5dbf7c2c9eac53e0/openmldb_exporter-0.9.0.tar.gz",
    "platform": null,
    "description": "# OpenMLDB Exporter\n\n[![PyPI](https://img.shields.io/pypi/v/openmldb-exporter?label=openmldb-exporter)](https://pypi.org/project/openmldb-exporter/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openmldb-exporter)\n\n## Features\n\n- [OpenMLDB](https://github.com/4paradigm/OpenMLDB) Prometheus Exporter exposing metrics\n- [OpenMLDB](https://github.com/4paradigm/OpenMLDB) mixin provides well-configured examples for [Prometheus](https://prometheus.io/) server and [Grafana](https://grafana.com/) dashboard\n\n## Requirements\n\n- A runnable OpenMLDB instance that is accessible from your network\n- OpenMLDB version >= 0.5.0\n- Python >= 3.8\n\n\n## Quick Start\n\n**You can run openmdlb-exporter from docker, or install and run directly from PyPI.**\n\n<details open=true><summary>Use docker</summary>\n\n```sh\ndocker run ghcr.io/4paradigm/openmldb-exporter \\\n    --config.zk_root=<openmldb_zk_addr> \\\n    --config.zk_path=<openmldb_zk_path>\n```\n\n</details>\n\n<details open=true><summary>Install and Run from PyPI</summary>\n\n```sh\npip install openmldb-exporter\n\n# start\nopenmldb-exporter \\\n    --config.zk_root=<openmldb_zk_addr> \\\n    --config.zk_path=<openmldb_zk_path>\n```\n</details></br>\n\nAnd replace `<openmdlb_zk_addr>` and `<openmldb_zk_path>` to correct value. Afterwards, you can check metrics with curl:\n\n```sh\ncurl http://<IP>:8000/metrics\n```\n`<IP>` is docker container IP, or `127.0.0.1` if installing from PyPI.\n\n<details><summary>Example output</summary>\n\n```sh\n# HELP openmldb_connected_seconds_total duration for a component conncted time in seconds                              \n# TYPE openmldb_connected_seconds_total counter                                                                        \nopenmldb_connected_seconds_total{endpoint=\"172.17.0.15:9520\",role=\"tablet\"} 208834.70900011063                         \nopenmldb_connected_seconds_total{endpoint=\"172.17.0.15:9521\",role=\"tablet\"} 208834.70700001717                         \nopenmldb_connected_seconds_total{endpoint=\"172.17.0.15:9522\",role=\"tablet\"} 208834.71399998665                         \nopenmldb_connected_seconds_total{endpoint=\"172.17.0.15:9622\",role=\"nameserver\"} 208833.70000004768                     \nopenmldb_connected_seconds_total{endpoint=\"172.17.0.15:9623\",role=\"nameserver\"} 208831.70900011063                     \nopenmldb_connected_seconds_total{endpoint=\"172.17.0.15:9624\",role=\"nameserver\"} 208829.7230000496                      \n# HELP openmldb_connected_seconds_created duration for a component conncted time in seconds                            \n# TYPE openmldb_connected_seconds_created gauge                                                                        \nopenmldb_connected_seconds_created{endpoint=\"172.17.0.15:9520\",role=\"tablet\"} 1.6501813860467942e+09                   \nopenmldb_connected_seconds_created{endpoint=\"172.17.0.15:9521\",role=\"tablet\"} 1.6501813860495396e+09                   \nopenmldb_connected_seconds_created{endpoint=\"172.17.0.15:9522\",role=\"tablet\"} 1.650181386050323e+09                    \nopenmldb_connected_seconds_created{endpoint=\"172.17.0.15:9622\",role=\"nameserver\"} 1.6501813860512116e+09               \nopenmldb_connected_seconds_created{endpoint=\"172.17.0.15:9623\",role=\"nameserver\"} 1.650181386051238e+09                \nopenmldb_connected_seconds_created{endpoint=\"172.17.0.15:9624\",role=\"nameserver\"} 1.6501813860512598e+09               \n```\n\n</details>\n\n## Configuration\n\nYou can view the help from:\n```sh\nopenmldb-exporter -h\n```\n`--config.zk_root` and `--config.zk_path` are mandatory.\n\n<details><summary>Available options</summary>\n\n```\nusage: openmldb-exporter [-h] [--log.level LOG.LEVEL] [--web.listen-address WEB.LISTEN_ADDRESS]\n                        [--web.telemetry-path WEB.TELEMETRY_PATH] [--config.zk_root CONFIG.ZK_ROOT]\n                        [--config.zk_path CONFIG.ZK_PATH] [--config.interval CONFIG.INTERVAL]\n\nOpenMLDB exporter\n\noptional arguments:\n -h, --help            show this help message and exit\n --log.level LOG.LEVEL\n                       config log level, default WARN\n --web.listen-address WEB.LISTEN_ADDRESS\n                       process listen port, default 8000\n --web.telemetry-path WEB.TELEMETRY_PATH\n                       Path under which to expose metrics, default metrics\n --config.zk_root CONFIG.ZK_ROOT\n                       endpoint to zookeeper, default 127.0.0.1:6181\n --config.zk_path CONFIG.ZK_PATH\n                       root path in zookeeper for OpenMLDB, default /\n --config.interval CONFIG.INTERVAL\n                       interval in seconds to pull metrics periodically, default 30.0\n```\n\n</details>\n\n## Development\n\n### Extra Requirements\n\n- Same in [Requirements](#requirements)\n- [poetry](https://github.com/python-poetry/poetry) as build tool\n\n### Run\n\n1. Setup python dependencies:\n\n   ```sh\n   poetry install\n   ```\n\n2. Start openmldb exporter\n\n   ```sh\n   poetry run openmldb-exporter\n   ```\n\n   Pass in necessary flags after `openmldb-exporter`. Run `poetry run openmldb-exporter --help` to get the help info.\n\n\n## Compatibility\n\n| OpenMLDB Exporter version | OpenMLDB supported version | Explaination |\n| ---- | ---- | ---- |\n| >= 0.9.0 | >= 0.8.4 | OpenMLDB removed deploy response time in database since 0.8.4 |\n| < 0.9.0  | >= 0.5.0, < 0.8.4 | |\n\n\n## Release History\n\n- 0.9.0\n    * Features\n      - **BREAKING** support OpenMLDB 0.8.4. OpenMLDB 0.8.4 removed deploy response time, please use openmldb-exporter >= 0.9.0. Ref [Compatibility](#compatibility) info above\n    * Chores\n      - update deps\n\n- 0.8.2\n    * Chores\n      - deps: restrict OpenMLDB version < 0.8.4\n\n- 0.8.1\n    * Features\n      - update openmldb-exporter docker image\n    * Chores\n      - doc and workflow updates\n\n- 0.8.0\n    * Features\n        - Upgrade OpenMLDB SDK to v0.8\n        - improve test code\n\n- 0.7.1\n    * Features\n        - Upgrade OpenMLDB SDK to v0.7\n        - Upgrade prometheus client to 0.16\n- 0.6.0\n    * Features\n        - Depends on OpenMLDB SDK v0.6\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "prometheus exporter for OpenMLDB",
    "version": "0.9.0",
    "project_urls": {
        "Documentation": "https://openmldb.ai/docs/zh/main/maintain/monitoring.html",
        "Homepage": "https://openmldb.ai",
        "Repository": "https://github.com/4paradigm/openmldb-exporter"
    },
    "split_keywords": [
        "openmldb",
        "prometheus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f198cba8325aacbdf0fa2f6746382d126c71d44fc95ed9cf440b4eef7950a17",
                "md5": "e8b2dbdbc3696645710bfc1bc96b3f3f",
                "sha256": "6dc4ba308f328667fdf866b0f3bba9c92aa488739d742f79e25e22111391aa42"
            },
            "downloads": -1,
            "filename": "openmldb_exporter-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e8b2dbdbc3696645710bfc1bc96b3f3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 14029,
            "upload_time": "2023-12-30T04:14:42",
            "upload_time_iso_8601": "2023-12-30T04:14:42.742582Z",
            "url": "https://files.pythonhosted.org/packages/9f/19/8cba8325aacbdf0fa2f6746382d126c71d44fc95ed9cf440b4eef7950a17/openmldb_exporter-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c54818bec06791bf395694f2e272d663f548f803350c11bf5dbf7c2c9eac53e0",
                "md5": "272fce8dbeda230cea3f978de6a991d5",
                "sha256": "bea749da6d75bf022e7c5d83eb2c2e14001715420edc8296f98f29a673ae3465"
            },
            "downloads": -1,
            "filename": "openmldb_exporter-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "272fce8dbeda230cea3f978de6a991d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 12267,
            "upload_time": "2023-12-30T04:14:44",
            "upload_time_iso_8601": "2023-12-30T04:14:44.583153Z",
            "url": "https://files.pythonhosted.org/packages/c5/48/18bec06791bf395694f2e272d663f548f803350c11bf5dbf7c2c9eac53e0/openmldb_exporter-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-30 04:14:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "4paradigm",
    "github_project": "openmldb-exporter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "openmldb-exporter"
}
        
Elapsed time: 0.15565s