Skip to main content

Connecto to Nakivo API and export metrics to Prometheus

Project description

Quick and dirty Nakivo Prometheus exporter

This tool connects to Navkio Backup & Replication API endpoint, and fetches licensing and backup state information in order to present this data as prometheus metrics.

Quick start

Grab yourself a copy of nakivo_prometheus_exporter with

pip install nakivo_prometheus_exporter

Create your YAML config file in let's say /etc/nakivo_prometheus_exporter.yaml

http_server:
  listen: 0.0.0.0
  port: 9119
  username: me
  password: MySecret!Password
  # We usually don't authenticate for prometheus exporters
  no_auth: true
  log_file: /var/log/nakivo_prometheus_exporter.log
nakivo_hosts:
  - MyNakivoHost:
    host: https://mynakivohost.tld:4443
    username: readonly
    password: SomeNicePassword
    cert_verify: False
  - AnotherNakivoHost:
    host: https://othernakivo.local:4443
    username: readonly
    password: OtherPasswrod
    cert_verify: True

Once you're done, you can try to run the exporter with

nakivo_prometheus_exporter --config-file=/etc/nakivo_prometheus_eporter.yaml

Once running, you might want to check the metrics with:

curl http://localhost:9119/metrics

If everything works, you can use the provided systemd service file, copy it into /etc/systemd/system and run the service with

systemctl enable --now nakivo_prometheus_exporter

Caveats

Since on every scraping, the exporter connects to ALL Nakivo API endpoints defined in the host section, you should set the scraper interval to something reasonable like 1 hour.

Other caveats

This is a quick and dirty proof of concept, only fetching vm backup state and licensing state.
There's still quiescing information missing (didn't find it in the (Nakivo API)[https://helpcenter.nakivo.com/api-reference/Content/API-Reference-Overview.htm])

There's also some need to add backup sizes and duration.
Will be added if a bit of traction is observed.

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

nakivo_prometheus_exporter-0.0.6.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

nakivo_prometheus_exporter-0.0.6-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nakivo_prometheus_exporter-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a31d04beb18f6eaed75780a707cd026efc8fdcf1ee8ddfd7d9cf543082346bf2
MD5 94e5b602cd4a75b06825ebf30e20d7a9
BLAKE2b-256 2b0188ba6f8a5081c47bea39bc3a6fb00973ec3257ad2f08d59c49ffbc2fb0bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nakivo_prometheus_exporter-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a093b959e69c5c33734b91a733676b047d9bead9a0954652aeaffe6f39952165
MD5 4270441fe072e2a47559ae28452cde51
BLAKE2b-256 1e9cbe90af8c8a0a929caea74e4a74310d8a4d4b4a3a0499b99eaeff1d882159

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