Compare commits

...

268 Commits

Author SHA1 Message Date
Vincent Composieux b5811c1270
Merge pull request #230 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.19.1
Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1
2024-05-12 11:36:10 +02:00
Vincent Composieux ce72fc9c6b
Merge pull request #229 from eko/dependabot/go_modules/golang.org/x/net-0.25.0
Bump golang.org/x/net from 0.24.0 to 0.25.0
2024-05-12 11:35:53 +02:00
dependabot[bot] e61c86171e
Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 04:54:07 +00:00
dependabot[bot] e1fe857873
Bump golang.org/x/net from 0.24.0 to 0.25.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/net/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 04:59:19 +00:00
Vincent Composieux ccb90d98f2
Merge pull request #224 from jab416171/patch-1
Update dashboard.json to modern version of grafana
2024-05-01 12:10:20 +02:00
Vincent Composieux 1b91d9e71b
Merge pull request #227 from santigz/master
Add queries_last_10min metric
2024-04-27 00:23:39 +02:00
santigz 031d2a2bfe Update README.md 2024-04-21 18:46:55 +02:00
santigz 860c4b6491 Add queries_last_10min metric 2024-04-21 18:37:31 +02:00
Vincent Composieux d826a22fb7
Merge pull request #226 from eko/dependabot/go_modules/golang.org/x/net-0.24.0
Bump golang.org/x/net from 0.22.0 to 0.24.0
2024-04-05 22:08:10 +02:00
dependabot[bot] 02daa96fdd
Bump golang.org/x/net from 0.22.0 to 0.24.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.24.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 04:08:41 +00:00
jab416171 df6d2408f1 Update dashboard.json to modern version of grafana 2024-03-31 11:16:10 -06:00
Vincent Composieux ab365886eb
Merge pull request #222 from vremenar/master
Simplify docker-compose
2024-03-16 21:05:55 +01:00
Vladimir Remenar cb2c02c31a Simplify docker-compose 2024-03-16 19:48:02 +01:00
Vincent Composieux 46cdb43daa
Merge pull request #221 from eko/dependabot/go_modules/google.golang.org/protobuf-1.33.0
Bump google.golang.org/protobuf from 1.32.0 to 1.33.0
2024-03-16 15:10:40 +01:00
dependabot[bot] 6ce099917a
Bump google.golang.org/protobuf from 1.32.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 23:39:15 +00:00
Vincent Composieux 02dc72834f
Merge pull request #219 from eko/dependabot/go_modules/github.com/stretchr/testify-1.9.0
Bump github.com/stretchr/testify from 1.8.4 to 1.9.0
2024-03-10 11:03:37 +01:00
Vincent Composieux 5c1133bc45
Merge pull request #220 from eko/dependabot/go_modules/golang.org/x/net-0.22.0
Bump golang.org/x/net from 0.21.0 to 0.22.0
2024-03-10 11:03:14 +01:00
dependabot[bot] 9f012f8195
Bump golang.org/x/net from 0.21.0 to 0.22.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/net/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 04:51:00 +00:00
dependabot[bot] 441a46ac5c
Bump github.com/stretchr/testify from 1.8.4 to 1.9.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 04:48:49 +00:00
Vincent Composieux ed1b71619e
Merge pull request #218 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.19.0
Bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0
2024-03-03 15:38:41 +01:00
dependabot[bot] 553989e318
Bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.18.0 to 1.19.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.19.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 04:26:43 +00:00
Vincent Composieux 976d395b3b
Merge pull request #217 from eko/dependabot/go_modules/golang.org/x/net-0.21.0
Bump golang.org/x/net from 0.20.0 to 0.21.0
2024-02-08 18:31:17 +01:00
dependabot[bot] 7726302721
Bump golang.org/x/net from 0.20.0 to 0.21.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 04:43:04 +00:00
Vincent Composieux 8d2fbd8aaf
Merge pull request #216 from eko/dependabot/go_modules/golang.org/x/net-0.20.0
Bump golang.org/x/net from 0.19.0 to 0.20.0
2024-01-11 08:01:19 +01:00
dependabot[bot] d919cae7ad
Bump golang.org/x/net from 0.19.0 to 0.20.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/net/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 04:06:53 +00:00
Vincent Composieux 4fcee1c181
Merge pull request #215 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.18.0
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0
2023-12-29 15:15:21 +01:00
dependabot[bot] 506a2bcd3c
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.18.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-28 04:51:28 +00:00
Vincent Composieux 57c3fdf616
Merge pull request #213 from eko/dependabot/go_modules/golang.org/x/net-0.19.0
Bump golang.org/x/net from 0.18.0 to 0.19.0
2023-12-08 20:02:17 +01:00
Vincent Composieux 0826699dc4
Merge pull request #214 from eko/dependabot/docker/golang-1.21.5-alpine3.17
Bump golang from 1.21.4-alpine3.17 to 1.21.5-alpine3.17
2023-12-08 20:02:04 +01:00
dependabot[bot] 4fb7a8d5b9
Bump golang from 1.21.4-alpine3.17 to 1.21.5-alpine3.17
Bumps golang from 1.21.4-alpine3.17 to 1.21.5-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 04:41:19 +00:00
dependabot[bot] e2a0409ed7
Bump golang.org/x/net from 0.18.0 to 0.19.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/net/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 04:22:49 +00:00
Vincent Composieux 085b3bbbec
Merge pull request #211 from csmarchbanks/avoid-auth-panic
Avoid Panic During Authentication
2023-11-18 13:15:55 +01:00
Chris Marchbanks 179b605128
Avoid Panic During Authentication
If a request to the statistics endpoint fails then resp is nil causing a
panic when looking for cookies. Properly handle errors when
authenticating to avoid crashing the exporter.
2023-11-16 23:33:19 -07:00
Vincent Composieux 71f84fa416
Merge pull request #209 from eko/dependabot/docker/golang-1.21.4-alpine3.17
Bump golang from 1.21.3-alpine3.17 to 1.21.4-alpine3.17
2023-11-11 09:05:19 +01:00
Vincent Composieux 154af70380
Merge pull request #210 from eko/dependabot/go_modules/golang.org/x/net-0.18.0
Bump golang.org/x/net from 0.17.0 to 0.18.0
2023-11-11 09:05:04 +01:00
dependabot[bot] a0a8a70fee
Bump golang.org/x/net from 0.17.0 to 0.18.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-09 04:37:06 +00:00
dependabot[bot] 2082bbc352
Bump golang from 1.21.3-alpine3.17 to 1.21.4-alpine3.17
Bumps golang from 1.21.3-alpine3.17 to 1.21.4-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-08 04:27:12 +00:00
Vincent Composieux 9e9e40abe5
Merge pull request #207 from eko/dependabot/docker/golang-1.21.3-alpine3.17
Bump golang from 1.21.2-alpine3.17 to 1.21.3-alpine3.17
2023-10-12 23:09:09 +02:00
Vincent Composieux 38dcba4c90
Merge pull request #208 from eko/dependabot/go_modules/golang.org/x/net-0.17.0
Bump golang.org/x/net from 0.16.0 to 0.17.0
2023-10-12 23:08:59 +02:00
dependabot[bot] 82c0dae4a0
Bump golang.org/x/net from 0.16.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 04:23:44 +00:00
dependabot[bot] 5ca87ecdca
Bump golang from 1.21.2-alpine3.17 to 1.21.3-alpine3.17
Bumps golang from 1.21.2-alpine3.17 to 1.21.3-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 04:04:01 +00:00
Vincent Composieux 4c35b99235
Merge pull request #204 from eko/dependabot/go_modules/golang.org/x/net-0.16.0
Bump golang.org/x/net from 0.15.0 to 0.16.0
2023-10-08 22:58:15 +02:00
Vincent Composieux 00fa6de9f0
Merge pull request #205 from eko/dependabot/docker/golang-1.21.2-alpine3.17
Bump golang from 1.21.1-alpine3.17 to 1.21.2-alpine3.17
2023-10-08 22:58:02 +02:00
dependabot[bot] 271fad659c
Bump golang from 1.21.1-alpine3.17 to 1.21.2-alpine3.17
Bumps golang from 1.21.1-alpine3.17 to 1.21.2-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 04:42:39 +00:00
dependabot[bot] b25564e6b5
Bump golang.org/x/net from 0.15.0 to 0.16.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.16.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 04:24:25 +00:00
Vincent Composieux 79cea12c6a
Merge pull request #203 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.17.0
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0
2023-09-28 08:50:59 +02:00
dependabot[bot] baed8424df
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.17.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-28 04:24:21 +00:00
Vincent Composieux 17c23872de
Merge pull request #200 from eko/dependabot/go_modules/golang.org/x/net-0.15.0
Bump golang.org/x/net from 0.14.0 to 0.15.0
2023-09-08 23:30:37 +02:00
Vincent Composieux 25b9b278c7
Merge pull request #201 from eko/dependabot/docker/golang-1.21.1-alpine3.17
Bump golang from 1.21.0-alpine3.17 to 1.21.1-alpine3.17
2023-09-08 23:30:23 +02:00
dependabot[bot] 877e724060
Bump golang from 1.21.0-alpine3.17 to 1.21.1-alpine3.17
Bumps golang from 1.21.0-alpine3.17 to 1.21.1-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 04:21:13 +00:00
dependabot[bot] 1cd6e36673
Bump golang.org/x/net from 0.14.0 to 0.15.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/net/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 04:34:10 +00:00
Vincent Composieux 8e540a53c2
Merge pull request #199 from webash/webash-patch-1
Update README.md; spurious comma
2023-08-29 08:44:20 +02:00
Ashley e68f6c37a0
Update README.md; spurious comma
Spurious comma in the example for specifying environment variables targeting multiple endpoints, but with a singular config.
2023-08-20 21:13:53 +01:00
Vincent Composieux 42b036b560
Merge pull request #197 from eko/dependabot/go_modules/golang.org/x/net-0.14.0
Bump golang.org/x/net from 0.13.0 to 0.14.0
2023-08-10 22:34:19 +02:00
Vincent Composieux e80fd9e151
Merge pull request #198 from eko/dependabot/docker/golang-1.21.0-alpine3.17
Bump golang from 1.20.7-alpine3.17 to 1.21.0-alpine3.17
2023-08-10 22:34:08 +02:00
dependabot[bot] 6d3bf07525
Bump golang from 1.20.7-alpine3.17 to 1.21.0-alpine3.17
Bumps golang from 1.20.7-alpine3.17 to 1.21.0-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 04:19:57 +00:00
dependabot[bot] ebaaa73f9a
Bump golang.org/x/net from 0.13.0 to 0.14.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/net/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 04:32:08 +00:00
Vincent Composieux ebbb4e6e62
Merge pull request #195 from eko/dependabot/docker/golang-1.20.7-alpine3.17
Bump golang from 1.20.6-alpine3.17 to 1.20.7-alpine3.17
2023-08-02 22:20:11 +02:00
Vincent Composieux b26e316390
Merge pull request #196 from eko/dependabot/go_modules/golang.org/x/net-0.13.0
Bump golang.org/x/net from 0.12.0 to 0.13.0
2023-08-02 22:20:00 +02:00
dependabot[bot] 582376df22
Bump golang.org/x/net from 0.12.0 to 0.13.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/net/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 04:17:19 +00:00
dependabot[bot] ef79e3b50a
Bump golang from 1.20.6-alpine3.17 to 1.20.7-alpine3.17
Bumps golang from 1.20.6-alpine3.17 to 1.20.7-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 04:13:51 +00:00
Vincent Composieux 40a68995fe
Merge pull request #194 from darnfish/fix-caps
(style) Fix capitalisation
2023-07-27 22:23:58 +02:00
William Gibson a222743675
Emojis are important 2023-07-26 03:15:50 -04:00
William Gibson d148c6d95d
Fix caps 2023-07-26 03:15:44 -04:00
Vincent Composieux 4dad8e2fe3
Merge pull request #192 from eko/dependabot/docker/golang-1.20.6-alpine3.17
Bump golang from 1.20.5-alpine3.17 to 1.20.6-alpine3.17
2023-07-14 19:17:30 +02:00
dependabot[bot] ec2233d3b0
Bump golang from 1.20.5-alpine3.17 to 1.20.6-alpine3.17
Bumps golang from 1.20.5-alpine3.17 to 1.20.6-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 04:31:01 +00:00
Vincent Composieux 2364499928
Merge pull request #191 from eko/dependabot/go_modules/golang.org/x/net-0.12.0
Bump golang.org/x/net from 0.11.0 to 0.12.0
2023-07-09 00:13:07 +02:00
dependabot[bot] c14187e44b
Bump golang.org/x/net from 0.11.0 to 0.12.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/net/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 04:47:02 +00:00
Vincent Composieux d23863c3ac
Merge pull request #189 from eko/dependabot/go_modules/golang.org/x/net-0.11.0
Bump golang.org/x/net from 0.10.0 to 0.11.0
2023-06-17 07:33:16 +02:00
Vincent Composieux a7666bcd4d
Merge pull request #190 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.16.0
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0
2023-06-17 07:33:05 +02:00
dependabot[bot] 7f89d43ea5
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-16 04:59:11 +00:00
dependabot[bot] 1a1cee2b13
Bump golang.org/x/net from 0.10.0 to 0.11.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 04:59:02 +00:00
Vincent Composieux 30358a561e
Merge pull request #188 from eko/dependabot/docker/golang-1.20.5-alpine3.17
Bump golang from 1.20.4-alpine3.17 to 1.20.5-alpine3.17
2023-06-10 10:41:25 +02:00
dependabot[bot] 90bcd1837c
Bump golang from 1.20.4-alpine3.17 to 1.20.5-alpine3.17
Bumps golang from 1.20.4-alpine3.17 to 1.20.5-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 04:59:49 +00:00
Vincent Composieux b9addb87f0
Merge pull request #187 from eko/dependabot/go_modules/github.com/sirupsen/logrus-1.9.3
Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
2023-06-06 18:28:00 +02:00
dependabot[bot] dfa6da32f6
Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 05:00:15 +00:00
Vincent Composieux 329b4c6ad3
Merge pull request #186 from eko/dependabot/go_modules/github.com/stretchr/testify-1.8.4
Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
2023-05-31 08:53:48 +02:00
dependabot[bot] bcd35fffb3
Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 04:58:57 +00:00
Vincent Composieux 19d6849f2c
Merge pull request #185 from eko/dependabot/go_modules/github.com/stretchr/testify-1.8.3
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3
2023-05-20 16:21:06 +02:00
dependabot[bot] a8f1bc380e
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-20 14:06:09 +00:00
Vincent Composieux 2f244188e9
Merge pull request #184 from eko/dependabot/go_modules/github.com/sirupsen/logrus-1.9.2
Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
2023-05-20 16:05:12 +02:00
dependabot[bot] e62cf3ce44
Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.2.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 04:59:55 +00:00
Vincent Composieux 1818156b36
Merge pull request #182 from eko/dependabot/go_modules/golang.org/x/net-0.10.0
Bump golang.org/x/net from 0.9.0 to 0.10.0
2023-05-12 20:18:56 +02:00
dependabot[bot] 3399b2817c
Bump golang.org/x/net from 0.9.0 to 0.10.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/net/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-09 04:59:16 +00:00
Vincent Composieux 011a9c7f60
Merge pull request #181 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.15.1
Bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1
2023-05-04 23:13:01 +02:00
dependabot[bot] 56d33f7b52
Bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 04:58:57 +00:00
Vincent Composieux f500e1bc70
Merge pull request #180 from eko/dependabot/docker/golang-1.20.4-alpine3.17
Bump golang from 1.20.3-alpine3.17 to 1.20.4-alpine3.17
2023-05-03 22:28:25 +02:00
dependabot[bot] a8f43f8873
Bump golang from 1.20.3-alpine3.17 to 1.20.4-alpine3.17
Bumps golang from 1.20.3-alpine3.17 to 1.20.4-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 04:58:13 +00:00
Vincent Composieux 5759f3ff42
Merge pull request #179 from zhengyi13/add-bind-addr-support
Teach pihole-exporter how to bind to a specific interface.
2023-05-02 22:11:33 +02:00
Justin M 62f51680c5 Teach pihole-exporter how to bind to a specific interface. 2023-05-01 10:02:10 -07:00
Vincent Composieux 7095927491
Merge pull request #178 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.15.0
Bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0
2023-04-15 07:43:39 +02:00
dependabot[bot] 5d5a5fc2c4
Bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 04:59:00 +00:00
Vincent Composieux f07519d156
Merge pull request #177 from eko/dependabot/go_modules/golang.org/x/net-0.9.0
Bump golang.org/x/net from 0.8.0 to 0.9.0
2023-04-09 13:11:43 +02:00
dependabot[bot] d1c7b6b4b1
Bump golang.org/x/net from 0.8.0 to 0.9.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 04:59:04 +00:00
Vincent Composieux cbd6d6a8d0
Merge pull request #176 from eko/dependabot/docker/golang-1.20.3-alpine3.17
Bump golang from 1.20.2-alpine3.17 to 1.20.3-alpine3.17
2023-04-06 20:59:22 +02:00
dependabot[bot] 2012afabd6
Bump golang from 1.20.2-alpine3.17 to 1.20.3-alpine3.17
Bumps golang from 1.20.2-alpine3.17 to 1.20.3-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-05 04:58:39 +00:00
Vincent Composieux 1fc54ccd98
Merge pull request #173 from eko/dependabot/docker/golang-1.20.2-alpine3.17
Bump golang from 1.20.1-alpine3.17 to 1.20.2-alpine3.17
2023-03-08 07:30:15 +01:00
dependabot[bot] 458eaa2f3a
Bump golang from 1.20.1-alpine3.17 to 1.20.2-alpine3.17
Bumps golang from 1.20.1-alpine3.17 to 1.20.2-alpine3.17.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 04:58:45 +00:00
Vincent Composieux 3bda445b63
Merge pull request #172 from eko/dependabot/go_modules/golang.org/x/net-0.8.0
Bump golang.org/x/net from 0.7.0 to 0.8.0
2023-03-07 20:20:37 +01:00
dependabot[bot] f6f173e096
Bump golang.org/x/net from 0.7.0 to 0.8.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 05:02:14 +00:00
Vincent Composieux 178f7ad061
Upgraded dependencies 2023-03-02 20:57:19 +01:00
Vincent Composieux 877c24adb6
Merge pull request #169 from eko/dependabot/go_modules/github.com/stretchr/testify-1.8.2
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
2023-03-01 22:43:10 +01:00
Vincent Composieux 4a662b5d7c
Merge pull request #168 from wblew/bump-golang-1_20
bump golang to 1.20.1 to address  buildvcs=true failure
2023-03-01 22:42:33 +01:00
Vincent Composieux ffad980ef9
Merge pull request #170 from onovy/readme-fix
Fix quotes in README.md
2023-03-01 22:41:39 +01:00
Vincent Composieux 3fdcfc928d
Merge pull request #171 from onovy/reply_types
Add all reply types
2023-03-01 22:41:07 +01:00
Ondřej Nový 7661481b9f Add all reply types 2023-02-27 20:59:36 +01:00
Ondřej Nový 6e55eb5c8a Fix quotes in README.md 2023-02-27 20:08:26 +01:00
dependabot[bot] 7bcca844d5
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 05:01:27 +00:00
William Blew 29fa6a50ab bump golang to 1.20.1 to address buildvcs=true failure
The older golang:1.19.3-alpine3.15 as builder is failing, due to
the go build error 'error obtaining VCS status: exit status 128'.

