Skip to main content

KairosDB REST API python client and interface

Project description

PythonPIP PythonSupport License RTFD

kairosdb - Python library to interface the KairosDB REST API (kairosdb.github.io)

This package provides a simple python library to interface the KairosDB REST API. Please read also: https://kairosdb.github.io/docs/build/html/restapi/index.html.

Installation

To be documented

Documentation

Documentation is available online: http://python-kairosdb.readthedocs.io/en/latest/index.html

Examples

import kairosdb

if __name__ == "__main__":
    KDB_CLIENT = kairosdb.client.KairosDBAPIClient(
        api_endpoint="https://kdb.domain.tld:4443/api/v1")
    KDB_API = kairosdb.KairosDBAPI(KDB_CLIENT)

    print(KDB_API.version)
    print(KDB_API.health_status)
    print(KDB_API.health_check)
    print(KDB_API.metricnames)
    print(KDB_API.tagnames)

    print(KDB_API.query_metrics({
        "metrics": [{
            "name": "my_metric",
            "group_by": [{"name": "tag", "tags": ['host']}],
            "aggregators": [{
                "name": "avg",
                "align_sampling": True,
                "sampling": {"value": 30, "unit": "seconds"}
            }]
        }],
        "cache_time": 0,
        "start_relative": {"value": "2", "unit": "hours"}
    })

License

MIT LICENSE (see LICENSE file)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-kairosdb-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file python-kairosdb-0.1.0.tar.gz.

File metadata

File hashes

Hashes for python-kairosdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aad4b2eb5102603217cbde2abe2969185b8a319aefbbd2217ef89475cb458fa6
MD5 e974816ba3fcee57242c668b88eec6cf
BLAKE2b-256 50727de289de5ee6651aa685ade2cc5e8ffcd99543034168d4abba5588d667f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page