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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nakivo_prometheus_exporter-0.0.7.tar.gz.
File metadata
- Download URL: nakivo_prometheus_exporter-0.0.7.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed66b47c39f715799125f29fe29719df423cf4f734540b1e480d866fa3918e5b
|
|
| MD5 |
b874c9aadf3a72eb690441cd7ca2f72b
|
|
| BLAKE2b-256 |
11645912ea935c257ba4fbfa8a9340090f6deda5f1d7b1f1250da6a2c469b47a
|
File details
Details for the file nakivo_prometheus_exporter-0.0.7-py3-none-any.whl.
File metadata
- Download URL: nakivo_prometheus_exporter-0.0.7-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa5d585ca4c441209a8291fa27632a8ed7c8294c85f589900908de846ade54f6
|
|
| MD5 |
e8f8cc110a8f3a4c26d13a1c983c1220
|
|
| BLAKE2b-256 |
e2b7a91b196cdda3092f5ccc7fea3d1932764baa9110242426982c9389eebb7b
|