Bumping the builder image to golang:1.20.1-alpine3.17  fixes
the this go build failure.
2023-02-26 13:40:22 -08:00
Vincent Composieux d446d1b0ea
Merge pull request #166 from eko/dependabot/go_modules/golang.org/x/net-0.7.0
Bump golang.org/x/net from 0.0.0-20220225172249-27dd8689420f to 0.7.0
2023-02-26 22:07:40 +01:00
dependabot[bot] 27bf94f729
Bump golang.org/x/net from 0.0.0-20220225172249-27dd8689420f to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220225172249-27dd8689420f to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 04:21:28 +00:00
Vincent Composieux 9dc1a18b3c
Merge pull request #165 from pbirkle/update-dashboard-urls
Fix Grafana dashboard urls
2023-02-23 18:06:43 +01:00
Patrick Birkle d3086721d4
docs: update dashboard urls 2023-02-22 18:39:05 +01:00
Vincent Composieux 70df0c594c
Merge pull request #162 from cfultz/patch-1
Update README.md 'From Source' section
2023-01-28 10:45:56 +01:00
Caleb Fultz eb0ebf0ace
Update README.md 'From Source' section
Updated the README.md 'From Source' section to reflect the latest Go standard from 'go get' to 'go install' with the correct URL for this project.
2023-01-25 09:39:03 -05:00
Vincent Composieux 3b7aaa0f23
Merge pull request #157 from pecastro/fix_tcp_connection_leak
Close client connection when done.
2022-11-27 10:08:25 +01:00
Paulo E. Castro aa09e7c660
Close client connection when done.
This will take care of cleaning all the lingering connections that would have been left open which would eventually trigger a too many files error or an OOM.
2022-11-25 20:24:50 +00:00
Vincent Composieux 84463e2815
Merge pull request #152 from Galorhallen/master
Minor chores and add pre-commit hooks
2022-11-20 10:19:49 +01:00
Vincent Composieux decec9d4b7
Merge pull request #155 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.14.0
Bump github.com/prometheus/client_golang from 1.13.1 to 1.14.0
2022-11-18 08:10:17 +01:00
dependabot[bot] 5d3b6ec911
Bump github.com/prometheus/client_golang from 1.13.1 to 1.14.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.1 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.13.1...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 04:02:58 +00:00
Vincent Composieux fc7c3faf4f
Merge pull request #153 from eko/dependabot/docker/golang-1.19.3-alpine3.15
Bump golang from 1.19.2-alpine3.15 to 1.19.3-alpine3.15
2022-11-07 07:52:37 +01:00
Vincent Composieux 8f0c60f26d
Merge pull request #154 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.13.1
Bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1
2022-11-07 07:52:21 +01:00
dependabot[bot] cf04a492b6
Bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.13.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-03 04:03:16 +00:00
dependabot[bot] d6006c2a83
Bump golang from 1.19.2-alpine3.15 to 1.19.3-alpine3.15
Bumps golang from 1.19.2-alpine3.15 to 1.19.3-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-02 04:09:01 +00:00
Galorhallen fabf06d272 Add pre-commit 2022-10-25 10:00:54 +02:00
Galorhallen 9a58810747 Merge branch 'master' of github.com:Galorhallen/pihole-exporter 2022-10-25 09:55:56 +02:00
Galorhallen e62bf2af05 Add pre-commit 2022-10-25 09:53:44 +02:00
Galorhallen 55dca92b79 Print go version at startup 2022-10-25 09:43:34 +02:00
Vincent Composieux aa779b3c57
Merge pull request #151 from eko/dependabot/go_modules/github.com/stretchr/testify-1.8.1
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
2022-10-24 07:41:13 +02:00
dependabot[bot] f41783e019
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 04:19:43 +00:00
Vincent Composieux 2428af74c7
Merge pull request #147 from jmherbst/readme-fix
docs: Updating docker run commands with missing port mapping for consistency
2022-10-16 10:28:00 +02:00
Vincent Composieux f275c78577
Merge pull request #148 from jmherbst/warn-missing-auth
Adding warning logging if full metrics set is not available.
2022-10-16 10:27:41 +02:00
Vincent Composieux 1b5d712bc9
Merge pull request #149 from rafi0101/fix-readme-png-url
FIX incorrect file extension in readme
2022-10-16 10:27:07 +02:00
Vincent Composieux 409f1c5eff
Merge pull request #150 from eko/dependabot/docker/golang-1.19.2-alpine3.15
Bump golang from 1.19.1-alpine3.15 to 1.19.2-alpine3.15
2022-10-16 10:26:51 +02:00
dependabot[bot] d458836a6a
Bump golang from 1.19.1-alpine3.15 to 1.19.2-alpine3.15
Bumps golang from 1.19.1-alpine3.15 to 1.19.2-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 05:02:01 +00:00
rafi0101 da114c79ef
FIX incorrect file extension 2022-10-04 11:49:40 +02:00
Jake Herbst b57e6a2e05
Adding warning logging if full metrics set is not available.
This will inform the user that pi-hole auth is missing or incorrect and some metrics will be missing from the exporter
2022-10-03 10:20:33 -04:00
Jake Herbst ec5f746839
docs: Updating docker run commands with missing port mapping for consistency 2022-10-03 09:17:55 -04:00
Vincent Composieux de5e5e783a
Merge pull request #146 from rafi0101/raphael-influxdb2
Grafana Dashboard for Influxdb2
2022-10-02 10:14:43 +02:00
rafi0101 1d4fb6db8f
Fix influxdb2 spelling 2022-10-01 10:54:41 +02:00
rafi0101 c20393c5dd
ADD grafana dashboard for influxdb2 (flux) 2022-10-01 10:53:26 +02:00
Vincent Composieux ccc6bf3445
Merge pull request #144 from eko/dependabot/docker/golang-1.19.1-alpine3.15
Bump golang from 1.19.0-alpine3.15 to 1.19.1-alpine3.15
2022-09-12 07:33:23 +02:00
dependabot[bot] 49da58ae7f
Bump golang from 1.19.0-alpine3.15 to 1.19.1-alpine3.15
Bumps golang from 1.19.0-alpine3.15 to 1.19.1-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-07 04:09:08 +00:00
Vincent Composieux 7f2a01991b
Merge pull request #142 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.13.0
Bump github.com/prometheus/client_golang from 1.12.2 to 1.13.0
2022-08-09 17:31:29 +02:00
dependabot[bot] 2f838be297
Bump github.com/prometheus/client_golang from 1.12.2 to 1.13.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 04:24:46 +00:00
Vincent Composieux 7d2c627996
Merge pull request #141 from eko/dependabot/docker/golang-1.19.0-alpine3.15
Bump golang from 1.19rc2-alpine3.15 to 1.19.0-alpine3.15
2022-08-04 13:38:16 +02:00
dependabot[bot] 350d41065b
Bump golang from 1.19rc2-alpine3.15 to 1.19.0-alpine3.15
Bumps golang from 1.19rc2-alpine3.15 to 1.19.0-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 04:10:25 +00:00
Vincent Composieux d94b9caf87
Merge pull request #140 from eko/dependabot/go_modules/github.com/sirupsen/logrus-1.9.0
Bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0
2022-07-21 20:00:02 +02:00
dependabot[bot] f31c965e9a
Bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 04:15:39 +00:00
Vincent Composieux 2dfe26e596
Update dependabot.yml 2022-07-13 14:46:05 +02:00
Vincent Composieux 963bd4f2cc
Merge pull request #139 from eko/dependabot/docker/golang-1.19rc2-alpine3.15
Bump golang from 1.18.3-alpine3.15 to 1.19rc2-alpine3.15
2022-07-13 14:39:02 +02:00
dependabot[bot] e6e74153e3
Bump golang from 1.18.3-alpine3.15 to 1.19rc2-alpine3.15
Bumps golang from 1.18.3-alpine3.15 to 1.19rc2-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-13 04:18:00 +00:00
Vincent Composieux f1054300a2
Merge pull request #138 from eko/dependabot/go_modules/github.com/stretchr/testify-1.8.0
Bump github.com/stretchr/testify from 1.7.5 to 1.8.0
2022-06-30 20:56:56 +02:00
dependabot[bot] da4304fb4a
Bump github.com/stretchr/testify from 1.7.5 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 04:16:41 +00:00
Vincent Composieux 50d78c15a7
Merge pull request #136 from eko/dependabot/go_modules/github.com/stretchr/testify-1.7.5
Bump github.com/stretchr/testify from 1.7.4 to 1.7.5
2022-06-25 09:00:09 +02:00
dependabot[bot] b78bbe8799
Bump github.com/stretchr/testify from 1.7.4 to 1.7.5
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-24 04:14:22 +00:00
Vincent Composieux 5b3540d271
Merge pull request #135 from eko/dependabot/go_modules/github.com/stretchr/testify-1.7.4
Bump github.com/stretchr/testify from 1.7.2 to 1.7.4
2022-06-21 20:57:10 +02:00
dependabot[bot] a811063dfa
Bump github.com/stretchr/testify from 1.7.2 to 1.7.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 04:14:16 +00:00
Vincent Composieux 2f756d0a89
Merge pull request #134 from eko/dependabot/go_modules/github.com/stretchr/testify-1.7.2
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
2022-06-11 14:35:50 +02:00
dependabot[bot] d4d05d5f30
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 04:11:40 +00:00
Vincent Composieux 8fd83b38f2
Merge pull request #132 from Zozman/addPushToAction
Added `push=true` to docker build output
2022-06-06 22:17:22 +02:00
Vincent Composieux 5fec8a95d1
Merge pull request #131 from eko/dependabot/docker/golang-1.18.3-alpine3.15
Bump golang from 1.18.2-alpine3.15 to 1.18.3-alpine3.15
2022-06-06 22:16:53 +02:00
Vincent Composieux 85925c87ab
Updated to go 1.18 and added master branch latest docker tag 2022-06-06 22:12:37 +02:00
Zozman e2f405f09a Added push=true to build output to ensure all platform builds are pushed to the docker registry 2022-06-05 22:03:56 -07:00
dependabot[bot] aabfa5705c
Bump golang from 1.18.2-alpine3.15 to 1.18.3-alpine3.15
Bumps golang from 1.18.2-alpine3.15 to 1.18.3-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 04:10:19 +00:00
Vincent Composieux 3d7368bd1d
Merge pull request #128 from eko/dependabot/docker/golang-1.18.2-alpine3.15
Bump golang from 1.18.1-alpine3.15 to 1.18.2-alpine3.15
2022-05-21 23:01:04 +02:00
Vincent Composieux 59a2ea907e
Merge pull request #129 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.12.2
Bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2
2022-05-21 23:00:54 +02:00
dependabot[bot] 723c9cde09
Bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 04:12:19 +00:00
dependabot[bot] e5868de44b
Bump golang from 1.18.1-alpine3.15 to 1.18.2-alpine3.15
Bumps golang from 1.18.1-alpine3.15 to 1.18.2-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-11 04:10:41 +00:00
Vincent Composieux cbc17613f0
Merge pull request #127 from eko/dependabot/docker/golang-1.18.1-alpine3.15
Bump golang from 1.18.0-alpine3.15 to 1.18.1-alpine3.15
2022-04-17 11:02:02 +02:00
dependabot[bot] 72363c8de1
Bump golang from 1.18.0-alpine3.15 to 1.18.1-alpine3.15
Bumps golang from 1.18.0-alpine3.15 to 1.18.1-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 04:12:29 +00:00
Vincent Composieux 83c6d5e433
Merge pull request #126 from eko/dependabot/docker/golang-1.18.0-alpine3.15
Bump golang from 1.17-alpine3.15 to 1.18.0-alpine3.15
2022-03-20 10:42:27 +01:00
Vincent Composieux 5a3e8c2ea4
Merge pull request #124 from eko/dependabot/go_modules/github.com/stretchr/testify-1.7.1
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
2022-03-20 10:42:15 +01:00
dependabot[bot] 49a9b2b13c
Bump golang from 1.17-alpine3.15 to 1.18.0-alpine3.15
Bumps golang from 1.17-alpine3.15 to 1.18.0-alpine3.15.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 04:13:43 +00:00
dependabot[bot] b91d7a3d9a
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 04:13:27 +00:00
Vincent Composieux e0cf2d0b6d
Merge pull request #122 from eko/dependabot/go_modules/github.com/sirupsen/logrus-1.8.1
Bump github.com/sirupsen/logrus from 1.6.0 to 1.8.1
2022-02-24 21:23:56 +01:00
dependabot[bot] 2ff3940cd4
Bump github.com/sirupsen/logrus from 1.6.0 to 1.8.1
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.6.0 to 1.8.1.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 04:15:13 +00:00
Vincent Composieux 5ca28527b1
Merge pull request #110 from Galorhallen/async
Connection to Pi-Hole(s) handled in goroutine
2022-02-20 15:11:58 +01:00
Galorhallen c2437c8246 Fix wrong log function 2022-02-10 11:33:09 +01:00
Galorhallen 6fdcc9bb16 Fix modules 2022-02-10 11:21:54 +01:00
Galorhallen 3a7bf0ba16 Fixed conflict in go.mod
Merge branch 'master' into async
2022-02-10 11:12:47 +01:00
Galorhallen b743735aa4 Merge branch 'async' of github.com:Galorhallen/pihole-exporter into async 2022-02-10 11:11:57 +01:00
Vincent Composieux 5242c87cea
Merge pull request #117 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.12.1
Bump github.com/prometheus/client_golang from 1.12.0 to 1.12.1
2022-02-02 21:10:17 +01:00
dependabot[bot] 3a0a02c402
Bump github.com/prometheus/client_golang from 1.12.0 to 1.12.1
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 04:12:38 +00:00
Galorhallen c13fb48352 Merge branch 'master' into async 2022-01-30 11:25:20 +01:00
Galorhallen ecfd7f75fd Fixed empty field in Config String function 2022-01-30 11:23:26 +01:00
Vincent Composieux 828dd30524
Merge pull request #113 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.12.0
Bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0
2022-01-22 10:16:19 +01:00
dependabot[bot] 540c6d2309
Bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 04:13:11 +00:00
Vincent Composieux 5da5728147
Merge pull request #112 from sylr/patch-1
Build releases with go 1.17
2022-01-16 20:13:12 +01:00
Sylvain Rabot 87105fb865
Build releases with go 1.17 2022-01-14 20:20:51 +01:00
Vincent Composieux ca60f3a55e
Merge pull request #109 from Galorhallen/master
Removed print of token/password in logs
2022-01-07 23:06:34 +01:00
Galorhallen ea2e9ab9ce Fix go.mod 2022-01-07 22:57:18 +01:00
Galorhallen 7824dee545 Merge branch 'master' into async 2022-01-07 22:57:00 +01:00
Galorhallen 89284bf1c4 Fix wrong parenthesis 2022-01-07 22:55:31 +01:00
Galorhallen 98f9693ec1 Fix go.mod 2022-01-07 22:54:02 +01:00
Galorhallen e521a908a4 Updated docs 2022-01-05 22:07:23 +01:00
Galorhallen 4381338fae Removed 'interval' configuration. Add timeout 2022-01-05 22:05:32 +01:00
Galorhallen 2a939bf754 Fix error message 2022-01-05 21:58:06 +01:00
Galorhallen 479456edc4 Merge branch 'master' into async 2022-01-05 21:30:47 +01:00
Galorhallen 1d96b5c332 Removed fmt used as log 2022-01-05 21:25:14 +01:00
Galorhallen 0d8f3ea9c9 Merge branch 'master' into async 2022-01-05 21:20:36 +01:00
Galorhallen a31d5c382f Removed print of token and password in Config.String 2022-01-05 21:20:06 +01:00
Galorhallen bda504dbe4 Add async metrics fetch for multiple piholes
parent 8d5586558c
author Galorhallen <andrea.ponte1987@gmail.com> 1640558190 +0100
committer Galorhallen <andrea.ponte1987@gmail.com> 1640821760 +0100

Add test for multiple pihole

Add async mode for multiple piholes

Fixed GitHub Actions go versions

Add test for multiple pihole

Cleanup
2022-01-05 20:54:53 +01:00
Galorhallen e4ddf5c3b1 Add channel 2022-01-05 20:54:53 +01:00
Galorhallen 2c062e5bf9 Woring on logging 2022-01-05 20:44:11 +01:00
Vincent Composieux b06c5833c8
Upgraded to go 1.17 and alpine 3.15 2021-12-31 17:50:55 +01:00
Galorhallen 7009c705bb Add async metrics fetch for multiple piholes
parent 8d5586558c
author Galorhallen <andrea.ponte1987@gmail.com> 1640558190 +0100
committer Galorhallen <andrea.ponte1987@gmail.com> 1640821760 +0100

Add test for multiple pihole

Add async mode for multiple piholes

Fixed GitHub Actions go versions

Add test for multiple pihole

Cleanup
2021-12-30 00:49:33 +01:00
Galorhallen 8d5586558c Add channel 2021-12-30 00:43:34 +01:00
Vincent Composieux cf04392b13 Fixed GitHub Actions go versions 2021-12-30 00:43:34 +01:00
Vincent Composieux 2e99d259b8
Merge pull request #105 from Galorhallen/master
[Bugfix] When multiple host is specified, one port/protocol can't be specified
2021-12-27 15:18:23 +01:00
Galorhallen 035842e305 Add test for multiple pihole 2021-12-26 23:36:30 +01:00
Galorhallen 922b295ba0 Merge branch 'master' of github.com:Galorhallen/pihole-exporter 2021-12-23 13:19:43 +01:00
Galorhallen d4a012d404 Add trim space to env variables and fix protocol index bug 2021-12-23 12:05:26 +01:00
Vincent Composieux b8873c499e
Fixed GitHub Actions go versions 2021-12-22 08:45:08 +01:00
Vincent Composieux 53b1034f19
Merge pull request #104 from Galorhallen/master
Support multiple pihole instances
2021-12-22 08:39:43 +01:00
Galorhallen 3cf4ad6781 Removed commented code 2021-12-21 14:59:21 +01:00
Galorhallen 8170a4c0f7 Add readme 2021-12-18 00:25:23 +01:00
Galorhallen fc19ac5d29 Better /metrics handling 2021-12-10 15:39:22 +01:00
Galorhallen fdbd1a678f Add initial support to multiple pihole servers 2021-12-10 04:48:28 +01:00
Vincent Composieux 53aae16d90
Merge pull request #103 from eko/dependabot/docker/golang-1.17.3-alpine3.13
Bump golang from 1.17.2-alpine3.13 to 1.17.3-alpine3.13
2021-11-06 11:02:53 +01:00
dependabot[bot] a3b90451a1
Bump golang from 1.17.2-alpine3.13 to 1.17.3-alpine3.13
Bumps golang from 1.17.2-alpine3.13 to 1.17.3-alpine3.13.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-05 04:13:13 +00:00
Vincent Composieux 58b8396f9b
Merge pull request #102 from darmiel/patch-1
feat: include sha256sum for release files
2021-10-23 09:34:30 +02:00
Daniel 7709529f1a
feat: include sha256sum for release files 2021-10-18 12:35:35 +02:00
Vincent Composieux 502756592f
Merge pull request #100 from eko/eko-patch-1
Removed CI build on branches and pull requests
2021-10-12 11:49:43 +02:00
Vincent Composieux 0985fda8a7
Update master.yml 2021-10-12 11:48:41 +02:00
Vincent Composieux a1ccafcf33
Merge pull request #99 from eko/dependabot/docker/golang-1.17.2-alpine3.13
Bump golang from 1.17.1-alpine3.13 to 1.17.2-alpine3.13
2021-10-09 09:47:13 +02:00
dependabot[bot] f084c3de61
Bump golang from 1.17.1-alpine3.13 to 1.17.2-alpine3.13
Bumps golang from 1.17.1-alpine3.13 to 1.17.2-alpine3.13.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-08 04:17:10 +00:00
Vincent Composieux 9d50a54945
Merge pull request #96 from tsunam/master
Update test matrix for supported go versions and add example docker-compose.yml
2021-09-26 00:22:21 +02:00
Joshua Jackson e20140af99 fix typo for consistency 2021-09-22 17:49:22 -07:00
Joshua Jackson af7761653d add docker-compose.yml examples
Why do we need this change?
----
Give a practical docker-compose.yml example to make it easier for people
to build and or run within their own compose setups

What effects does this change have?
----
2021-09-22 17:43:58 -07:00
Joshua Jackson 55d5fabbc5 Adjust test build suite to go versions that support %w
Why do we need this change?
----
Go version 1.12 does not support the %w case which requires go >= 1.13.
This resolves the build tests partially failing since 26ddc36a4e
Additionally as we are upgrading to 1.17 for various things ensure that
we test up to those latest version we support
2021-09-22 17:16:24 -07:00
Vincent Composieux 55cb08ca81
Merge pull request #95 from eko/dependabot/docker/golang-1.17.1-alpine3.13
Bump golang from 1.17.0-alpine3.13 to 1.17.1-alpine3.13
2021-09-15 22:02:48 +02:00
dependabot[bot] 99f4005d9b
Bump golang from 1.17.0-alpine3.13 to 1.17.1-alpine3.13
Bumps golang from 1.17.0-alpine3.13 to 1.17.1-alpine3.13.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-10 04:17:26 +00:00
Vincent Composieux d7beaa9dff
Merge pull request #94 from eko/dependabot/go_modules/github.com/xonvanetta/shutdown-0.0.3
Bump github.com/xonvanetta/shutdown from 0.0.2 to 0.0.3
2021-09-04 21:07:46 +02:00
dependabot[bot] 3fd29fc20a
Bump github.com/xonvanetta/shutdown from 0.0.2 to 0.0.3
Bumps [github.com/xonvanetta/shutdown](https://github.com/xonvanetta/shutdown) from 0.0.2 to 0.0.3.
- [Release notes](https://github.com/xonvanetta/shutdown/releases)
- [Commits](https://github.com/xonvanetta/shutdown/compare/v0.0.2...v0.0.3)

---
updated-dependencies:
- dependency-name: github.com/xonvanetta/shutdown
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 04:17:03 +00:00
Vincent Composieux 693df0796b
Merge pull request #92 from xonvanetta/master
only scrape when asked
2021-08-21 16:38:21 +02:00
Vincent Composieux db68ba54da
Merge pull request #93 from eko/dependabot/docker/golang-1.17.0-alpine3.13
Bump golang from 1.16-alpine3.13 to 1.17.0-alpine3.13
2021-08-21 16:33:53 +02:00
dependabot[bot] 112819e7ad
Bump golang from 1.16-alpine3.13 to 1.17.0-alpine3.13
Bumps golang from 1.16-alpine3.13 to 1.17.0-alpine3.13.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-17 04:14:34 +00:00
Vanetta 26ddc36a4e only scrape when asked
will only scape metrics on pihole when asked on /metrics
allow port 0 to be used when using strict https redirects

Resolves: #49
2021-08-16 23:55:05 +02:00
Vincent Composieux ad8778b523
Merge pull request #89 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.11.0
Bump github.com/prometheus/client_golang from 1.10.0 to 1.11.0
2021-06-12 19:00:59 +02:00
dependabot[bot] a561afcc48
Bump github.com/prometheus/client_golang from 1.10.0 to 1.11.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-08 04:15:15 +00:00
Vincent Composieux 26404b7d01
Updated alpine version 2021-06-07 01:32:32 +02:00
Vincent Composieux f78e432c21
Merge pull request #87 from eko/dependabot/docker/golang-1.16.4-alpine3.12
Bump golang from 1.16.3-alpine3.12 to 1.16.4-alpine3.12
2021-05-08 08:47:56 +02:00
dependabot[bot] c8be2ba157
Bump golang from 1.16.3-alpine3.12 to 1.16.4-alpine3.12
Bumps golang from 1.16.3-alpine3.12 to 1.16.4-alpine3.12.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 04:11:40 +00:00
Vincent Composieux 6d25dd576e
Merge pull request #85 from eko/dependabot/go_modules/github.com/heetch/confita-0.10.0
Bump github.com/heetch/confita from 0.9.2 to 0.10.0
2021-05-05 18:37:22 +02:00
dependabot[bot] b8642f2459
Bump github.com/heetch/confita from 0.9.2 to 0.10.0
Bumps [github.com/heetch/confita](https://github.com/heetch/confita) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/heetch/confita/releases)
- [Commits](https://github.com/heetch/confita/compare/v0.9.2...v0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-04 20:38:12 +00:00
Vincent Composieux fccce147d3
Merge pull request #86 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.10.0
Bump github.com/prometheus/client_golang from 1.9.0 to 1.10.0
2021-05-04 22:35:40 +02:00
dependabot[bot] 42ad5dd15d
Bump github.com/prometheus/client_golang from 1.9.0 to 1.10.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.9.0...v1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-02 07:57:04 +00:00
Vincent Composieux 7aa65732f6
Merge pull request #84 from eko/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-05-02 09:43:24 +02:00
dependabot-preview[bot] 0f38ff768d
Upgrade to GitHub-native Dependabot 2021-04-29 15:25:36 +00:00
Vincent Composieux 7ab968aacf
Merge pull request #82 from eko/dependabot/docker/golang-1.16.3-alpine3.12
Bump golang from 1.16.2-alpine3.12 to 1.16.3-alpine3.12
2021-04-07 08:58:31 +02:00
dependabot-preview[bot] 75ba6aa064
Bump golang from 1.16.2-alpine3.12 to 1.16.3-alpine3.12
Bumps golang from 1.16.2-alpine3.12 to 1.16.3-alpine3.12.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-02 04:53:46 +00:00
Vincent Composieux 8f3189edd0
Merge pull request #79 from eko/dependabot/docker/golang-1.16.2-alpine3.12
Bump golang from 1.16.0-alpine3.12 to 1.16.2-alpine3.12
2021-03-19 09:53:39 +01:00
dependabot-preview[bot] 612dd87f53
Bump golang from 1.16.0-alpine3.12 to 1.16.2-alpine3.12
Bumps golang from 1.16.0-alpine3.12 to 1.16.2-alpine3.12.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-12 04:50:42 +00:00
Vincent Composieux 5afdca0f8a
Merge pull request #77 from tabic/fix-dashboard-datasource
Replace hardcoded datasource name with variable
2021-03-10 12:03:01 +01:00
tabic eecbd65864
Replace hardcoded datasource name with variable
The datasource name was hardcoded to `Prometheus`. The dashboard will throw errors if the prometheus datasource is named different.
2021-03-06 17:41:18 +01:00
Vincent Composieux d7d4e6cb0f
Merge pull request #76 from eko/dependabot/docker/golang-1.16.0-alpine3.12
Bump golang from 1.15-alpine3.12 to 1.16.0-alpine3.12
2021-02-24 16:58:01 +01:00
dependabot-preview[bot] 0a17d18e56
Bump golang from 1.15-alpine3.12 to 1.16.0-alpine3.12
Bumps golang from 1.15-alpine3.12 to 1.16.0-alpine3.12.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-17 04:55:28 +00:00
Vincent Composieux 8d90557f00
Merge pull request #71 from wuast94/patch-1
Fix json format of dashboard.json
2021-01-30 11:28:14 +01:00
wuast94 eaef12f63a
Fix json format
There was a "{" at the first line that isnt needed and coused an error when importing the raw json in grafana
2021-01-29 00:54:17 +01:00
Vincent Composieux 714576a11a
Merge pull request #67 from eko/added-darwin-arm
Added darwin/arm architecture
2021-01-01 11:49:11 +01:00
Vincent Composieux af5d1b4059
Added darwin/arm architecture 2020-12-31 08:40:20 +01:00
Vincent Composieux 75be7931d6
Merge pull request #66 from andrewchumchal/master
Having issues with Dashboard
2020-12-30 14:09:24 +01:00
Andrew Chumchal 3f4f4b8249
Update dashboard.json 2020-12-29 16:51:46 -06:00
Andrew Chumchal 33a98de35b
Update dashboard.json 2020-12-29 16:49:37 -06:00
Vincent Composieux b74429e554
Merge pull request #65 from eko/dependabot/go_modules/github.com/prometheus/client_golang-1.9.0
Bump github.com/prometheus/client_golang from 1.8.0 to 1.9.0
2020-12-18 04:45:07 +01:00
dependabot-preview[bot] a2c48cc105
Bump github.com/prometheus/client_golang from 1.8.0 to 1.9.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.8.0...v1.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-17 04:35:56 +00:00
Vincent Composieux 214e6433d7
Upgrade go 1.15 and prometheus client to v1.8.0 2020-11-11 11:20:36 +01:00
23 changed files with 3728 additions and 1350 deletions

View File

@ -1,6 +1,6 @@
# Contributing
PI-Hole exporter is an open source project, completely opened to be a community-driven project.
Pi-hole exporter is an open source project, completely opened to be a community-driven project.
If you'd like to contribute, you are free to do so.

14
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10

31
.github/main.workflow vendored
View File

@ -1,31 +0,0 @@
workflow "Build and Publish" {
on = "push"
resolves = ["Master", "Docker Push"]
}
# Filter for master branch
action "Master" {
uses = "actions/bin/filter@master"
args = "branch master"
}
action "Docker Build" {
uses = "actions/docker/cli@fe7ed3ce992160973df86480b83a2f8ed581cd50"
needs = ["Master"]
args = "build -t pihole-exporter ."
}
action "Docker Registry" {
uses = "actions/docker/login@fe7ed3ce992160973df86480b83a2f8ed581cd50"
env = {
DOCKER_REGISTRY_URL = "docker.pkg.github.com"
}
secrets = ["DOCKER_PASSWORD", "DOCKER_USERNAME"]
needs = ["Docker Build"]
}
action "Docker Push" {
uses = "actions/docker/cli@fe7ed3ce992160973df86480b83a2f8ed581cd50"
args = "push pihole-exporter"
needs = ["Docker Registry"]
}

View File

@ -1,22 +1,19 @@
name: Build/Push (master)
name: Test (master)
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [ '1.12', '1.13', '1.14' ]
go_version: [ '1.20' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go_version }}
@ -26,31 +23,30 @@ jobs:
- name: Run go tests
run: go test -v -cover -race ./...
build:
docker-build:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
include:
- os: linux
arch: amd64
image: scratch
- os: linux
arch: arm
image: arm32v7/alpine:3.11
- os: linux
arch: arm64
image: arm64v8/alpine:3.11
steps:
- uses: actions/checkout@v2
- name: Build and push docker image (${{ matrix.os }}/${{ matrix.arch }})
uses: docker/build-push-action@v1
- uses: actions/checkout@v3
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ekofr/pihole-exporter
tags: ${{ matrix.arch }}
build_args: OS=${{ matrix.os }},ARCH=${{ matrix.arch }},IMAGE=${{ matrix.image }}
- name: Set up docker buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
qemu-version: latest
- name: Docker buildx available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Run docker buildx build
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--output=type=registry,push=true \
--tag ekofr/pihole-exporter:latest \
.

View File

@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [ '1.12', '1.13', '1.14' ]
go_version: [ '1.20' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go_version }}
- run: go get -t -v ./...
- run: go test -v -race ./...
build:
docker-build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: azure/docker-login@v1
with:
@ -48,7 +48,7 @@ jobs:
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--output=type=registry \
--output=type=registry,push=true \
--tag ekofr/pihole-exporter:${{ steps.get_version.outputs.TAG_NAME }} \
.
@ -70,42 +70,47 @@ jobs:
upload_url: ${{ steps.create.outputs.upload_url }}
upload:
runs-on: ubuntu-latest
needs: release
strategy:
matrix:
include:
- os: linux
arch: 386
- os: linux
arch: amd64
- os: linux
arch: arm
- os: darwin
arch: 386
- os: darwin
arch: amd64
- os: windows
arch: 386
- os: ubuntu-latest
goos: linux
goarch: 386
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: ubuntu-latest
goos: linux
goarch: arm
- os: macos-latest
goos: darwin
goarch: amd64
- os: macos-latest
goos: darwin
goarch: arm64
- os: ubuntu-latest
goos: windows
goarch: 386
extension: '.exe'
- os: windows
arch: amd64
- os: ubuntu-latest
goos: windows
goarch: amd64
extension: '.exe'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.14
go-version: '1.20'
- name: Download go dependencies
run: go get -t -v ./...
- name: Install mitchellh/gox to create platform specific releases
run: go install github.com/mitchellh/gox
# Release File
- name: Create release
run: gox -ldflags "-s -w" -os="${{ matrix.os }}" -arch="${{ matrix.arch }}" -output="pihole_exporter-{{.OS}}-{{.Arch}}" -verbose ./...
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags "-s -w" -o pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} ./
- name: Upload release assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
@ -113,6 +118,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}${{ matrix.extension }}
asset_path: ./pihole_exporter-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }}
asset_name: pihole_exporter-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }}
asset_path: ./pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}
asset_name: pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}
asset_content_type: application/octet-stream
# SHA256 Sum File
- name: Create SHA256 sum
run: sha256sum pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} > pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}.sha256.txt
- name: Upload release assets
id: upload-release-sum-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}${{ matrix.extension }}.sha256.txt
asset_path: ./pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}.sha256.txt
asset_name: pihole_exporter-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}.sha256.txt
asset_content_type: application/octet-stream

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
vendor
bin
tmp
.vscode
report.xml
debug

