|
@@ -27,6 +27,14 @@ def ping_monitor(hook_config, config_filename, state, monitoring_log_level, dry_
|
|
|
Ping the configured Cronitor URL, modified with the monitor.State. Use the given configuration
|
|
|
filename in any log entries. If this is a dry run, then don't actually ping anything.
|
|
|
'''
|
|
|
+ if state not in MONITOR_STATE_TO_CRONITOR:
|
|
|
+ logger.debug(
|
|
|
+ '{}: Ignoring unsupported monitoring {} in Cronitor hook'.format(
|
|
|
+ config_filename, state.name.lower()
|
|
|
+ )
|
|
|
+ )
|
|
|
+ return
|
|
|
+
|
|
|
dry_run_label = ' (dry run; not actually pinging)' if dry_run else ''
|
|
|
ping_url = '{}/{}'.format(hook_config['ping_url'], MONITOR_STATE_TO_CRONITOR[state])
|
|
|
|