diff --git a/components/compat/compatcomponent.cpp b/components/compat/compatcomponent.cpp index 06f6d9309..3a2d2f509 100644 --- a/components/compat/compatcomponent.cpp +++ b/components/compat/compatcomponent.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include using namespace icinga; @@ -343,8 +344,12 @@ void CompatComponent::DumpServiceStatusAttrs(std::ostream& fp, const Service::Pt if (cr) { output = cr->Get("output"); + boost::algorithm::replace_all(output, "\n", "\\n"); + schedule_end = cr->Get("schedule_end"); + perfdata = cr->Get("performance_data_raw"); + boost::algorithm::replace_all(perfdata, "\n", "\\n"); } int state = service->GetState();