Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

multi command support #29

Merged
merged 8 commits into from
Jul 8, 2020
Merged

multi command support #29

merged 8 commits into from
Jul 8, 2020

Conversation

colakong
Copy link
Collaborator

This patch provides functionality for reading configuration from a yaml file, and supports dispatching alerts to multiple commands based on what match_labels are set in configuration for a command.

Resolves #20
Resolves #21

@colakong colakong requested a review from otakup0pe June 30, 2020 21:07
Copy link
Contributor

@otakup0pe otakup0pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine but to be clear this will be a breaking change as will need to switch to a config file?

@colakong
Copy link
Collaborator Author

colakong commented Jul 8, 2020

This all looks fine but to be clear this will be a breaking change as will need to switch to a config file?

No you don't need to use a config file; It's only loaded if one is defined with the -f flag. You can continue to use prometheus-am-executor the same way as before this change. With this patch, the user can:

  • Use it the same way as before, with a command specified at cli
  • Use a configuration file, to provide command configuration (supporting dispatch to multiple commands)
  • Use both cli-specified command and configuration file. Commands in configuration file that are deemed duplicate entries as a command specified at cli is skipped, so the same command isn't dispatched to twice unless there is some differentiation in terms of matching labels or cli args.

@colakong colakong merged commit 71bf726 into master Jul 8, 2020
@colakong colakong deleted the cnelson/multi_command_support branch July 8, 2020 20:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants