Skip to content
Discussion options

You must be logged in to vote

In the next release I've changed it so that the triggered action will handle even non-JSON messages. For now, with v26.02.0 or earlier, just make sure you format the contents of the resulting message as JSON. A good example is here (this is what the example loopback webhook trigger action uses):

{
  "alert": {
    "monitor": {
      "name": "{{ctx.monitor.name}}"
    },
    "trigger": {
      "name": "{{ctx.trigger.name}}",
      "severity": {{ctx.trigger.severity}}
    },
    "period": {
      "start": "{{ctx.periodStart}}",
      "end": "{{ctx.periodEnd}}"
    },
    "results": {{#toJson}}ctx.results{{/toJson}},
    "body": "{{#toJson}}ctx.payload{{/toJson}}",
    "alert": "{{ctx.alert.…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@mmguero
Comment options

Comment options

You must be logged in to vote
8 replies
@commanderFx
Comment options

@mmguero
Comment options

@mmguero
Comment options

@mmguero
Comment options

Answer selected by mmguero
@commanderFx
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
alerting Related to Malcolm's use of alerting
2 participants