Crates.io | prometheus_dhcp_exporter |
lib.rs | prometheus_dhcp_exporter |
version | 0.1.0 |
source | src |
created_at | 2019-01-06 19:26:15.640927 |
updated_at | 2019-01-06 19:26:15.640927 |
description | Prometheus DHCP Exporter |
homepage | https://github.com/MindFlavor/prometheus_dhcp_exporter |
repository | https://github.com/MindFlavor/prometheus_dhcp_exporter |
max_upload_size | |
id | 105892 |
size | 12,536 |
A Rust Prometheus exporter for dhcpd_pools
. This tool exports the infmation provided by the dhcpd-pools utility in a format that Prometheus can understand. It's a Rust-only clone of this exporter: https://github.com/atonkyra/dhcp-stats-prometheus.
There is really no need to rewrite this in Rust but I was looking for an excuse to write some Rust. The advantage is this tool does not have a dependency on Python and of course being Rust the memory and CPU footprint is minimal (which is always a good thing).
PATH
environment variable.To compile the latest master version:
git clone https://github.com/MindFlavor/prometheus_dhcp_exporter.git
cd prometheus_dhcp_exporter
cargo install --path .
If you want the latest release you can simply use:
cargo install prometheus_dhcp_exporter
Start the binary with -h
to get the complete syntax. There are just two parameters though:
-v
Verbose mode-p <port>
Specify an alternative port (the default is 9979).Once started, the tool will listen on the specified port (or the default one, 9979, if not specified) and return a Prometheus valid response at the url /metrics
. So to check if the tool is working properly simply browse the http://localhost:9979
(or whichever port you choose).
Now add the exporter to the Prometheus exporters as usual. I recommend to start it as a service.