Skip to main content

OpenMLDB Exporter

PyPI PyPI - Python Version

Features

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.

Use docker
docker run ghcr.io/4paradigm/openmldb-exporter \
    --config.zk_root=<openmldb_zk_addr> \
    --config.zk_path=<openmldb_zk_path>
Install and Run from PyPI
pip install openmldb-exporter

# start
openmldb-exporter \
    --config.zk_root=<openmldb_zk_addr> \
    --config.zk_path=<openmldb_zk_path>

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

curl http://<IP>:8000/metrics

<IP> is docker container IP, or 127.0.0.1 if installing from PyPI.

Example output
# 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               

Configuration

You can view the help from:

openmldb-exporter -h

--config.zk_root and --config.zk_path are mandatory.

Available options
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

Development

Extra Requirements

Run

  1. Setup python dependencies:

    poetry install
    
  2. Start openmldb exporter

    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 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

Metadata

Release files for openmldb-exporter 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openmldb-exporter 0.9.0
File Size Uploaded
openmldb_exporter-0.9.0.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openmldb-exporter 0.9.0
File Interpreter ABI Platform
openmldb_exporter-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / openmldb_exporter-0.9.0.tar.gz

Download URL openmldb_exporter-0.9.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bea749da6d75bf022e7c5d83eb2c2e14001715420edc8296f98f29a673ae3465
BLAKE2b-256 checksum
How to use checksums
c54818bec06791bf395694f2e272d663f548f803350c11bf5dbf7c2c9eac53e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.1.0

Release files / openmldb_exporter-0.9.0-py3-none-any.whl

Download URL openmldb_exporter-0.9.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dc4ba308f328667fdf866b0f3bba9c92aa488739d742f79e25e22111391aa42
BLAKE2b-256 checksum
How to use checksums
9f198cba8325aacbdf0fa2f6746382d126c71d44fc95ed9cf440b4eef7950a17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.1.0

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page