diff --git a/components/livestatus/livestatusquery.cpp b/components/livestatus/livestatusquery.cpp index 134b418e2..698163a25 100644 --- a/components/livestatus/livestatusquery.cpp +++ b/components/livestatus/livestatusquery.cpp @@ -106,8 +106,11 @@ LivestatusQuery::LivestatusQuery(const std::vector& lines, const String& String header = line.SubStr(0, col_index); String params; - if (line.GetLength() > col_index + 2) - params = line.SubStr(col_index + 2); + //OutputFormat:json or OutputFormat: json + if (line.GetLength() > col_index + 1) + params = line.SubStr(col_index + 1); + + params.Trim(); if (header == "ResponseHeader") m_ResponseHeader = params; diff --git a/test/livestatus/queries/host/host_nagvis b/test/livestatus/queries/host/host_nagvis new file mode 100644 index 000000000..34cdc75fc --- /dev/null +++ b/test/livestatus/queries/host/host_nagvis @@ -0,0 +1,6 @@ +GET hosts +Columns: name alias +OutputFormat:json +KeepAlive: on +ResponseHeader: fixed16 +