Commit Graph

78 Commits

Author SHA1 Message Date
Renovate Bot
0e3bc340f9 chore(deps): update golang docker tag to v1.17.5 2021-12-09 18:07:15 +00:00
0a8edc22d6 chore: update README 2021-12-05 10:08:53 +00:00
8eb5ab412c fix: release workflow 0.1.1 2021-12-05 10:01:31 +00:00
ae1b37e493 chore: build release assets 0.1.0 2021-12-05 09:55:01 +00:00
b0fe4d71de chore!: pin alpine version, and change executable name 2021-12-05 09:50:17 +00:00
cf74740370 chore: update example kubernetes deployment 2021-12-05 09:31:35 +00:00
f0527718e7 chore: move renovate config under github tree 2021-12-05 09:28:53 +00:00
f2e714dce5 chore: update module name 2021-12-05 09:28:25 +00:00
2a885cf111 Merge pull request #1 from nikdoof/renovate/configure
Configure Renovate
2021-12-05 09:20:58 +00:00
Renovate Bot
e9928b404e chore(deps): add renovate.json 2021-12-05 09:20:30 +00:00
375ba14315 Correct ref name 0.0.1 2021-12-05 09:07:55 +00:00
c9492d28d7 Handle tags as well 2021-12-05 09:06:42 +00:00
abcd2e1d9f Add docker build workflow 2021-12-05 09:02:58 +00:00
Dominic Evans
46f04e00fa chore: add golangci config 2021-05-13 10:19:36 +01:00
Dominic Evans
cfb8bf7513 fix: ensure response body is closed 2021-05-13 10:19:36 +01:00
Dominic Evans
8085c2d3ca chore: add .gitignore 2021-05-13 10:19:35 +01:00
Dominic Evans
ef3ac24b07 chore: gofmt/goimports 2021-05-13 10:19:35 +01:00
Dominic Evans
5373e12542 chore: refresh dependencies 2021-05-13 10:12:33 +01:00
Dominic Evans
f3ade9e942 fix: add context-based timeout to HTTP GET 2021-05-13 10:12:18 +01:00
Dominic Evans
10827cf62e fix: add /metrics handler and stop logging 2021-05-13 10:11:32 +01:00
Dominic Evans
baf88bdc78 fix: reset gauge in-between collect() calls
It looks like in the `collect()` loop the `dsl_status` gauge is latched to 1 with the current status label set
```go
c.status.WithLabelValues(
    c.host, c.identifier, status.DSLCfg.Status, status.DSLCfg.Modulation, status.DSLCfg.DataPath).Set(1)
```

However, this means that all historically seen statuses are latched to 1 and never reset to 0:
```
dsl_status{dataPath="",host="192.168.2.1",identifier="BT",modulation="",status="EstablishingLink"} 1
dsl_status{dataPath="",host="192.168.2.1",identifier="BT",modulation="",status="Initializing"} 1
dsl_status{dataPath="",host="192.168.2.1",identifier="BT",modulation="",status="NoSignal"} 1
```

Ideally in the `collect()` loop it would loop over all known status
values and set them to 0 for the ongoing publishes when the status has
changed. However, as a simpler workaround in this commit we just call
`.Reset()` on the gauge before the call to `.Set(1)` and that stops
publishing the metric label for the old statuses
2020-07-03 11:24:12 +00:00
Jake Keeys
2fe6ee5a32 remove options 2020-01-26 16:41:51 +00:00
Jake Keeys
426af4d465 readme tweaks 2020-01-26 15:58:36 +00:00
Jake Keeys
639983d01e Create LICENSE 2020-01-26 15:51:11 +00:00
Jake Keeys
dc00b99d9a add desc, build and run instructions 2020-01-26 15:44:18 +00:00
Jake Keeys
e719b0a702 adds resources 2020-01-26 14:54:09 +00:00
Jake Keeys
542060a14b adds identifier 2020-01-26 13:23:26 +00:00
Jake Keeys
f5de88e5bb init 2020-01-26 12:35:46 +00:00