Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional metadata to Sensu alerts #1974

Closed
mdelaney opened this issue Jun 20, 2018 · 0 comments
Closed

Add additional metadata to Sensu alerts #1974

mdelaney opened this issue Jun 20, 2018 · 0 comments
Assignees
Milestone

Comments

@mdelaney
Copy link

Sensu supports the addition of arbitrary metadata along with check results. This can be extremely using on the Sensu side for everything from alert filtering to triggering some automatic remediation to showing a simple playbook link.

Right now sending an alert to Sensu looks like:

|alert()
  // ...
  .sensu()
    .source('Kapacitor')
    .handlers('handler1-name', 'handler2-name')

What I'd like to be able to do is something like

var occurrences  = 3
var refresh = 3600
var playbook = 'link.to.my.playbook'

|alert()
  // ...
  .sensu()
    .source('Kapacitor')
    .handlers('handler1-name', 'handler2-name')
    .metadata(occurrences, playbook, refresh)

Which would add the following to the check result JSON sent to Sensu

{
    ...
    "occurrences": 3,
    "playbook": "link.to.my.playbook",
    "refresh": 3600,
    ...
}
@rbetts rbetts added this to the 1.5.2 milestone Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants