awslimitchecker.alerts.dummy module¶
-
class
awslimitchecker.alerts.dummy.
Dummy
(region_name, **_)[source]¶ Bases:
awslimitchecker.alerts.base.AlertProvider
Initialize an AlertProvider class. This MUST be overridden by subclasses. All configuration must be passed as keyword arguments to the class constructor (these come from
--alert-config
CLI arguments). Any dependency imports must be made in the constructor. The constructor should do as much as possible to validate configuration.Parameters: region_name (str) – the name of the region we’re connected to -
__init__
(region_name, **_)[source]¶ Initialize an AlertProvider class. This MUST be overridden by subclasses. All configuration must be passed as keyword arguments to the class constructor (these come from
--alert-config
CLI arguments). Any dependency imports must be made in the constructor. The constructor should do as much as possible to validate configuration.Parameters: region_name (str) – the name of the region we’re connected to
-
__module__
= 'awslimitchecker.alerts.dummy'¶
-
on_critical
(problems, problem_str, exc=None, duration=None)[source]¶ Method called when the run encountered errors, or at least one critical threshold was met or crossed.
Parameters: - problems (dict or None) – dict of service name to nested dict of limit name to
limit, same format as the return value of
check_thresholds()
.None
ifexc
is specified. - problem_str (str or None) – String representation of
problems
, as displayed inawslimitchecker
command line output.None
ifexc
is specified. - exc (Exception) – Exception object that was raised during the run (optional)
- duration (float) – duration of the run
- problems (dict or None) – dict of service name to nested dict of limit name to
limit, same format as the return value of
-
on_success
(duration=None)[source]¶ Method called when no thresholds were breached, and run completed successfully. Should resolve any open incidents (if the service supports that functionality) or else simply return.
Parameters: duration (float) – duration of the usage/threshold checking run
-