Merge lp:~tcuthbert/turku/turku-api into lp:turku/turku-api
Status: | Merged |
---|---|
Approved by: | Thomas Cuthbert |
Approved revision: | 68 |
Merged at revision: | 67 |
Proposed branch: | lp:~tcuthbert/turku/turku-api |
Merge into: | lp:turku/turku-api |
Diff against target: |
86 lines (+23/-17) 1 file modified
scripts/turku_sick_sources (+23/-17) |
To merge this branch: | bzr merge lp:~tcuthbert/turku/turku-api |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Junien F | Approve | ||
Review via email: mp+397467@code.launchpad.net |
Commit message
Refactor the metrics based on promtheus querying.
Description of the change
This change refactors the way we are exporting the health of backups metrics based on my findings with prometheus querying. Below outlines the required changes:
* Relying on the influx line protocol "timestamp" element is flimsy, influx expects nanosecond precision while telegraf defaults to 1s. So just abandon the whole idea and let telegraf handle the metric timestamp for us.
* Instead of exporting the metrics as either healthy/unhealthy (0/1), encode the health as a label which we can use to filter. The data is just the date last backed up as a unix timestamp. We can then use the prometheus time() function and subtract the date_last_backed value to work out how many days a back up is out of date.
So to figure out what hasn't been backed up in 90 days we can use an expression like `turku_
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.