Skip to content

PluginUtility::ParseCheckOutput(): if it doesn't look like perfdata, it's not perfdata #8008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

Al2Klimov
Copy link
Member

fixes #8006

@Al2Klimov Al2Klimov added the area/checks Check execution and results label May 14, 2020
@Al2Klimov Al2Klimov added this to the 2.13.0 milestone May 14, 2020
@Al2Klimov
Copy link
Member Author

With this #8006 (comment) has not been broken, but a |lolcat=1 has been handled.

@Al2Klimov Al2Klimov requested a review from yhabteab June 19, 2020 13:43
@yhabteab
Copy link
Member

yhabteab commented Jun 19, 2020

Testprotocol:
Until now it was not possible to print ASCII tables in the plugin output. The output looks mixed up and the table was barely recognizable.

"output": "special tables
   +---------------+---------------------+-----+------------------------------------------------------------------------------------------------------+

    +---------------+---------------------+-----+------------------------------------------------------------------------------------------------------+

 ┌───────────────┬─────────────────────┬─────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ CVE-2018-6533 │ 2018-02-27 19:29:00 │ 7.2 │ An issue was discovered in Icinga 2.x through 2.8.1. By editing the init.conf file, Icinga 2 can be  │
 │               │                     │     │ run as root. Following this the program can be used to run arbitrary code as root. This was fixed by │
 │               │                     │     │ no longer using init.conf to determine account information for any root-executed code (a larger      │
 │               │                     │     │ issue than CVE-2017-16933).                                                                          │
 └───────────────┴─────────────────────┴─────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┘

This functionality has now been implemented and is ready for you to use.

"output": "special tables 
 +---------------+---------------------+-----+------------------------------------------------------------------------------------------------------+
 | CVE-2018-6533 | 2018-02-27 19:29:00 | 7.2 | An issue was discovered in Icinga 2.x through 2.8.1. By editing the init.conf file, Icinga 2 can be  |
 |               |                     |     | run as root. Following this the program can be used to run arbitrary code as root. This was fixed by |
 |               |                     |     | no longer using init.conf to determine account information for any root-executed code (a larger      |
 |               |                     |     | issue than CVE-2017-16933).                                                                          |
 +---------------+---------------------+-----+------------------------------------------------------------------------------------------------------+


 ┌───────────────┬─────────────────────┬─────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ CVE-2018-6533 │ 2018-02-27 19:29:00 │ 7.2 │ An issue was discovered in Icinga 2.x through 2.8.1. By editing the init.conf file, Icinga 2 can be  │
 │               │                     │     │ run as root. Following this the program can be used to run arbitrary code as root. This was fixed by │
 │               │                     │     │ no longer using init.conf to determine account information for any root-executed code (a larger      │
 │               │                     │     │ issue than CVE-2017-16933).                                                                          │
 └───────────────┴─────────────────────┴─────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┘

Copy link
Contributor

@julianbrost julianbrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only improve the behavior, even though it's still some heuristic and you'll still be able to construct cases where this doesn't help. But a perfect solution probably doesn't exist anyways, as there seems to be no intended way to include | in the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/checks Check execution and results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print ascii tables in plugin output
3 participants