Azure-docs: Is there any API to monitor the RUs and set the throughout of cosmos db

Created on 5 Dec 2018  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

We are trying to implement a way to monitor the RUs of cosmos DB and change the value of throughput dynamically.
Is there any api can get the current RUs of cosmos and reset the throughput value by programming?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

cosmos-dsvc cxp product-question triaged

All 8 comments

Hello @summerkiss Thank you for your feedback! This channel is for driving improvements towards MS Docs. In order to best address your question with the right team, could you provide us with the URL of the MS Doc that you were following, if any?

@summerkiss Please take a look at the following and let us know if this is what you are looking for: Monitor Azure Cosmos DB programmatically.

@summerkiss the doc that Mike pointed out is pretty outdated, we are in the process of publishing the latest version. To answer your question, you can monitor the RU consumption from Azure portal, navigate to your Cosmos DB account, open the alerts blade and you can setup metric or activity log alerts to send you notifications if the consumption has reached a certain limit. The following screenshot shows a lit of available metrics;

image

You can also use the Java SDK to https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.documentdb._offer_v2.getofferthroughput?view=azure-java-stable get the current throughput and add logic to set alerts or update it. If you have further questions, can you please send an email to [email protected] alias. A broader audience can help provide if there are other ways to solve this problem.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@SnehaGunda ,your information is really helpful, we can update the throughput now with the java API,
but we still have the problem to get the real time RU of the entire system by program. Does Application insight still apply the rest API to expose the metrics of the RUs?
@sergaz-msft

+1 I'm also looking for similar stuff, monitor the RUs of cosmos DB and change the value of throughput dynamically so that subsequent call don't impact.

dynamically means scale up when needed and scale down when not used

@SnehaGunda did we land on any conclusion here as it was 2 months old thread?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spottedmahn picture spottedmahn  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

bdcoder2 picture bdcoder2  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments