### PiHole Influx Agent

Push PiHole metrics to Influx DB directly. Supports the Influx DB V2 API.

Usage

Build

Clone the project and use cargo build --release to compile

Run

```bash $ pihole-influx-agent --help pihole-influx-agent 0.1.0

USAGE: pihole-influx-agent [FLAGS] [OPTIONS]

FLAGS: -h, --help Prints help information --influx-https --influx-insecure --pihole-https --pihole-insecure -V, --version Prints version information

OPTIONS: -i, --interval-seconds [default: 30]

ARGS: [env: PIHOLEHOSTNAME=] [env: INFLUXDBHOST=] [env: INFLUXDBTOKEN=] [env: INFLUXDBBUCKET=] [env: INFLUXDBORGID=]

$ RUSTLOG=info PIHOLEHOSTNAME= INFLUXDBHOST= INFLUXDBTOKEN= INFLUXDBORGID= INFLUXDBBUCKET= ./target/debug/pihole-influx-agent --influx-insecure --influx-https [2022-01-15T14:01:44Z INFO piholeinflux_agent] Received summary from PiHole: 32457 domains blocked today ```

Logging can be controlled via the RUST_LOG environment variable

Dashboard
  1. Use the template.json to add a dashboard to the InfluxDB UI.
  2. Choose bucket name from the drop down.