WIP: Separate endpoint for each primary action for monitor hooks #660
|
@ -35,8 +35,9 @@ def ping_monitor(hook_config, config_filename, state, monitoring_log_level, dry_
|
|||
|
||||
dry_run_label = ' (dry run; not actually pinging)' if dry_run else ''
|
||||
try:
|
||||
ping_url = f"{hook_config[action_name]}/{MONITOR_STATE_TO_CRONITOR[state]}"
|
||||
ping_url = f"{hook_config['sss']}/{MONITOR_STATE_TO_CRONITOR[state]}"
|
||||
except KeyError:
|
||||
jetchirag marked this conversation as resolved
|
||||
logger.debug(f'{config_filename}: Skipping Cronitor {state.name.lower()} ping due to unconfigured action: {action_name}')
|
||||
jetchirag marked this conversation as resolved
Outdated
diivi
commented
Missed a debug log here 😄 Missed a debug log here 😄
jetchirag
commented
Thanks! :) Thanks! :)
|
||||
return
|
||||
|
||||
logger.info(f'{config_filename}: Pinging Cronitor {state.name.lower()}{dry_run_label}')
|
||||
|
|
Loading…
Reference in New Issue
Nice, succinct way to skip unconfigured actions. You could optionally
logger.debug()
in theexcept
so that it's clear what's being skipped and why.