IcsUtils.IcsAlert Common Library
IcsAlert: Library for Alert
This is the IcsAlert common library. |
-
class opslib.icsutils.icsalert.IcsAlert(region, topic, msg_prefix='', **kwargs)[source]
-
__dict__ = dict_proxy({'sendHealthAlert': <function sendHealthAlert at 0x568cf50>, '__module__': 'opslib.icsutils.icsalert', 'sendAlert': <function sendAlert at 0x568ced8>, '__dict__': <attribute '__dict__' of 'IcsAlert' objects>, '__weakref__': <attribute '__weakref__' of 'IcsAlert' objects>, '__doc__': None, '__init__': <function __init__ at 0x568ce60>})
-
__init__(region, topic, msg_prefix='', **kwargs)[source]
Generate and send alerts when exceptions occur
Parameters: |
- region (str) – indicate region name you need to generate
SNS alerts
- topic (str) – indicate topic name you have already setup
in SNS
- msg_prefix (str) – prefix of alert message
|
-
__module__ = 'opslib.icsutils.icsalert'
-
__weakref__
list of weak references to the object (if defined)
-
sendAlert(msg, subj_result)[source]
Send SNS message as an Alert
Parameters: |
- msg (str) – message of the alert
- subj_result (str) – SUCCESS/ERROR described in subject content
|
-
sendHealthAlert(msg, subj)[source]
Send SNS message as an Alert
Parameters: |
- msg (str) – message of the alert
- subj (str) – subject of message
|