18
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,18 @@
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet
- id: validate-toml
- id: no-go-testing
- id: go-unit-tests
- id: go-build
- id: go-mod-tidy
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-merge-conflict

View File

@ -2,17 +2,15 @@ ARG IMAGE=scratch
ARG OS=linux
ARG ARCH=amd64
FROM golang:alpine3.11 as builder
FROM golang:1.21.5-alpine3.17 as builder
WORKDIR /go/src/github.com/eko/pihole-exporter
COPY . .
RUN apk update && \
apk --no-cache add git alpine-sdk upx
RUN apk --no-cache add git alpine-sdk
RUN GO111MODULE=on go mod vendor
RUN CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH go build -ldflags '-s -w' -o binary ./
RUN upx -f --brute binary
FROM $IMAGE

View File

@ -1,14 +1,17 @@
# PI-Hole Prometheus Exporter
# Pi-hole Prometheus Exporter
![Build/Push (master)](https://github.com/eko/pihole-exporter/workflows/Build/Push%20(master)/badge.svg)
[![GoDoc](https://godoc.org/github.com/eko/pihole-exporter?status.png)](https://godoc.org/github.com/eko/pihole-exporter)
[![GoReportCard](https://goreportcard.com/badge/github.com/eko/pihole-exporter)](https://goreportcard.com/report/github.com/eko/pihole-exporter)
This is a Prometheus exporter for [PI-Hole](https://pi-hole.net/)'s Raspberry PI ad blocker.
This is a Prometheus exporter for [Pi-hole](https://pi-hole.net/)'s Raspberry PI ad blocker.
![Grafana dashboard](https://raw.githubusercontent.com/eko/pihole-exporter/master/dashboard.jpg)
Grafana dashboard is [available here](https://grafana.com/dashboards/10176) on the Grafana dashboard website and also [here](https://raw.githubusercontent.com/eko/pihole-exporter/master/grafana/dashboard.json) on the GitHub repository.
Available Grafana Dasboards:
* Prometheus: [Grafana Labs](https://grafana.com/grafana/dashboards/10176-pi-hole-exporter/) / [JSON/Github](https://raw.githubusercontent.com/eko/pihole-exporter/master/grafana/dashboard.json) --> [Preview](https://raw.githubusercontent.com/eko/pihole-exporter/master/dashboard.jpg)
* InfluxDB 2 (Flux): [Grafana Labs](https://grafana.com/grafana/dashboards/17094-pi-hole-exporter-influxdb-2/) / [JSON/Github](https://raw.githubusercontent.com/eko/pihole-exporter/master/grafana/dashboard-influxdb2.json) --> [Preview](https://raw.githubusercontent.com/eko/pihole-exporter/master/dashboard-influxdb2.png)
## Prerequisites
@ -21,7 +24,6 @@ Grafana dashboard is [available here](https://grafana.com/dashboards/10176) on t
You can download the latest version of the binary built for your architecture here:
* Architecture **i386** [
[Darwin](https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-darwin-386) /
[Linux](https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-linux-386) /
[Windows](https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-windows-386.exe)
]
@ -31,6 +33,7 @@ You can download the latest version of the binary built for your architecture he
[Windows](https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-windows-amd64.exe)
]
* Architecture **arm** [
[Darwin](https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-darwin-arm64) /
[Linux](https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-linux-arm)
]
@ -43,7 +46,6 @@ You can run it using the following example and pass configuration environment va
$ docker run \
-e 'PIHOLE_HOSTNAME=192.168.1.2' \
-e 'PIHOLE_PASSWORD=mypassword' \
-e 'INTERVAL=30s' \
-e 'PORT=9617' \
-p 9617:9617 \
ekofr/pihole-exporter:latest
@ -56,8 +58,8 @@ $ API_TOKEN=$(awk -F= -v key="WEBPASSWORD" '$1==key {print $2}' /etc/pihole/setu
$ docker run \
-e 'PIHOLE_HOSTNAME=192.168.1.2' \
-e "PIHOLE_API_TOKEN=$API_TOKEN" \
-e 'INTERVAL=30s' \
-e 'PORT=9617' \
-p 9617:9617 \
ekofr/pihole-exporter:latest
```
@ -69,18 +71,44 @@ $ docker run \
-e 'PIHOLE_PROTOCOL=https' \
-e 'PIHOLE_HOSTNAME=192.168.1.2' \
-e 'PIHOLE_PASSWORD=mypassword' \
-e 'INTERVAL=30s' \
-e 'PORT=9617' \
-v '/etc/ssl/certs:/etc/ssl/certs:ro' \
-p 9617:9617 \
ekofr/pihole-exporter:latest
```
A single instance of pihole-exporter can monitor multiple pi-holes instances.
To do so, you can specify a list of hostnames, protocols, passwords/API tokens and ports by separating them with commas in their respective environment variable:
```
$ docker run \
-e 'PIHOLE_PROTOCOL=http,http,http" \
-e 'PIHOLE_HOSTNAME=192.168.1.2,192.168.1.3,192.168.1.4"' \
-e "PIHOLE_API_TOKEN=$API_TOKEN1,$API_TOKEN2,$API_TOKEN3" \
-e "PIHOLE_PORT=8080,8081,8080" \
-e 'PORT=9617' \
-p 9617:9617 \
ekofr/pihole-exporter:latest
```
If port, protocol and API token/password is the same for all instances, you can specify them only once:
```
$ docker run \
-e 'PIHOLE_PROTOCOL=http" \
-e 'PIHOLE_HOSTNAME=192.168.1.2,192.168.1.3,192.168.1.4"' \
-e "PIHOLE_API_TOKEN=$API_TOKEN" \
-e "PIHOLE_PORT=8080" \
-e 'PORT=9617' \
-p 9617:9617 \
ekofr/pihole-exporter:latest
```
### From sources
Optionally, you can download and build it from the sources. You have to retrieve the project sources by using one of the following way:
```bash
$ go get -u github.com/eko/pihole-exporter
$ go install github.com/eko/pihole-exporter@latest
# or
$ git clone https://github.com/eko/pihole-exporter.git
```
@ -115,12 +143,12 @@ $ ./pihole_exporter -pihole_hostname 192.168.1.10 -pihole_api_token $API_TOKEN
```bash
2019/05/09 20:19:52 ------------------------------------
2019/05/09 20:19:52 - PI-Hole exporter configuration -
2019/05/09 20:19:52 - Pi-hole exporter configuration -
2019/05/09 20:19:52 ------------------------------------
2019/05/09 20:19:52 PIHoleHostname : 192.168.1.10
2019/05/09 20:19:52 PIHolePassword : azerty
2019/05/09 20:19:52 Port : 9617
2019/05/09 20:19:52 Interval : 10s
2019/05/09 20:19:52 Timeout : 5s
2019/05/09 20:19:52 ------------------------------------
2019/05/09 20:19:52 New Prometheus metric registered: domains_blocked
2019/05/09 20:19:52 New Prometheus metric registered: dns_queries_today
@ -155,19 +183,21 @@ scrape_configs:
## Available CLI options
```bash
# Interval of time the exporter will fetch data from PI-Hole
-interval duration (optional) (default 10s)
# Hostname of the Raspberry PI where PI-Hole is installed
# Hostname of the host(s) where Pi-hole is installed
-pihole_hostname string (optional) (default "127.0.0.1")
# Password defined on the PI-Hole interface
# Password defined on the Pi-hole interface
-pihole_password string (optional)
# Timeout to connect and retrieve data from a Pi-hole instance
-timeout duration (optional) (default 5s)
# WEBPASSWORD / api token defined on the PI-Hole interface at `/etc/pihole/setupVars.conf`
# WEBPASSWORD / api token defined on the Pi-hole interface at `/etc/pihole/setupVars.conf`
-pihole_api_token string (optional)
# Address to be used for the exporter
-bind_addr string (optional) (default "0.0.0.0")
# Port to be used for the exporter
-port string (optional) (default "9617")
```
@ -187,12 +217,13 @@ scrape_configs:
| pihole_unique_clients | This represent the number of unique clients seen |
| pihole_dns_queries_all_types | This represent the number of DNS queries made for all types |
| pihole_reply | This represent the number of replies made for all types |
| pihole_top_queries | This represent the number of top queries made by PI-Hole by domain |
| pihole_top_ads | This represent the number of top ads made by PI-Hole by domain |
| pihole_top_sources | This represent the number of top sources requests made by PI-Hole by source host |
| pihole_forward_destinations | This represent the number of forward destinations requests made by PI-Hole by destination |
| pihole_querytypes | This represent the number of queries made by PI-Hole by type |
| pihole_status | This represent if PI-Hole is enabled |
| pihole_top_queries | This represent the number of top queries made by Pi-hole by domain |
| pihole_top_ads | This represent the number of top ads made by Pi-hole by domain |
| pihole_top_sources | This represent the number of top sources requests made by Pi-hole by source host |
| pihole_forward_destinations | This represent the number of forward destinations requests made by Pi-hole by destination |
| pihole_querytypes | This represent the number of queries made by Pi-hole by type |
| pihole_status | This represent if Pi-hole is enabled |
| queries_last_10min | This represent the number of queries in the last full slot of 10 minutes |
## Pihole-Exporter Helm Chart

View File

@ -2,11 +2,15 @@ package config
import (
"context"
"errors"
"fmt"
"log"
"reflect"
"runtime"
"strings"
"time"
log "github.com/sirupsen/logrus"
"github.com/heetch/confita"
"github.com/heetch/confita/backend"
"github.com/heetch/confita/backend/env"
@ -15,29 +19,41 @@ import (
// Config is the exporter CLI configuration.
type Config struct {
PIHoleProtocol string `config:"pihole_protocol"`
PIHoleHostname string `config:"pihole_hostname"`
PIHolePort uint16 `config:"pihole_port"`
PIHolePassword string `config:"pihole_password"`
PIHoleApiToken string `config:"pihole_api_token"`
Port string `config:"port"`
Interval time.Duration `config:"interval"`
PIHoleProtocol string `config:"pihole_protocol"`
PIHoleHostname string `config:"pihole_hostname"`
PIHolePort uint16 `config:"pihole_port"`
PIHolePassword string `config:"pihole_password"`
PIHoleApiToken string `config:"pihole_api_token"`
BindAddr string `config:"bind_addr"`
Port uint16 `config:"port"`
}
func getDefaultConfig() *Config {
return &Config{
PIHoleProtocol: "http",
PIHoleHostname: "127.0.0.1",
PIHolePort: 80,
PIHolePassword: "",
PIHoleApiToken: "",
Port: "9617",
Interval: 10 * time.Second,
type EnvConfig struct {
PIHoleProtocol []string `config:"pihole_protocol"`
PIHoleHostname []string `config:"pihole_hostname"`
PIHolePort []uint16 `config:"pihole_port"`
PIHolePassword []string `config:"pihole_password"`
PIHoleApiToken []string `config:"pihole_api_token"`
BindAddr string `config:"bind_addr"`
Port uint16 `config:"port"`
Timeout time.Duration `config:"timeout"`
}
func getDefaultEnvConfig() *EnvConfig {
return &EnvConfig{
PIHoleProtocol: []string{"http"},
PIHoleHostname: []string{"127.0.0.1"},
PIHolePort: []uint16{80},
PIHolePassword: []string{},
PIHoleApiToken: []string{},
BindAddr: "0.0.0.0",
Port: 9617,
Timeout: 5 * time.Second,
}
}
// Load method loads the configuration by using both flag or environment variables.
func Load() *Config {
func Load() (*EnvConfig, []Config, error) {
loaders := []backend.Backend{
env.NewBackend(),
flags.NewBackend(),
@ -45,7 +61,7 @@ func Load() *Config {
loader := confita.NewLoader(loaders...)
cfg := getDefaultConfig()
cfg := getDefaultEnvConfig()
err := loader.Load(context.Background(), cfg)
if err != nil {
panic(err)
@ -53,30 +69,150 @@ func Load() *Config {
cfg.show()
return cfg
if clientsConfig, err := cfg.Split(); err != nil {
return cfg, nil, err
} else {
return cfg, clientsConfig, nil
}
}
func (c Config) show() {
func (c *Config) String() string {
ref := reflect.ValueOf(c)
fields := ref.Elem()
buffer := make([]string, fields.NumField(), fields.NumField())
for i := 0; i < fields.NumField(); i++ {
valueField := fields.Field(i)
typeField := fields.Type().Field(i)
if typeField.Name != "PIHolePassword" && typeField.Name != "PIHoleApiToken" {
buffer[i] = fmt.Sprintf("%s=%v", typeField.Name, valueField.Interface())
} else if valueField.Len() > 0 {
buffer[i] = fmt.Sprintf("%s=%s", typeField.Name, "*****")
}
}
buffer = removeEmptyString(buffer)
return fmt.Sprintf("<Config@%X %s>", &c, strings.Join(buffer, ", "))
}
// Validate check if the config is valid
func (c Config) Validate() error {
if c.PIHoleProtocol != "http" && c.PIHoleProtocol != "https" {
return fmt.Errorf("protocol %s is invalid. Must be http or https", c.PIHoleProtocol)
}
return nil
}
func (c EnvConfig) Split() ([]Config, error) {
hostsCount := len(c.PIHoleHostname)
result := make([]Config, 0, hostsCount)
for i, hostname := range c.PIHoleHostname {
config := Config{
PIHoleHostname: strings.TrimSpace(hostname),
}
if len(c.PIHolePort) == 1 {
config.PIHolePort = c.PIHolePort[0]
} else if len(c.PIHolePort) == hostsCount {
config.PIHolePort = c.PIHolePort[i]
} else if len(c.PIHolePort) != 0 {
return nil, errors.New("Wrong number of ports. Port can be empty to use default, one value to use for all hosts, or match the number of hosts")
}
if hasData, data, isValid := extractStringConfig(c.PIHoleProtocol, i, hostsCount); hasData {
config.PIHoleProtocol = data
} else if !isValid {
return nil, errors.New("Wrong number of PIHoleProtocol. PIHoleProtocol can be empty to use default, one value to use for all hosts, or match the number of hosts")
}
if hasData, data, isValid := extractStringConfig(c.PIHoleApiToken, i, hostsCount); hasData {
config.PIHoleApiToken = data
} else if !isValid {
return nil, errors.New(fmt.Sprintf("Wrong number of PIHoleApiToken %d (Hosts: %d). PIHoleApiToken can be empty to use default, one value to use for all hosts, or match the number of hosts", len(c.PIHoleApiToken), hostsCount))
}
if hasData, data, isValid := extractStringConfig(c.PIHolePassword, i, hostsCount); hasData {
config.PIHolePassword = data
} else if !isValid {
return nil, errors.New("Wrong number of PIHolePassword. PIHolePassword can be empty to use default, one value to use for all hosts, or match the number of hosts")
}
result = append(result, config)
}
return result, nil
}
func extractStringConfig(data []string, idx int, hostsCount int) (bool, string, bool) {
if len(data) == 1 {
v := strings.TrimSpace(data[0])
if v != "" {
return true, v, true
}
} else if len(data) == hostsCount {
v := strings.TrimSpace(data[idx])
if v != "" {
return true, v, true
}
} else if len(data) != 0 { //Host count missmatch
return false, "", false
}
// Empty
return false, "", true
}
func removeEmptyString(source []string) []string {
var result []string
for _, s := range source {
if s != "" {
result = append(result, s)
}
}
return result
}
func (c Config) hostnameURL() string {
s := fmt.Sprintf("%s://%s", c.PIHoleProtocol, c.PIHoleHostname)
if c.PIHolePort != 0 {
s += fmt.Sprintf(":%d", c.PIHolePort)
}
return s
}
// PIHoleStatsURL returns the stats url
func (c Config) PIHoleStatsURL() string {
return c.hostnameURL() + "/admin/api.php?summaryRaw&overTimeData&topItems&recentItems&getQueryTypes&getForwardDestinations&getQuerySources&overTimeData10mins&jsonForceObject"
}
// PIHoleLoginURL returns the login url
func (c Config) PIHoleLoginURL() string {
return c.hostnameURL() + "/admin/index.php?login"
}
func (c EnvConfig) show() {
val := reflect.ValueOf(&c).Elem()
log.Println("------------------------------------")
log.Println("- PI-Hole exporter configuration -")
log.Println("------------------------------------")
log.Info("------------------------------------")
log.Info("- Pi-hole exporter configuration -")
log.Info("------------------------------------")
log.Info("Go version: ", runtime.Version())
for i := 0; i < val.NumField(); i++ {
valueField := val.Field(i)
typeField := val.Type().Field(i)
// Do not print password or api token but do print the authentication method
if typeField.Name != "PIHolePassword" && typeField.Name != "PIHoleApiToken" {
log.Println(fmt.Sprintf("%s : %v", typeField.Name, valueField.Interface()))
log.Info(fmt.Sprintf("%s : %v", typeField.Name, valueField.Interface()))
} else {
showAuthenticationMethod(typeField.Name, valueField.String())
showAuthenticationMethod(typeField.Name, valueField.Len())
}
}
log.Println("------------------------------------")
log.Info("------------------------------------")
}
func showAuthenticationMethod(name, value string) {
if len(value) > 0 {
log.Println(fmt.Sprintf("Pi-Hole Authentication Method : %s", name))
func showAuthenticationMethod(name string, length int) {
if length > 0 {
log.Info(fmt.Sprintf("Pi-hole Authentication Method : %s", name))
}
}

View File

@ -0,0 +1,154 @@
package config
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
const (
PIHOLE_HOSTNAME = "PIHOLE_HOSTNAME"
PIHOLE_PORT = "PIHOLE_PORT"
PIHOLE_API_TOKEN = "PIHOLE_API_TOKEN"
PIHOLE_PROTOCOL = "PIHOLE_PROTOCOL"
)
type EnvInitiazlier func(*testing.T)
type TestCase struct {
Name string
Initializer EnvInitiazlier
}
func TestSplitDefault(t *testing.T) {
assert := assert.New(t)
env := getDefaultEnvConfig()
clientConfigs, err := env.Split()
assert.NoError(err)
clientConfig := clientConfigs[0]
assert.Equal("127.0.0.1", clientConfig.PIHoleHostname)
assert.Equal("http", clientConfig.PIHoleProtocol)
assert.Equal(uint16(80), clientConfig.PIHolePort)
assert.Empty(clientConfig.PIHoleApiToken)
assert.Empty(clientConfig.PIHolePassword)
}
func TestSplitMultipleHostWithSameConfig(t *testing.T) {
assert := assert.New(t)
env := getDefaultEnvConfig()
env.PIHoleHostname = []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}
env.PIHoleApiToken = []string{"api-token"}
env.PIHolePort = []uint16{8080}
clientConfigs, err := env.Split()
assert.NoError(err)
assert.Len(clientConfigs, 3)
testCases := []struct {
Host string
Port uint16
Protocol string
}{
{
Host: "127.0.0.1",
Port: 8080,
Protocol: "http",
},
{
Host: "127.0.0.2",
Port: 8080,
Protocol: "http",
},
{
Host: "127.0.0.3",
Port: 8080,
Protocol: "http",
},
}
for i, tc := range testCases {
t.Run(fmt.Sprintf("Test %s", tc.Host), func(t *testing.T) {
clientConfig := clientConfigs[i]
assert.Equal(tc.Host, clientConfig.PIHoleHostname)
assert.Equal(tc.Protocol, clientConfig.PIHoleProtocol)
assert.Equal(tc.Port, clientConfig.PIHolePort)
assert.Equal("api-token", clientConfig.PIHoleApiToken)
assert.Empty(clientConfig.PIHolePassword)
})
}
}
func TestSplitMultipleHostWithMultipleConfigs(t *testing.T) {
assert := assert.New(t)
env := getDefaultEnvConfig()
env.PIHoleHostname = []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}
env.PIHoleApiToken = []string{"api-token1", "", "api-token3"}
env.PIHolePassword = []string{"", "password2", ""}
env.PIHolePort = []uint16{8081, 8082, 8083}
clientConfigs, err := env.Split()
assert.NoError(err)
assert.Len(clientConfigs, 3)
testCases := []struct {
Host string
Port uint16
Protocol string
ApiToken string
Password string
}{
{
Host: "127.0.0.1",
Port: 8081,
Protocol: "http",
ApiToken: "api-token1",
Password: "",
},
{
Host: "127.0.0.2",
Port: 8082,
Protocol: "http",
ApiToken: "",
Password: "password2",
},
{
Host: "127.0.0.3",
Port: 8083,
Protocol: "http",
ApiToken: "api-token3",
Password: "",
},
}
for i, tc := range testCases {
t.Run(fmt.Sprintf("Test %s", tc.Host), func(t *testing.T) {
clientConfig := clientConfigs[i]
assert.Equal(tc.Host, clientConfig.PIHoleHostname)
assert.Equal(tc.Protocol, clientConfig.PIHoleProtocol)
assert.Equal(tc.Port, clientConfig.PIHolePort)
assert.Equal(tc.ApiToken, clientConfig.PIHoleApiToken)
assert.Equal(tc.Password, clientConfig.PIHolePassword)
})
}
}
func TestWrongParams(t *testing.T) {
assert := assert.New(t)
env := getDefaultEnvConfig()
env.PIHoleHostname = []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}
env.PIHoleApiToken = []string{"api-token1", "api-token2"}
env.PIHolePort = []uint16{808}
clientConfigs, err := env.Split()
assert.Errorf(err, "Wrong number of PIHoleApiToken. PIHoleApiToken can be empty to use default, one value to use for all hosts, or match the number of hosts")
assert.Nil(clientConfigs)
}

BIN
dashboard-influxdb2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 KiB

19
docker-compose.yml Normal file
View File

@ -0,0 +1,19 @@
services:
pihole-exporter:
container_name: pihole-exporter
image: ekofr/pihole-exporter:latest
env_file:
- pihole-exporter.env
ports:
- "9617:9617"
logging:
driver: "json-file"
options:
max-size: "5k"
max-file: "5"
healthcheck:
test: ["CMD", "wget", "--tries=1", "--spider", "http://localhost:9617/metrics"]
interval: 300s
retries: 5
timeout: 10s
restart: always

25
go.mod
View File

@ -1,9 +1,26 @@
module github.com/eko/pihole-exporter
go 1.14
go 1.20
require (
github.com/heetch/confita v0.9.2
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
github.com/heetch/confita v0.10.0
github.com/prometheus/client_golang v1.19.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/xonvanetta/shutdown v0.0.3
golang.org/x/net v0.25.0
)
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
golang.org/x/sys v0.20.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

166
go.sum
View File

@ -1,96 +1,55 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=
github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo=
github.com/SermoDigital/jose v0.9.1/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.3+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.0.0-20190423183735-731ef375ac02/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/frankban/quicktest v1.5.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/gocql/gocql v0.0.0-20190423091413-b99afaf3b163/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.8.6/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@ -98,13 +57,10 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v0.9.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-memdb v1.0.1/go.mod h1:I6dKdmYhZqU0RJSheVEWgTNWdVQH5QvTgIUQ0t/t32M=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-plugin v1.0.0/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
@ -116,53 +72,33 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-math-big v0.0.0-20180316142257-561262b71329/go.mod h1:eBwVNKMPVQvPzsL2kU1sgH+Wf3xcmgFCvFSyGDEUSgc=
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hashicorp/vault v0.9.6/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0=
github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q=
github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/heetch/confita v0.9.0 h1:U4Kv+8cA0jyoApNAw8FMwpv1Z/H4+1hCob3P2u2QzKQ=
github.com/heetch/confita v0.9.0/go.mod h1:PQQ3Rx11s2c3+6hB/HIUpD/dZPCRtkXAULzM5w3xeNk=
github.com/heetch/confita v0.9.1 h1:Ccrwry7k0NBuA074JzhpUMzYTtld1FeSkOT30jcHx3s=
github.com/heetch/confita v0.9.1/go.mod h1:W6GDCVPvi2LpvdEriwZTu2fyxuK+Grx1vY302gtWfvM=
github.com/heetch/confita v0.9.2 h1:NNN99OG3xRgvBgpaVSFQht6/JrI7ax2kNKp2ayCSNR0=
github.com/heetch/confita v0.9.2/go.mod h1:W6GDCVPvi2LpvdEriwZTu2fyxuK+Grx1vY302gtWfvM=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jefferai/jsonx v1.0.0/go.mod h1:OGmqmi2tTeI/PS+qQfBDToLHHJIy/RMp24fPo8vFvoQ=
github.com/heetch/confita v0.10.0 h1:00V4eQPDU71v9nZD7N/DsSb9cnPJh59CjrpQPfln47A=
github.com/heetch/confita v0.10.0/go.mod h1:W6GDCVPvi2LpvdEriwZTu2fyxuK+Grx1vY302gtWfvM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/keybase/go-crypto v0.0.0-20190416182011-b785b22cc757/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab/go.mod h1:y1pL58r5z2VvAjeG1VLGc8zOQgSOzbKN7kMHPvFXJ+8=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
@ -176,159 +112,133 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE=
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1 h1:/K3IL0Z1quvmJ7X0A1AwNEK7CRkVK3YwfOU/QAL4WGg=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v0.0.0-20160226084822-572520ed46db/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sethgrid/pester v0.0.0-20180227223404-ed9870dad317/go.mod h1:Ad7IjTpvzZO8Fl0vh9AzQ+j/jYZfyp2diGwI8m5q+ns=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xonvanetta/shutdown v0.0.3 h1:Gf9Rh0kEJgUjV8ZmG08t5MMF+jrBaGzO+EM0GlmitHU=
github.com/xonvanetta/shutdown v0.0.3/go.mod h1:bYnVnX8ITK2E9GpuH/YVfctve/d5oOIvWsyhFj/N450=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190508220229-2d0786266e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/ory-am/dockertest.v3 v3.3.4/go.mod h1:s9mmoLkaGeAh97qygnNj4xWkiN7e1SKekYC6CovU+ek=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,12 @@
package metrics
import (
"log"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
)
var (
// DomainsBlocked - The number of domains being blocked by PI-Hole.
// DomainsBlocked - The number of domains being blocked by Pi-hole.
DomainsBlocked = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "domains_being_blocked",
@ -17,7 +16,7 @@ var (
[]string{"hostname"},
)
// DNSQueriesToday - The number of DNS requests made over PI-Hole over the current day.
// DNSQueriesToday - The number of DNS requests made over Pi-hole over the current day.
DNSQueriesToday = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "dns_queries_today",
@ -27,7 +26,7 @@ var (
[]string{"hostname"},
)
// AdsBlockedToday - The number of ads blocked by PI-Hole over the current day.
// AdsBlockedToday - The number of ads blocked by Pi-hole over the current day.
AdsBlockedToday = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "ads_blocked_today",
@ -37,7 +36,7 @@ var (
[]string{"hostname"},
)
// AdsPercentageToday - The percentage of ads blocked by PI-Hole over the current day.
// AdsPercentageToday - The percentage of ads blocked by Pi-hole over the current day.
AdsPercentageToday = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "ads_percentage_today",
@ -47,7 +46,7 @@ var (
[]string{"hostname"},
)
// UniqueDomains - The number of unique domains seen by PI-Hole.
// UniqueDomains - The number of unique domains seen by Pi-hole.
UniqueDomains = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "unique_domains",
@ -57,7 +56,7 @@ var (
[]string{"hostname"},
)
// QueriesForwarded - The number of queries forwarded by PI-Hole.
// QueriesForwarded - The number of queries forwarded by Pi-hole.
QueriesForwarded = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "queries_forwarded",
@ -67,7 +66,7 @@ var (
[]string{"hostname"},
)
// QueriesCached - The number of queries cached by PI-Hole.
// QueriesCached - The number of queries cached by Pi-hole.
QueriesCached = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "queries_cached",
@ -77,7 +76,7 @@ var (
[]string{"hostname"},
)
// ClientsEverSeen - The number of clients ever seen by PI-Hole.
// ClientsEverSeen - The number of clients ever seen by Pi-hole.
ClientsEverSeen = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "clients_ever_seen",
@ -87,7 +86,7 @@ var (
[]string{"hostname"},
)
// UniqueClients - The number of unique clients seen by PI-Hole.
// UniqueClients - The number of unique clients seen by Pi-hole.
UniqueClients = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "unique_clients",
@ -97,7 +96,7 @@ var (
[]string{"hostname"},
)
// DNSQueriesAllTypes - The number of DNS queries made for all types by PI-Hole.
// DNSQueriesAllTypes - The number of DNS queries made for all types by Pi-hole.
DNSQueriesAllTypes = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "dns_queries_all_types",
@ -107,7 +106,7 @@ var (
[]string{"hostname"},
)
// Reply - The number of replies made for every types by PI-Hole.
// Reply - The number of replies made for every types by Pi-hole.
Reply = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "reply",
@ -117,68 +116,78 @@ var (
[]string{"hostname", "type"},
)
// TopQueries - The number of top queries made by PI-Hole by domain.
// TopQueries - The number of top queries made by Pi-hole by domain.
TopQueries = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "top_queries",
Namespace: "pihole",
Help: "This represent the number of top queries made by PI-Hole by domain",
Help: "This represent the number of top queries made by Pi-hole by domain",
},
[]string{"hostname", "domain"},
)
// TopAds - The number of top ads made by PI-Hole by domain.
// TopAds - The number of top ads made by Pi-hole by domain.
TopAds = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "top_ads",
Namespace: "pihole",
Help: "This represent the number of top ads made by PI-Hole by domain",
Help: "This represent the number of top ads made by Pi-hole by domain",
},
[]string{"hostname", "domain"},
)
// TopSources - The number of top sources requests made by PI-Hole by source host.
// TopSources - The number of top sources requests made by Pi-hole by source host.
TopSources = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "top_sources",
Namespace: "pihole",
Help: "This represent the number of top sources requests made by PI-Hole by source host",
Help: "This represent the number of top sources requests made by Pi-hole by source host",
},
[]string{"hostname", "source"},
)
// ForwardDestinations - The number of forward destinations requests made by PI-Hole by destination.
// ForwardDestinations - The number of forward destinations requests made by Pi-hole by destination.
ForwardDestinations = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "forward_destinations",
Namespace: "pihole",
Help: "This represent the number of forward destinations requests made by PI-Hole by destination",
Help: "This represent the number of forward destinations requests made by Pi-hole by destination",
},
[]string{"hostname", "destination"},
)
// QueryTypes - The number of queries made by PI-Hole by type.
// QueryTypes - The number of queries made by Pi-hole by type.
QueryTypes = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "querytypes",
Namespace: "pihole",
Help: "This represent the number of queries made by PI-Hole by type",
Help: "This represent the number of queries made by Pi-hole by type",
},
[]string{"hostname", "type"},
)
// Status - Is PI-Hole enabled?
// Status - Is Pi-hole enabled?
Status = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "status",
Namespace: "pihole",
Help: "This if PI-Hole is enabled",
Help: "This if Pi-hole is enabled",
},
[]string{"hostname"},
)
// QueriesLast10min - Number of queries in the last full slot of 10 minutes
QueriesLast10min = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "queries_last_10min",
Namespace: "pihole",
Help: "Number of queries in the last full slot of 10 minutes",
},
[]string{"hostname"},
)
)
// Init initializes all Prometheus metrics made available by PI-Hole exporter.
// Init initializes all Prometheus metrics made available by Pi-hole exporter.
func Init() {
initMetric("domains_blocked", DomainsBlocked)
initMetric("dns_queries_today", DNSQueriesToday)
@ -197,9 +206,10 @@ func Init() {
initMetric("forward_destinations", ForwardDestinations)
initMetric("querytypes", QueryTypes)
initMetric("status", Status)
initMetric("queries_last_10min", QueriesLast10min)
}
func initMetric(name string, metric *prometheus.GaugeVec) {
prometheus.MustRegister(metric)
log.Printf("New Prometheus metric registered: %s", name)
log.Info("New Prometheus metric registered: ", name)
}

View File

@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@ -12,111 +11,177 @@ import (
"strings"
"time"
log "github.com/sirupsen/logrus"
"github.com/eko/pihole-exporter/config"
"github.com/eko/pihole-exporter/internal/metrics"
)
var (
loginURLPattern = "%s://%s:%d/admin/index.php?login"
statsURLPattern = "%s://%s:%d/admin/api.php?summaryRaw&overTimeData&topItems&recentItems&getQueryTypes&getForwardDestinations&getQuerySources&jsonForceObject"
type ClientStatus byte
const (
MetricsCollectionInProgress ClientStatus = iota
MetricsCollectionSuccess
MetricsCollectionError
MetricsCollectionTimeout
)
// Client struct is a PI-Hole client to request an instance of a PI-Hole ad blocker.
func (status ClientStatus) String() string {
return []string{"MetricsCollectionInProgress", "MetricsCollectionSuccess", "MetricsCollectionError", "MetricsCollectionTimeout"}[status]
}
type ClientChannel struct {
Status ClientStatus
Err error
}
func (c *ClientChannel) String() string {
if c.Err != nil {
return fmt.Sprintf("ClientChannel<Status: %s, Err: '%s'>", c.Status, c.Err.Error())
} else {
return fmt.Sprintf("ClientChannel<Status: %s, Err: <nil>>", c.Status)
}
}
// Client struct is a Pi-hole client to request an instance of a Pi-hole ad blocker.
type Client struct {
httpClient http.Client
interval time.Duration
protocol string
hostname string
port uint16
password string
sessionID string
apiToken string
config *config.Config
Status chan *ClientChannel
}
// NewClient method initializes a new PI-Hole client.
func NewClient(protocol, hostname string, port uint16, password, apiToken string, interval time.Duration) *Client {
if protocol != "http" && protocol != "https" {
log.Printf("protocol %s is invalid. Must be http or https.", protocol)
// NewClient method initializes a new Pi-hole client.
func NewClient(config *config.Config, envConfig *config.EnvConfig) *Client {
err := config.Validate()
if err != nil {
log.Error(err)
os.Exit(1)
}
log.Printf("Creating client with config %s\n", config)
return &Client{
protocol: protocol,
hostname: hostname,
port: port,
password: password,
apiToken: apiToken,
interval: interval,
config: config,
httpClient: http.Client{
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
Timeout: envConfig.Timeout,
},
Status: make(chan *ClientChannel, 1),
}
}
// Scrape method authenticates and retrieves statistics from PI-Hole JSON API
// and then pass them as Prometheus metrics.
func (c *Client) Scrape() {
for range time.Tick(c.interval) {
stats := c.getStatistics()
func (c *Client) String() string {
return c.config.PIHoleHostname
}
func (c *Client) CollectMetricsAsync(writer http.ResponseWriter, request *http.Request) {
log.Printf("Collecting from %s", c.config.PIHoleHostname)
if stats, err := c.getStatistics(); err == nil {
c.setMetrics(stats)
log.Printf("New tick of statistics: %s", stats.ToString())
c.Status <- &ClientChannel{Status: MetricsCollectionSuccess, Err: nil}
log.Printf("New tick of statistics from %s: %s", c.config.PIHoleHostname, stats)
} else {
c.Status <- &ClientChannel{Status: MetricsCollectionError, Err: err}
}
}
func (c *Client) CollectMetrics(writer http.ResponseWriter, request *http.Request) error {
stats, err := c.getStatistics()
if err != nil {
return err
}
c.setMetrics(stats)
log.Printf("New tick of statistics from %s: %s", c.config.PIHoleHostname, stats)
return nil
}
func (c *Client) GetHostname() string {
return c.config.PIHoleHostname
}
func (c *Client) setMetrics(stats *Stats) {
metrics.DomainsBlocked.WithLabelValues(c.hostname).Set(float64(stats.DomainsBeingBlocked))
metrics.DNSQueriesToday.WithLabelValues(c.hostname).Set(float64(stats.DNSQueriesToday))
metrics.AdsBlockedToday.WithLabelValues(c.hostname).Set(float64(stats.AdsBlockedToday))
metrics.AdsPercentageToday.WithLabelValues(c.hostname).Set(float64(stats.AdsPercentageToday))
metrics.UniqueDomains.WithLabelValues(c.hostname).Set(float64(stats.UniqueDomains))
metrics.QueriesForwarded.WithLabelValues(c.hostname).Set(float64(stats.QueriesForwarded))
metrics.QueriesCached.WithLabelValues(c.hostname).Set(float64(stats.QueriesCached))
metrics.ClientsEverSeen.WithLabelValues(c.hostname).Set(float64(stats.ClientsEverSeen))
metrics.UniqueClients.WithLabelValues(c.hostname).Set(float64(stats.UniqueClients))
metrics.DNSQueriesAllTypes.WithLabelValues(c.hostname).Set(float64(stats.DNSQueriesAllTypes))
metrics.DomainsBlocked.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.DomainsBeingBlocked))
metrics.DNSQueriesToday.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.DNSQueriesToday))
metrics.AdsBlockedToday.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.AdsBlockedToday))
metrics.AdsPercentageToday.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.AdsPercentageToday))
metrics.UniqueDomains.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.UniqueDomains))
metrics.QueriesForwarded.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.QueriesForwarded))
metrics.QueriesCached.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.QueriesCached))
metrics.ClientsEverSeen.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.ClientsEverSeen))
metrics.UniqueClients.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.UniqueClients))
metrics.DNSQueriesAllTypes.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.DNSQueriesAllTypes))
metrics.Reply.WithLabelValues(c.hostname, "no_data").Set(float64(stats.ReplyNoData))
metrics.Reply.WithLabelValues(c.hostname, "nx_domain").Set(float64(stats.ReplyNxDomain))
metrics.Reply.WithLabelValues(c.hostname, "cname").Set(float64(stats.ReplyCname))
metrics.Reply.WithLabelValues(c.hostname, "ip").Set(float64(stats.ReplyIP))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "unknown").Set(float64(stats.ReplyUnknown))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "no_data").Set(float64(stats.ReplyNoData))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "nx_domain").Set(float64(stats.ReplyNxDomain))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "cname").Set(float64(stats.ReplyCname))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "ip").Set(float64(stats.ReplyIP))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "domain").Set(float64(stats.ReplyDomain))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "rr_name").Set(float64(stats.ReplyRRName))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "serv_fail").Set(float64(stats.ReplyServFail))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "refused").Set(float64(stats.ReplyRefused))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "not_imp").Set(float64(stats.ReplyNotImp))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "other").Set(float64(stats.ReplyOther))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "dnssec").Set(float64(stats.ReplyDNSSEC))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "none").Set(float64(stats.ReplyNone))
metrics.Reply.WithLabelValues(c.config.PIHoleHostname, "blob").Set(float64(stats.ReplyBlob))
var isEnabled int = 0
if stats.Status == enabledStatus {
isEnabled = 1
}
metrics.Status.WithLabelValues(c.hostname).Set(float64(isEnabled))
metrics.Status.WithLabelValues(c.config.PIHoleHostname).Set(float64(isEnabled))
// Pi-hole returns a subset of stats when Auth is missing or incorrect.
// This provides a warning to users that metrics are not complete.
if len(stats.TopQueries) == 0 {
log.Warnf("Invalid Authentication - Some metrics may be missing. Please confirm your Pi-hole API token / Password for %s", c.config.PIHoleHostname)
}
for domain, value := range stats.TopQueries {
metrics.TopQueries.WithLabelValues(c.hostname, domain).Set(float64(value))
metrics.TopQueries.WithLabelValues(c.config.PIHoleHostname, domain).Set(float64(value))
}
for domain, value := range stats.TopAds {
metrics.TopAds.WithLabelValues(c.hostname, domain).Set(float64(value))
metrics.TopAds.WithLabelValues(c.config.PIHoleHostname, domain).Set(float64(value))
}
for source, value := range stats.TopSources {
metrics.TopSources.WithLabelValues(c.hostname, source).Set(float64(value))
metrics.TopSources.WithLabelValues(c.config.PIHoleHostname, source).Set(float64(value))
}
for destination, value := range stats.ForwardDestinations {
metrics.ForwardDestinations.WithLabelValues(c.hostname, destination).Set(value)
metrics.ForwardDestinations.WithLabelValues(c.config.PIHoleHostname, destination).Set(value)
}
for queryType, value := range stats.QueryTypes {
metrics.QueryTypes.WithLabelValues(c.hostname, queryType).Set(value)
metrics.QueryTypes.WithLabelValues(c.config.PIHoleHostname, queryType).Set(value)
}
// Pi-hole returns a map of unix epoch time with the number of queries in slots of 10 minutes.
// The last epoch is the current in-progress time slot, with queries still being added.
// We return the second latest epoch, which is definitive.
var lastEpoch, secondLastEpoch int
for timestamp := range stats.DomainsOverTime {
if timestamp > lastEpoch {
secondLastEpoch = lastEpoch
lastEpoch = timestamp
} else if timestamp > secondLastEpoch && timestamp != lastEpoch {
secondLastEpoch = timestamp
}
}
metrics.QueriesLast10min.WithLabelValues(c.config.PIHoleHostname).Set(float64(stats.DomainsOverTime[secondLastEpoch]))
}
func (c *Client) getPHPSessionID() (sessionID string) {
loginURL := fmt.Sprintf(loginURLPattern, c.protocol, c.hostname, c.port)
values := url.Values{"pw": []string{c.password}}
func (c *Client) getPHPSessionID() (string, error) {
values := url.Values{"pw": []string{c.config.PIHolePassword}}
req, err := http.NewRequest("POST", loginURL, strings.NewReader(values.Encode()))
req, err := http.NewRequest("POST", c.config.PIHoleLoginURL(), strings.NewReader(values.Encode()))
if err != nil {
log.Fatal("An error has occured when creating HTTP statistics request", err)
return "", fmt.Errorf("creating HTTP statistics request: %w", err)
}
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
@ -124,64 +189,72 @@ func (c *Client) getPHPSessionID() (sessionID string) {
resp, err := c.httpClient.Do(req)
if err != nil {
log.Printf("An error has occured during login to PI-Hole: %v", err)
return "", fmt.Errorf("loging in to Pi-hole: %w", err)
}
for _, cookie := range resp.Cookies() {
if cookie.Name == "PHPSESSID" {
sessionID = cookie.Value
break
return cookie.Value, nil
}
}
return
return "", fmt.Errorf("no PHPSESSID cookie found")
}
func (c *Client) getStatistics() *Stats {
var stats Stats
func (c *Client) getStatistics() (*Stats, error) {
stats := new(Stats)
statsURL := fmt.Sprintf(statsURLPattern, c.protocol, c.hostname, c.port)
statsURL := c.config.PIHoleStatsURL()
if c.isUsingApiToken() {
statsURL = fmt.Sprintf("%s&auth=%s", statsURL, c.apiToken)
statsURL = fmt.Sprintf("%s&auth=%s", statsURL, c.config.PIHoleApiToken)
}
req, err := http.NewRequest("GET", statsURL, nil)
if err != nil {
log.Fatal("An error has occured when creating HTTP statistics request", err)
return nil, fmt.Errorf("an error has occured when creating HTTP statistics request: %w", err)
}
if c.isUsingPassword() {
c.authenticateRequest(req)
err := c.authenticateRequest(req)
if err != nil {
return nil, fmt.Errorf("an error has occurred authenticating the request: %w", err)
}
}
resp, err := c.httpClient.Do(req)
if err != nil {
log.Println("An error has occured during retrieving PI-Hole statistics", err)
return nil, fmt.Errorf("an error has occured during retrieving Pi-hole statistics: %w", err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Println("Unable to read PI-Hole statistics HTTP response", err)
return nil, fmt.Errorf("unable to read Pi-hole statistics HTTP response: %w", err)
}
err = json.Unmarshal(body, &stats)
err = json.Unmarshal(body, stats)
if err != nil {
log.Println("Unable to unmarshal PI-Hole statistics to statistics struct model", err)
return nil, fmt.Errorf("unable to unmarshal Pi-hole statistics to statistics struct model: %w", err)
}
return &stats
return stats, nil
}
func (c *Client) isUsingPassword() bool {
return len(c.password) > 0
return len(c.config.PIHolePassword) > 0
}
func (c *Client) isUsingApiToken() bool {
return len(c.apiToken) > 0
return len(c.config.PIHoleApiToken) > 0
}
func (c *Client) authenticateRequest(req *http.Request) {
cookie := http.Cookie{Name: "PHPSESSID", Value: c.getPHPSessionID()}
func (c *Client) authenticateRequest(req *http.Request) error {
sessionID, err := c.getPHPSessionID()
if err != nil {
return err
}
cookie := http.Cookie{Name: "PHPSESSID", Value: sessionID}
req.AddCookie(&cookie)
return nil
}

View File

@ -6,7 +6,7 @@ const (
enabledStatus = "enabled"
)
// Stats struct is the PI-Hole statistics JSON API corresponding model.
// Stats struct is the Pi-hole statistics JSON API corresponding model.
type Stats struct {
DomainsBeingBlocked int `json:"domains_being_blocked"`
DNSQueriesToday int `json:"dns_queries_today"`
@ -18,19 +18,30 @@ type Stats struct {
ClientsEverSeen int `json:"clients_ever_seen"`
UniqueClients int `json:"unique_clients"`
DNSQueriesAllTypes int `json:"dns_queries_all_types"`
ReplyUnknown int `json:"reply_UNKNOWN"`
ReplyNoData int `json:"reply_NODATA"`
ReplyNxDomain int `json:"reply_NXDOMAIN"`
ReplyCname int `json:"reply_CNAME"`
ReplyIP int `json:"reply_IP"`
ReplyDomain int `json:"reply_DOMAIN"`
ReplyRRName int `json:"reply_RRNAME"`
ReplyServFail int `json:"reply_SERVFAIL"`
ReplyRefused int `json:"reply_REFUSED"`
ReplyNotImp int `json:"reply_NOTIMP"`
ReplyOther int `json:"reply_OTHER"`
ReplyDNSSEC int `json:"reply_DNSSEC"`
ReplyNone int `json:"reply_NONE"`
ReplyBlob int `json:"reply_BLOB"`
TopQueries map[string]int `json:"top_queries"`
TopAds map[string]int `json:"top_ads"`
TopSources map[string]int `json:"top_sources"`
ForwardDestinations map[string]float64 `json:"forward_destinations"`
QueryTypes map[string]float64 `json:"querytypes"`
Status string `json:"status"`
DomainsOverTime map[int]int `json:"domains_over_time"`
}
// ToString method returns a string of the current statistics struct.
func (s *Stats) ToString() string {
func (s *Stats) String() string {
return fmt.Sprintf("%d ads blocked / %d total DNS queries", s.AdsBlockedToday, s.DNSQueriesAllTypes)
}

View File

@ -1,11 +1,15 @@
package server
import (
"log"
"fmt"
"net/http"
"strconv"
"strings"
"time"
"github.com/eko/pihole-exporter/internal/pihole"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
@ -16,15 +20,34 @@ type Server struct {
// NewServer method initializes a new HTTP server instance and associates
// the different routes that will be used by Prometheus (metrics) or for monitoring (readiness, liveness).
func NewServer(port string) *Server {
func NewServer(addr string, port uint16, clients []*pihole.Client) *Server {
mux := http.NewServeMux()
httpServer := &http.Server{Addr: ":" + port, Handler: mux}
httpServer := &http.Server{
Addr: addr + ":" + strconv.Itoa(int(port)),
Handler: mux,
}
s := &Server{
httpServer: httpServer,
}
mux.Handle("/metrics", promhttp.Handler())
mux.HandleFunc("/metrics", func(writer http.ResponseWriter, request *http.Request) {
log.Printf("request.Header: %v\n", request.Header)
for _, client := range clients {
go client.CollectMetricsAsync(writer, request)
}
for _, client := range clients {
status := <-client.Status
if status.Status == pihole.MetricsCollectionError {
log.Printf("An error occured while contacting %s: %s", client.GetHostname(), status.Err.Error())
}
}
promhttp.Handler().ServeHTTP(writer, request)
})
mux.Handle("/readiness", s.readinessHandler())
mux.Handle("/liveness", s.livenessHandler())
@ -49,20 +72,41 @@ func (s *Server) Stop() {
s.httpServer.Shutdown(ctx)
}
func (s *Server) handleMetrics(clients []*pihole.Client) http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
errors := make([]string, 0)
for _, client := range clients {
if err := client.CollectMetrics(writer, request); err != nil {
errors = append(errors, err.Error())
fmt.Printf("Error %s\n", err)
}
}
if len(errors) == len(clients) {
writer.WriteHeader(http.StatusBadRequest)
body := strings.Join(errors, "\n")
_, _ = writer.Write([]byte(body))
}
promhttp.Handler().ServeHTTP(writer, request)
}
}
func (s *Server) readinessHandler() http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
return func(w http.ResponseWriter, req *http.Request) {
if s.isReady() {
w.WriteHeader(http.StatusOK)
} else {
w.WriteHeader(http.StatusNotFound)
}
})
}
}
func (s *Server) livenessHandler() http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
return func(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusOK)
})
}
}
func (s *Server) isReady() bool {

72
main.go
View File

@ -1,53 +1,55 @@
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"time"
"log"
"github.com/eko/pihole-exporter/config"
"github.com/eko/pihole-exporter/internal/metrics"
"github.com/eko/pihole-exporter/internal/pihole"
"github.com/eko/pihole-exporter/internal/server"
)
const (
name = "pihole-exporter"
)
var (
s *server.Server
"github.com/xonvanetta/shutdown/pkg/shutdown"
)
func main() {
conf := config.Load()
envConf, clientConfigs, err := config.Load()
if err != nil {
log.Fatal(err.Error())
}
metrics.Init()
initPiHoleClient(conf.PIHoleProtocol, conf.PIHoleHostname, conf.PIHolePort, conf.PIHolePassword, conf.PIHoleApiToken, conf.Interval)
initHttpServer(conf.Port)
serverDead := make(chan struct{})
handleExitSignal()
clients := buildClients(clientConfigs, envConf)
s := server.NewServer(envConf.BindAddr, envConf.Port, clients)
go func() {
s.ListenAndServe()
close(serverDead)
}()
ctx := shutdown.Context()
go func() {
<-ctx.Done()
s.Stop()
}()
select {
case <-ctx.Done():
case <-serverDead:
}
log.Println("pihole-exporter HTTP server stopped")
}
func initPiHoleClient(protocol, hostname string, port uint16, password, apiToken string, interval time.Duration) {
client := pihole.NewClient(protocol, hostname, port, password, apiToken, interval)
go client.Scrape()
}
func initHttpServer(port string) {
s = server.NewServer(port)
go s.ListenAndServe()
}
func handleExitSignal() {
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt, syscall.SIGTERM)
<-stop
s.Stop()
fmt.Println(fmt.Sprintf("\n%s HTTP server stopped", name))
func buildClients(clientConfigs []config.Config, envConfig *config.EnvConfig) []*pihole.Client {
clients := make([]*pihole.Client, 0, len(clientConfigs))
for i := range clientConfigs {
clientConfig := &clientConfigs[i]
client := pihole.NewClient(clientConfig, envConfig)
clients = append(clients, client)
}
return clients
}

4
pihole-exporter.env Normal file
View File

@ -0,0 +1,4 @@
PIHOLE_HOSTNAME=pihole # Chage to PiHole's IP address or FQDN
PIHOLE_PASSWORD=MyStrongPassword # Change to your PiHole's password
INTERVAL=90s
PORT=9617