Custom Sensu Handlers to support a multi-tenant environment, allowing checks themselves to emit the type of handler behavior they need in the event json
Apache License 2.0
75
stars
31
forks
source link
Add component support for individual teams (like tags) #133
This adds component support so that components can be set per-team in sensu_handlers::teams. This is useful since the jira project is generally set per-team and components are required per-project, so being able to set components (like tags) per-team is useful.
I tested this by editing /etc/sensu/conf.d/handlers/jira.json on an admin server in dev and adding a default component to a team for testing and then using a technique like in #129 to make test tickets (but without a component explicitly set).
This adds component support so that components can be set per-team in
sensu_handlers::teams
. This is useful since the jira project is generally set per-team and components are required per-project, so being able to set components (like tags) per-team is useful.I also changed the code for picking components to be a bit different and more similar to the way labels/tags are currently constructed:
Nicely enough, this handles
nil
, various values, and arrays as values without problems:I tested this by editing
/etc/sensu/conf.d/handlers/jira.json
on an admin server in dev and adding a default component to a team for testing and then using a technique like in #129 to make test tickets (but without a component explicitly set).