Commit c24193f
committed
fix(plugins): threshold checks use the right metric (#1070)
Three plugins ran their get_state() / oao() call against the wrong
value, silently discarding the check result:
- wildfly-non-xa-datasource-stats and wildfly-xa-datasource-stats:
the "max used" threshold check passed `active_pct` to
`lib.base.get_state(...)` instead of `max_used_pct`, so the plugin
alerted on the wrong metric. The output text already showed
`max_used_pct` correctly, so this only shifts which value is
compared against the thresholds.
- network-connections: the final `lib.base.oao()` call passed a
hardcoded `STATE_OK` instead of the accumulated `state`, discarding
all WARN/CRIT decisions from the loop. The plugin now exits with
the correct accumulated state.
matomo-reporting, mysql-sorts and starface-channel-status were also
flagged in the audit backlog but turned out to be false positives on
closer reading: matomo's no-METRIC branch is an informational "list
everything" mode where STATE_OK is the intended behavior, mysql-sorts
does combine state via `get_worst(state, sort_state)` correctly, and
starface-channel-status passes string thresholds which
`lib.base.get_state()` converts to float internally.1 parent 56c7cf8 commit c24193f
File tree
4 files changed
+10
-6
lines changed- check-plugins
- network-connections
- wildfly-non-xa-datasource-stats
- wildfly-xa-datasource-stats
4 files changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
0 commit comments