Skip to content

InfluxDB(2)Writer does not fully print error from InfluxDB(2). Maybe it should #10072

@RincewindsHat

Description

@RincewindsHat

Is your feature request related to a problem? Please describe.

While debugging problems with a spurious bug in the InfluxDB connection of Icinga2 I had some trouble to find the original problem and it would have been helpful if, instead of
just printing

[2024-06-06 18:05:26 +0200] warning/Influxdb2Writer: Unexpected response code: Bad Request
Context:
	(0) Processing check result for 'some-host!some-service'

[2024-06-06 18:05:26 +0200] warning/Influxdb2Writer: Unexpected Content-Type: application/json; charset=utf-8
Context:
	(0) Processing check result for 'some-host!some-service'

it would actually print the HTTP body with something like this:

{"code":"invalid","message":"unable to parse blablabalbla,metric=bla value=-inf 1717686350': invalid number"}

Describe the solution you'd like

Printing the full HTTP body would be nice.

Metadata

Metadata

Assignees

Labels

area/influxdbMetrics to InfluxDBarea/logLogging relatedbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions