RobustPerception/azure_metrics_exporter

Strange gaps in some cosmos db metrics

Opened this issue · 1 comments

I have a running exporter retrieving cosmos db metrics. It is running fine every 30 secs (no rate limit is hit). There are strange "gaps" (value 0) when trying to graph some of the metrics like Documents count and Storage/index size.

You can check here: https://imgur.com/49G9x7L

This is for documents count in a cosmosdb instance but the same can be observed for other storage related metrics. The same metrics in Azure portal have no gaps. The number requests metric though have no gaps. Not sure if this is related to the exporter itself or the Azure API. The strange thing is that it usually takes 4-5 minutes to expose again the correct size value. Didn't see any errors in the exporter logs.

The other thing that looks wrong is related to how many database(s) you have in a cosmos db instance and what the exporter retrieves/exposes. In my example I have 2 databases in a single cosmos db instance and the value (for storage size) that the exporter exposes is for one of the databases, not for all of them as I would expect. If there is no label showing what database the value of the metric is for (or any specific configuration targeting specific database in the config file) I think it should expose the total size of all databases not just one of them.

Hello, I am also seeing a similar issue using the exporter to retrieve CosmosDB metrics, specifically, provisioned throughput. The provisioned throughput appear correctly for a brief period of time, then report 0 for a period of 3-5mins.

I have contacted Microsoft Support to determine if there are any restrictions or caching on the CosmosDB API, but there were unable to provide any insight as to why this is happening.

Our enterprise relies heavily on this exporter to report accurate metrics, any assistance you can provide to assist with addressing this issue is greatly appreciated, thanks!