Skip to content

Optionally ignore 202 response codes  #752

Open
@jakelandis

Description

@jakelandis

This output is used by X-Pack monitoring to send monitoring data to the ES monitoring bulk api. The monitoring bulk api endpoint (note this is different then the standard bulk api), can return a 202 HTTP status code if monitoring is not currently enabled in ES - X-Pack.

We currently treat a 202 as an error, but this error was getting masked by incorrect exception handling that is fixed with: #749

We should treat LS monitoring X-Pack enabled, but monitoring disabled in ES -X-Pack as a normal state, not an exceptional state. Specifically we should handle a 202 HTTP response code as a success and optionally log a debug message so that the traffic (if monitored) has a reasonable explanation.

Further, when we receive a 202 we should not try to upack the response for additional status codes (like we do for the normal bulk api responses).

Sending or not sending the monitoring data based on the ES X-Pack monitoring state is outside the scope of this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions