20 Commits

Author SHA1 Message Date
Julian Brost
ce814853c3 Icinga DB Check: don't check runtime update backlog during full sync 2022-06-28 15:35:34 +02:00
Julian Brost
9cfde09ea3 Icinga DB Check: include ongoing dumps in OK message
Also use the "current" and "full dump/sync" terminology in the other messages.
2022-06-28 15:35:34 +02:00
Julian Brost
679e13c686 Icinga DB Check: rename dump/sync related perfdata values
Scope all values using current/last instead of takes/took.
2022-06-28 15:35:34 +02:00
Julian Brost
a452d8c14d Icinga DB Check: add unit hints to all rates 2022-06-28 15:35:34 +02:00
Julian Brost
7593207c12 Icinga DB Check: update not connected message
The check makes no attempt to explicitly connect to Redis, it uses the
connection of the IcingaDB feature, so this message better describes the state
in this situation.
2022-06-28 15:35:34 +02:00
Julian Brost
899f5d1624 Icinga DB Check: fix race-condition with IcingaDB::Start()
IcingaDB::GetConnection() uses IcingaDB::m_Rcon which is only initialized in
IcingaDB::Start(), therefore add a nullptr check to the check command.
Additionally, as m_Rcon is potentially accessed concurrently, add a copy of the
value that is safe for concurrent use.
2022-06-28 15:35:34 +02:00
Julian Brost
7b16c85bc1 Icinga DB Check: remove markdown headings from output
icingadb-web shows multiple lines from the check output collapsed into a single
line. The lines containing just minuses make this look cluttered and making
making it a heading provides little to no benefit. Even when rendering markdown
in the check output at some point, having the lists labeled using normal
paragraphs would look just fine.
2022-06-28 15:35:34 +02:00
Julian Brost
6b6a70be80 Icinga DB Check: rename perfdata values
- Add icinga2_ and icingadb_ prefixes to make clear which component is
  responsible for the value.
- Rename heartbeat_lag to heartbeat_age, describes it better in my opinion and
  sound a bit less like something that should be as close to zero as possible.
- Rename redis_dump/database_sync into full_dump/full_sync as this is how these
  operations are refered to in log messages as well.
- Rename Redis backlog into Redis query backlog, makes it a bit clearer in my
  opinion.
- Rename runtime_backlog into runtime_update_backlog, as the component in
  Icinga DB is called that way and this naming is also exposed in log messages.
- Rename dump_config/state/history into config/state/history_dump, makes it
  sound more natural.
2022-06-28 15:35:34 +02:00
Julian Brost
81aef690d6 Icinga DB Check: rename variables from takes to duration
Sounds more natural in my opinion and I doubt that many users would get that
due to the difference between takes/took, this refers to ongoing dumps.
2022-06-28 15:35:34 +02:00
Julian Brost
782139995c Icinga DB Check: use more natural names for sync/cleanup metrics 2022-06-28 15:35:34 +02:00
Julian Brost
df1073b15c Icinga DB Check: report history and runtime update backlog separately
Probably makes little difference for an end-user, but for support and
development it's great to know which of the two is causing problems.
2022-06-28 15:35:34 +02:00
Julian Brost
ba67c102f3 Icinga DB Check: clearly state Icinga 2 Redis backlog
Should make it easier to understand that this refers to Redis queries issued by
Icinga 2.
2022-06-28 15:35:34 +02:00
Julian Brost
81feecf298 Icinga DB Check: replace nested calls to fmax() with std::max()
Improves readability, even more so after splitting it into separate lines.
2022-06-28 15:35:34 +02:00
Julian Brost
bb3ad133d0 Icinga DB Check: spell out "error" in perfdata 2022-06-28 15:35:34 +02:00
Julian Brost
3391a234b3 Icinga DB Check: fix error message on Redis query error
Not only XREAD queries are performed, so the previous error message was incorrect.
2022-06-28 15:35:34 +02:00
Julian Brost
153d5bae00 Icinga DB Check: remove unused includes 2022-06-28 15:35:34 +02:00
Julian Brost
2810350bc0 Icinga DB Check: rename keys in heartbeat stream
In both C++ and Go, the keys are only used as constant strings, so namespacing
them just adds clutter for the `general:*` keys, therefore remove it.
2022-06-28 15:35:34 +02:00
Julian Brost
dbc8995fc3 Icinga DB Check: remove *_1sec metrics
They add no additional information compared to the *_1min values as it's always
the same value divided by 60 anyways. Adding the actual value from the last
second makes little sense for realistic values of check_interval.
2022-06-28 15:35:34 +02:00
Julian Brost
437948c8f9 Icinga DB Check: read performance data string from Redis
Use the already existing format to pass performance data to Icinga 2 rather
than some new JSON structure. Has the additional benefit of doing more things
in Go than in C++.
2022-06-28 15:35:34 +02:00
Alexander A. Klimov
6eebc7868f Introduce Icinga DB check (like the IDO one) 2022-06-28 15:35:34 +02:00