Commit Graph

5 Commits

Author SHA1 Message Date
Xavier Villaneau ae09ffe3fe Add `hostname` label to `ceph_crash_reports` 2022-06-16 13:20:29 -04:00
Xavier Villaneau 2faa6cb82d Fix comments and docstring in getCrashLs 2022-06-15 17:04:04 -04:00
Xavier Villaneau 3141fef319 Use JSON output from `ceph crash ls` instead of plain output 2022-06-15 17:04:04 -04:00
Xavier Villaneau adf792c3e8 Use ConstMetrics for ceph_crash_reports
Makes the code simpler since we're not tracking state anymore.
Also rewrote the tests to be more in-line with the rest.
2022-06-15 17:04:04 -04:00
Xavier Villaneau 74c89af225 Implement new gauge counting crash reports
New metric: `ceph_crash_reports` which counts the entries returned by
`ceph crash ls` by daemon name and archival status.

This is not the same as `ceph_new_crash_reports` which is the value of
the `RECENT_CRASH` health check, and that only counts the non-archived
errors of the past two weeks. The new metric counts errors as long as
they are not purged (which is done after 1 year by defaults).
2022-06-15 17:04:04 -04:00