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
Hashes for nakivo_prometheus_exporter-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8b750d12a276c7d5cfac12deee748b342077d90873b0ec73e154b9024e381a4 |
|
MD5 | 9d64a95651c9ed5e380d9ed15e37f843 |
|
BLAKE2b-256 | e9a48048f4d61aff3275d4bd1818b3f1555c0cb27592ab2b918b61552247e4ab |
Hashes for nakivo_prometheus_exporter-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7877670029c812cae47f422af4cc41d622c779f33c86dc6f22ea0b43a0d39979 |
|
MD5 | eae24caa7ddee61bbf1c7f63b5600abf |
|
BLAKE2b-256 | ab6fcbbbf457884f29791c648c63e5ffdb73c0060b56c4c46b91688b0c5828f2 |