Skip to main content

Exports data from APIs to Prometheus

Project description

garf exporter - Prometheus exporter for garf.

PyPI Downloads PyPI

garf-exporter allows you to transform responses from APIs into metrics consumable for by Prometheus. Simply define a config file with garf queries and run a single garf-exporter command to start exporting in no time!

Installation

pip install garf-exporter

Usage

garf-exporter expects a configuration file that contains garf-queries mapped to collector names.

Config file may contains one or several queries.

- title: test
  query: |
    SELECT
      dimension,
      metric,
      metric_clicks,
      campaign
    FROM resource

To treat any field in SELECT statement as metric prefix with with metric_.

You need to explicitly specify source of API and path to config file to start exporting data.

garf-exporter --source API_SOURCE -c config.yaml

Once garf-exporter is running you can see exposed metrics at localhost:8000/metrics.

Customization

  • --config - path to garf_exporter.yaml, can be taken from local or remote file.
  • --expose-type - type of exposition (http or pushgateway, http is used by default)
  • --host - address of your http server (localhost by default)
  • --port - port of your http server (8000 by default)
  • --delay-minutes - delay in minutes between scrapings (15 by default)

Documentation

Explore full documentation on using garf-exporter

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

garf_exporter-1.0.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

garf_exporter-1.0.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file garf_exporter-1.0.0.tar.gz.

File metadata

  • Download URL: garf_exporter-1.0.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for garf_exporter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ac0ea9e8fbb5038bb0c736276a0d477ca2e1e46f5cdcc719173a9bfee7b9bf52
MD5 8f41c8ac7766ad0e6196dfabd864d473
BLAKE2b-256 5f3ca76e0fc7e9b9cbbbd22ce1ba99cb632524e889a2ea5bab9fb69e50490fd5

See more details on using hashes here.

File details

Details for the file garf_exporter-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: garf_exporter-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for garf_exporter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 171f3d91e09e3c420a07b4959b4f51528c8cd69bf4864fa1ec2492580c0e7187
MD5 77c5bf7e15891d529316e173dbebf5c1
BLAKE2b-256 e9cb263fe17d3879515e11473f8db08fccdb07b787d3ca8fc93d22ab75114329

See more details on using hashes here.

Supported by

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