mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-01 10:54:32 +02:00
Merge pull request #7035 from Icinga/feature/es-content-type
Elasticsearch: Change Content-Type header to 'application/x-ndjson' for bulk streams
This commit is contained in:
commit
fc1070c92b
@ -27,6 +27,7 @@ This affects the following features:
|
|||||||
* [OpenTsdb](09-object-types.md#objecttype-opentsdbwriter)
|
* [OpenTsdb](09-object-types.md#objecttype-opentsdbwriter)
|
||||||
* [Perfdata](09-object-types.md#objecttype-perfdatawriter) (for PNP)
|
* [Perfdata](09-object-types.md#objecttype-perfdatawriter) (for PNP)
|
||||||
|
|
||||||
|
|
||||||
### Package Dependencies <a id="upgrading-to-2-11-package-dependencies"></a>
|
### Package Dependencies <a id="upgrading-to-2-11-package-dependencies"></a>
|
||||||
|
|
||||||
#### Removed: YAJL
|
#### Removed: YAJL
|
||||||
|
@ -456,7 +456,12 @@ void ElasticsearchWriter::SendRequest(const String& body)
|
|||||||
|
|
||||||
/* Specify required headers by Elasticsearch. */
|
/* Specify required headers by Elasticsearch. */
|
||||||
req.AddHeader("Accept", "application/json");
|
req.AddHeader("Accept", "application/json");
|
||||||
req.AddHeader("Content-Type", "application/json");
|
|
||||||
|
/* Use application/x-ndjson for bulk streams. While ES
|
||||||
|
* is able to handle application/json, the newline separator
|
||||||
|
* causes problems with Logstash (#6609).
|
||||||
|
*/
|
||||||
|
req.AddHeader("Content-Type", "application/x-ndjson");
|
||||||
|
|
||||||
/* Send authentication if configured. */
|
/* Send authentication if configured. */
|
||||||
String username = GetUsername();
|
String username = GetUsername();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user