Unable to configure watches

Hello team,
While configuring the watcher I am facing issues w.r.t email notifications.
Trying to send an alert about node's CPU utilization and other paramenters, I am not able to get or rather set subject to send hostname and other details.
I am talking wrt terms with ctx.xxx.yyyy
say ctx.hostname, ctx.ip address kind of stuff.

I would like to have an alert in this format:

The is an alert triggered wrt to environment node. Attend it on priority.
##########################################
Alert Type: {{ctx.metadata.name}}
Host: {{ctx.metadata.}}
HostIP: {{ctx.payload}}
Timestamp: {{ctx.execution_time}}
Possible solutions: httplinktotroubleshootdocument
##########################################

The email subject can contain Mustache templates just like the body of the email. So your email action might look like

"actions" : {
  "send_email" : { 
    "email" : { 
      "to" : "<username>@<domainname>", 
      "subject" : "High CPU Utiliziation on {{ctx.hostname}} at {{ctx.execution_time}}", 
      "body" : "..." 
    }
  }
}

If you are getting errors when setting up the action, please reply with the relevant errors.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.