diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-20 23:52:32 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-20 23:52:32 +0100 |
commit | 1d590a0efe4193ac9298d3eba448ab8bc3bb665b (patch) | |
tree | e0161bd9fce96d5415a62d7ed7dc6c0875192dd2 /lib/output.c | |
parent | 07873c765b73c85482436880f122882dfccd7e1b (diff) | |
download | monitoring-plugins-1d590a0efe4193ac9298d3eba448ab8bc3bb665b.tar.gz |
Rename icingaweb2 format to multi-line
Diffstat (limited to 'lib/output.c')
-rw-r--r-- | lib/output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/output.c b/lib/output.c index 07a77165..17919afc 100644 --- a/lib/output.c +++ b/lib/output.c | |||
@@ -235,7 +235,7 @@ char *mp_fmt_output(mp_check check) { | |||
235 | char *result = NULL; | 235 | char *result = NULL; |
236 | 236 | ||
237 | switch (check.format) { | 237 | switch (check.format) { |
238 | case MP_FORMAT_ICINGA_WEB_2: { | 238 | case MP_FORMAT_MULTI_LINE: { |
239 | if (check.summary == NULL) { | 239 | if (check.summary == NULL) { |
240 | check.summary = get_subcheck_summary(check); | 240 | check.summary = get_subcheck_summary(check); |
241 | } | 241 | } |
@@ -245,7 +245,7 @@ char *mp_fmt_output(mp_check check) { | |||
245 | mp_subcheck_list *subchecks = check.subchecks; | 245 | mp_subcheck_list *subchecks = check.subchecks; |
246 | 246 | ||
247 | while (subchecks != NULL) { | 247 | while (subchecks != NULL) { |
248 | asprintf(&result, "%s\n%s", result, fmt_subcheck_output(MP_FORMAT_ICINGA_WEB_2, subchecks->subcheck, 1)); | 248 | asprintf(&result, "%s\n%s", result, fmt_subcheck_output(MP_FORMAT_MULTI_LINE, subchecks->subcheck, 1)); |
249 | subchecks = subchecks->next; | 249 | subchecks = subchecks->next; |
250 | } | 250 | } |
251 | 251 | ||
@@ -330,7 +330,7 @@ static inline char *fmt_subcheck_output(mp_output_format output_format, mp_subch | |||
330 | mp_subcheck_list *subchecks = NULL; | 330 | mp_subcheck_list *subchecks = NULL; |
331 | 331 | ||
332 | switch (output_format) { | 332 | switch (output_format) { |
333 | case MP_FORMAT_ICINGA_WEB_2: | 333 | case MP_FORMAT_MULTI_LINE: |
334 | asprintf(&result, "%s\\_[%s] - %s", generate_indentation_string(indentation), state_text(mp_compute_subcheck_state(check)), | 334 | asprintf(&result, "%s\\_[%s] - %s", generate_indentation_string(indentation), state_text(mp_compute_subcheck_state(check)), |
335 | check.output); | 335 | check.output); |
336 | 336 | ||
@@ -510,7 +510,7 @@ mp_subcheck mp_set_subcheck_default_state(mp_subcheck check, mp_state_enum state | |||
510 | } | 510 | } |
511 | 511 | ||
512 | char *mp_output_format_map[] = { | 512 | char *mp_output_format_map[] = { |
513 | [MP_FORMAT_ICINGA_WEB_2] = "icingaweb2", | 513 | [MP_FORMAT_MULTI_LINE] = "multi-line", |
514 | [MP_FORMAT_TEST_JSON] = "mp-test-json", | 514 | [MP_FORMAT_TEST_JSON] = "mp-test-json", |
515 | }; | 515 | }; |
516 | 516 | ||