Skip to main content

License Percentage of issues still open GitHub Release Linux linter

Nakivo Prometheus exporter

This tool connects to Navkio Backup & Replication API endpoints, and fetches licensing and backup information in order to present this data as prometheus metrics that can be pulled via a /metrics endpoint.

Compatibility

This project has been tested on Nakivo Backup & Replication v9 and v10.
It runs on most Linux flavors that have Python 3.6+, and can even run on Windows.

So far, Nakivo requires you to have an enterprise plus license to be able to use the API.

Requires python-pip for setup via dnf install python3-pip or apt-get install python3-pip

Grafana dashboard

The exporter comes with a basic Grafana Dashboard, showing:

  • Licensing status
  • Backup states for objects of per job
  • Backup sizes
  • Backup durations

image image

Quick start

Create a readonly API user (View only role) so your exporter doesn't have more rights than it should. image

Grab yourself a copy of nakivo_prometheus_exporter by running

python3 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 from the systemd directory, 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, and increase the scrape timeout value to one minute (see the prometheus.yml example file).

Other caveats

This is a quick and dirty proof of concept, only fetching backup states/duration/sizes 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])

If some traction is obersved for the project, we might add missing or interesting metrics.

Running on Windows

While this typically targets Linux, one can run this exporter on Windows, as single threaded instance without concurrency. Running as service can be achieved via nssm.

Troubleshooting

You can enable debugging in order to have more info with

export _DEBUG=true
/usr/local/bin/nakivo_prometheus_exporter -c /etc/nakivo_prometheus.exporter.yaml

Like it ?

Write us ;)

Metadata

Release files for nakivo-prometheus-exporter 0.3.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 nakivo-prometheus-exporter 0.3.0
File Size Uploaded
nakivo_prometheus_exporter-0.3.0.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nakivo-prometheus-exporter 0.3.0
File Interpreter ABI Platform
nakivo_prometheus_exporter-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.6 kB

Release files / nakivo_prometheus_exporter-0.3.0.tar.gz

Download URL nakivo_prometheus_exporter-0.3.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
89fa8e7eb778f9562b8ac2e4ad88e83a65b9c91c0059a5050ea69dd266841b0c
BLAKE2b-256 checksum
How to use checksums
0ab597da2a569098c5827f5481d6bc8328c8ddbb69466298eee7b8e95f0cd55f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / nakivo_prometheus_exporter-0.3.0-py3-none-any.whl

Download URL nakivo_prometheus_exporter-0.3.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f57cd810dbd20078f6354e7d4ddb634eeaf5baef9515d323ece21b4ce1a3bd7
BLAKE2b-256 checksum
How to use checksums
5dc92ea27d882b7449352584e98a7bcdcfeb58904724e8998713468795977279
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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