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-0.0.6.tar.gz (9.8 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-0.0.6-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: garf_exporter-0.0.6.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.5

File hashes

Hashes for garf_exporter-0.0.6.tar.gz
Algorithm Hash digest
SHA256 318275f0d422bf81360ed0a4024c81a17a5375afe070e1cf2879c98cd58c7da9
MD5 dc9a8a68bdbe521f9c4264ac30957e73
BLAKE2b-256 50b83c9c21e7b8e81339815c0d934ed36032ddfc18d3c806b3bbf26a3dc9acff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for garf_exporter-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b71c2de932fc277da9decab3e90608f692365dd48f14d1027b01e0d773bf0497
MD5 593e00ea18a41f4e94792daf261d7459
BLAKE2b-256 a808dacfac37950ba9298c585973cb81c2098dadb789536d6d482118b596d1b1

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