Dabz / ccloudexporter

Prometheus exporter for Confluent Cloud API metric
https://docs.confluent.io/current/cloud/metrics-api.html
87 stars 53 forks source link

Add endpoint and Json query when request failed (not status 200) #14

Closed sebco59 closed 4 years ago

sebco59 commented 4 years ago

I receive a lot of error log of this kind but I don't know which request is involved

Received status code 400 instead of 200

I would like have this one:

Received status code 400 instead of 200 for POST on https://api.telemetry.confluent.cloud/v1/metrics/cloud/query with {"aggregations":[{"agg":"SUM","metric":"io.confluent.kafka.server/active_connection_count"}],"filter":{"op":"AND","filters":[{"field":"metric.label.cluster_id","op":"EQ","value":"lkc-aaaaa"}]},"granularity":"PT1M","group_by":["metric.label.topic"],"intervals":["2020-03-17T09:38:25+01:00/2020-03-17T09:39:25+01:00"],"limit":1000}

I think there is an issue with metrics active-connection-count request

Dabz commented 4 years ago

It seems fair. Let me test & merge ;)

Dabz commented 4 years ago

Ok, it seems that we added new metrics and that the query is incorrect for those new metrics. (active-connection-count). I will merge this PR and further investigate this issue.

sebco59 commented 4 years ago

Ok, it seems that we added new metrics and that the query is incorrect for those new metrics. (active-connection-count). I will merge this PR and further investigate this issue.

I don't found any documentation on this metrics on https://docs.confluent.io/current/cloud/metrics-api.html. I have tried to add filter metric.label.topic but not a success :-)