From 50de16aa03eea56e5eb0852817ecc9fba5107c80 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Thu, 5 Sep 2019 14:34:07 -0400 Subject: [PATCH] Issue #419 - rebuild docs --- .../awslimitchecker.alerts.pagerdutyv1.rst | 7 ++++ docs/source/awslimitchecker.alerts.rst | 1 + docs/source/cli_usage.rst | 39 +++++++++++++------ 3 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 docs/source/awslimitchecker.alerts.pagerdutyv1.rst diff --git a/docs/source/awslimitchecker.alerts.pagerdutyv1.rst b/docs/source/awslimitchecker.alerts.pagerdutyv1.rst new file mode 100644 index 00000000..883f93b5 --- /dev/null +++ b/docs/source/awslimitchecker.alerts.pagerdutyv1.rst @@ -0,0 +1,7 @@ +awslimitchecker.alerts.pagerdutyv1 module +========================================= + +.. automodule:: awslimitchecker.alerts.pagerdutyv1 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/awslimitchecker.alerts.rst b/docs/source/awslimitchecker.alerts.rst index c8846f8e..0a91cbad 100644 --- a/docs/source/awslimitchecker.alerts.rst +++ b/docs/source/awslimitchecker.alerts.rst @@ -13,4 +13,5 @@ Submodules awslimitchecker.alerts.base awslimitchecker.alerts.dummy + awslimitchecker.alerts.pagerdutyv1 diff --git a/docs/source/cli_usage.rst b/docs/source/cli_usage.rst index 5408be35..5ceb34d1 100644 --- a/docs/source/cli_usage.rst +++ b/docs/source/cli_usage.rst @@ -40,6 +40,9 @@ use as a Nagios-compatible plugin). [--list-metrics-providers] [--metrics-provider METRICS_PROVIDER] [--metrics-config METRICS_CONFIG] + [--list-alert-providers] + [--alert-provider ALERT_PROVIDER] + [--alert-config ALERT_CONFIG] Report on AWS service limits and usage via boto3, optionally warn about any services with usage nearing or exceeding their limits. For further help, see @@ -129,6 +132,15 @@ use as a Nagios-compatible plugin). Specify key/value parameters for the metrics provider constructor. See documentation for further information. + --list-alert-providers + List available alert providers and exit + --alert-provider ALERT_PROVIDER + Alert provider class name, to enable sending + notifications + --alert-config ALERT_CONFIG + Specify key/value parameters for the alert provider + constructor. See documentation for further + information. awslimitchecker is AGPLv3-licensed Free Software. Anyone using this program, even remotely over a network, is entitled to a copy of the source code. Use `--version` for information on the source code location. @@ -506,8 +518,8 @@ can be seen with the ``--list-metrics-providers`` option: The configuration options required by each metrics provider are specified in the providers' documentation: -* :py:class:`~awslimitchecker.metrics.dummy.Dummy` * :py:class:`~awslimitchecker.metrics.datadog.Datadog` +* :py:class:`~awslimitchecker.metrics.dummy.Dummy` For example, to use the :py:class:`~awslimitchecker.metrics.datadog.Datadog` @@ -536,27 +548,30 @@ of awslimitchecker can be seen with the ``--list-alert-providers`` option: .. code-block:: console - (venv)$ awslimitchecker --list-metrics-providers - Available metrics providers: - Datadog + (venv)$ awslimitchecker --list-alert-providers + Available alert providers: Dummy + PagerDutyV1 + + The configuration options required by each alert provider are specified in the providers' documentation: -* :py:class:`~awslimitchecker.metrics.dummy.Dummy` -* :py:class:`~awslimitchecker.metrics.datadog.Datadog` +* :py:class:`~awslimitchecker.alerts.pagerdutyv1.PagerDutyV1` +* :py:class:`~awslimitchecker.alerts.dummy.Dummy` -For example, to use the :py:class:`~awslimitchecker.metrics.datadog.Datadog` -metrics provider which requires an ``api_key`` paramater (also accepted as an -environment variable) and an optional ``extra_tags`` parameter: + +For example, to use the :py:class:`~awslimitchecker.alerts.pagerdutyv1.PagerDutyV1` +alert provider which requires a ``critical_service_key`` paramater (also accepted as an +environment variable) and an optional ``account_alias`` parameter: .. code-block:: console (venv)$ awslimitchecker \ - --metrics-provider=Datadog \ - --metrics-config=api_key=123456 \ - --metrics-config=extra_tags=foo,bar,baz:blam + --alert-provider=PagerDutyV1 \ + --alert-config=critical_service_key=012345 \ + --alert-config=account_alias=myacct Alerts will be pushed to the provider only when awslimitchecker is done checking all limits, or when an exception is encountered during the checking process.