Add a telegraf interface for metrics
Bug #1797375 reported by
Barry Price
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Livepatch Charm |
Won't Fix
|
Medium
|
Haw Loeung |
Bug Description
It would be nice if we could see, probably via grafana, metrics on livepatch for each instance in any given environment, e.g.:
1. Rundown of units by running kernel
2. Time since last refresh (if the client exposes this)
3. Value of checkState, per unit
4. Value of patchState, per unit
5. Maybe uptime?
There's probably a bit of overlap here, I need to look more closely at what useful info the client actually exposes. But still, this will do to start with.
Writing values into a file that telegraf can read from using its 'file' interface is probably the simplest approach for now.
Related branches
~hloeung/charm-canonical-livepatch:telegraf-metrics
Rejected
for merging
into
charm-canonical-livepatch:master
- Haw Loeung: Disapprove
- BootStack Reviewers: Pending (mr tracking; do not claim) requested
- BootStack Reviewers: Pending requested
- BootStack Reviewers: Pending requested
-
Diff: 346 lines (+328/-0)3 files modifiedsrc/files/canonical_livepatch_status.py (+89/-0)
src/tests/unit/tests/files/canonical-livepatch-status.json (+130/-0)
src/tests/unit/tests/test_canonical_livepatch_stats.py (+109/-0)
Changed in canonical-livepatch-charm: | |
assignee: | nobody → Barry Price (barryprice) |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in charm-canonical-livepatch: | |
assignee: | Barry Price (barryprice) → nobody |
To post a comment you must log in.
You may want to think about something that can be run via the inputs.exec plugin, that's super trivial to do, I knocked out some for the retracers in an hour or so a while back. The telegraf plugin story (i.e. plugins requiring compilation) seems kind of unfortunate but it looks like you may be able to dump a config into /etc/telegraf/ telegraf. d/whatever. conf with your inputs.exec config and have it work sanely, I'll have to test that out.