Module: check_mk
Branch: master
Commit: da4e9810dfe573e7089d494e4ebd928cb614347f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=da4e9810dfe573…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Nov 27 12:07:06 2018 +0100
Adjust number of allowed Azure API requests
Change-Id: Idc0296735f0f18f9b3e12c677996e6df3efc44a1
---
checkman/azure_agent_info | 2 +-
cmk/gui/plugins/wato/datasource_programs.py | 53 ++++++++++++++++-------------
2 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/checkman/azure_agent_info b/checkman/azure_agent_info
index 42d0830..27a1cdc 100644
--- a/checkman/azure_agent_info
+++ b/checkman/azure_agent_info
@@ -5,7 +5,7 @@ license: GPL
distribution: check_mk
description:
This check reports the general state of the azure special agent.
- It reports the remaining API calls (which are limited to 15.000 per hour),
+ It reports the remaining API calls (which are limited by Microsoft),
the monitored groups and encountered issues.
item:
diff --git a/cmk/gui/plugins/wato/datasource_programs.py
b/cmk/gui/plugins/wato/datasource_programs.py
index c2ec3b4..5a0f7fe 100644
--- a/cmk/gui/plugins/wato/datasource_programs.py
+++ b/cmk/gui/plugins/wato/datasource_programs.py
@@ -1295,30 +1295,35 @@ register_rule(
title=_("Secret"),
allow_empty=False,
)),
- ("config",
- Dictionary(
- title=_("Monitoring Settings"),
- help=_("You can choose to to monitor all resources known to "
- "the Azure API. However, be aware that Microsoft
limits"
- " API calls to 15,000 per hour (250 per minute)."),
- elements=[
- ('explicit-config',
- ListOf(
- _azure_group_config(),
- title=_("Explicitly specify groups"),
- allow_empty=False,
- magic="@-groups-@",
- )),
- ('fetchall',
- FixedValue(
- "fetchall",
- title=_(
- "Monitor all available resource groups (overrides
previous settings)"
- ),
- totext="",
- )),
- ],
- )),
+ (
+ "config",
+ Dictionary(
+ title=_("Monitoring Settings"),
+ # Since we introduced this, Microsoft has already reduced the number
+ # of allowed API requests. At the time of this writing (11/2018)
+ # you can find the number here:
+ #
https://docs.microsoft.com/de-de/azure/azure-resource-manager/resource-mana…
+ help=_("You can choose to to monitor all resources known to
"
+ "the Azure API. However, be aware that Microsoft
limits"
+ " API calls to %s per hour (%s per minute).") %
("12000", "200"),
+ elements=[
+ ('explicit-config',
+ ListOf(
+ _azure_group_config(),
+ title=_("Explicitly specify groups"),
+ allow_empty=False,
+ magic="@-groups-@",
+ )),
+ ('fetchall',
+ FixedValue(
+ "fetchall",
+ title=
+ _("Monitor all available resource groups (overrides
previous settings)"
+ ),
+ totext="",
+ )),
+ ],
+ )),
("--piggyback-vms",
DropdownChoice(
title=_("Create piggyback VM data"),