TitelImprove Agent (+Plugin) error handling
KomponenteChecks & Agents

Agents and agent plugins currently have a hard time reporting problems (or things that may be a problem) in such a way that the user becomes aware of them. There are various aspects to consider here: * Where to report things. Proposals: inside the agent section, in a separate field of each check * reporting things that may not be a problem may confuse the user and prompt support requests for non-issues... * ... not reporting them may cause increased effort trying to find real problems * traffic shouldn't increase (significantly) if no problems occur Proposed solution: at any point in the agent output a line formatted as "<<<<< text >>>>>" may be printed to report an error. Those lines do not end a section and are associated with the current section. Inside check_mk those lines are extracted, decorated with the section name and added to the long output of the agent section and that section is put into warning state if there is at least one line. Diagnostics messages may be written to a local file (similar to the crash log on windows). Error messages are automatically also written to that file. If the agent has reported error messages, that error report would reference that diagnostics log for extended information (i.e. "see /var/log/check_mk_agent.log for details").