vicioussn / zabbix-azure

Solution to enable monitoring of Azure resources with Zabbix.
https://b-blog.info/en/monitoring-azure-resources-with-zabbix.html
GNU General Public License v3.0
11 stars 12 forks source link

Help with throttling and paging #1

Open naudski opened 3 years ago

naudski commented 3 years ago

Hi!

I'm using your solution and I think it is great!! I'm experiencing an issue with getting more than 30 discovered items (LogicApps) using your discovery script. I found out what is causing the issue and there is a solution for this: https://docs.microsoft.com/en-us/rest/api/azure/#async-operations-throttling-and-paging

How can I use this solution in your script?

Grtz Arnaud

vicioussn commented 3 years ago

Hello!

Can you drop here logs with error message coming from Azure API? I'm very doubt that 30 resources can cause problems.

Another good point to check available calls: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/request-limits-and-throttling

naudski commented 3 years ago

Hi!

Thanks for your reply! I managed to solve this using Nextlink. I put this piece of code in my discovery script:

while ($workflows.nextLink) { $nextLink = $workflows.nextLink; $workflows = (Invoke-RestMethod -Uri $nextLink -Headers $azure_header -Method Get -SkipHeaderValidation -ErrorAction Stop) $output = $workflows.value

That works perfectly!

naudski commented 3 years ago

I've also created a piece of code in the discovery script to get azure servicebus topics and subscriptions. That works perfectly. But there are no metrics available for these items. There are CountDetails for these Items and I'm trying to find a way to capture these CountDetails in a trapper script. Do you have any suggestions on how to accomplish this?