Go to All Forums

Using Tags in alerts

Tags are an awesome feature and it would be even better if they could be used in IT Automation and just general alerting as a whole.

Example: We use VictorOps for alerting and would like to do something like this:

{
   "OWNER":"${OWNER}"
   "message_type":"CRITICAL"
}

Similar to how we are able to do with Global Parameters.

Like (6) Reply
Replies (11)

Re: Using Tags in alerts

[Updated]Hi Framirez,

   Thanks for writing to us here. We support tags in IT Automation as part of sending Incident Paramaters (see Image).

-In the VictorOps example what are you expecting in the JSON? When is the json constructed? 

-Do you want support in HTTP request headers support for tags in IT Automation?

-Tags support is available in 3rd party Integration. You can add tags as part of custom parameters. 

{Owner: $Tags} will work.

  Please let us know where you need it and also if possible ur usecase. We would be glad to help you out.

-Jasper

Product Manager, Site24x7

 

Like (0) Reply

Re: Re: Using Tags in alerts

Hi Jasper,

What we're seeing is this:

What we'd like to see would be for the OWNER part to be in the attribute column and the OBSRV to be in the value column.

 

The JSON in my original post was from Site24x7 in the Send Custom Parameters window where we currently place the custom fields.

Thanks

Like (0) Reply

Re: Re: Re: Using Tags in alerts

Framirez, I believe you have an image uploaded. But its not reflecting here. Can you please upload it again please.

 

-Jasper

Like (0) Reply

Re: Re: Re: Using Tags in alerts

Hi Framirez, 

   My apologies. Our developer has informed that tags are supported in custom parameters. In fact all the parameters that are supported in Incident parameters is supported in custom parameters too.

So you can use 

{"configured_tags": $Tags} . This will work. We will update our documentation accordingly. 

-Jasper

Product Manager, Site24x7.

Like (0) Reply

Re: Re: Re: Re: Using Tags in alerts

Hi Jasper,

 

I tried what you said and for some reason it works on Warning and OK alerts but not Critical.

Like (0) Edit Delete Reply

Re: Re: Re: Re: Re: Using Tags in alerts

Set this in the config:

{
"configured_tags":"$Tags",
"message_type":"CRITICAL"
}

But it doesn't expand the tags, all I get is what's in the screenshot attached.

 

Like (0) Reply

Re: Re: Re: Re: Re: Re: Using Tags in alerts

I believe is what is being asked for is the ability to use only one specific tag instead of a list of the tags.  If this is the ask then I second my vote for this feature.

Even if you can't use the specific tag name, being able to do something like the following would be awesome.

 

{
   "OWNER":"$TAGS[OWNER]"
   "message_type":"CRITICAL"
}

Where $TAGS[OWNER] gives you the value of the Tag 'OWNER' for the monitor sending the alert.

Like (2) Reply

Re: Re: Re: Re: Re: Re: Using Tags in alerts

Hi Framirez,

  My apologies for not communicating with correctly. The TAGS keyword is case sensitive, it should be all CAPS. Thats the reason it is not working.. Please try this and let us know if it works.

{
"configured_tags":"$TAGS",
"message_type":"CRITICAL"
}

We have updated the KBase where custom parameters are documented. 

https://support.site24x7.com/portal/kb/articles/what-are-incident-and-custom-parameters-w-r-t-webhooks

-Jasper

Product Manager, Site24x7

Like (1) Reply

Re: Re: Re: Re: Re: Re: Re: Using Tags in alerts

This is exactly what I am asking for. Doing

{
"configured_tags":"$TAGS",
"message_type":"CRITICAL"
}

Will list out all the tags on the device like owner:foo and service:bar and type:https

What I'm asking for it to do something like this:

{
"owner":"$TAGS[owner]",
"service":"$TAGS[service]",
"type":"$TAGS[type]",
"message_type":"CRITICAL"
}

Which would map the message like this: 

{
  "owner":"$TAGS[foo]",
  "service":"$TAGS[bar]",
  "type":"$TAGS[https]",
  "message_type":"CRITICAL"
}
Like (2) Reply

Re: Re: Re: Re: Re: Re: Re: Re: Using Tags in alerts

This would be a useful feature. I am currently trying to construct some automation and the ability to insert specific tag values is what I need.

Like (0) Reply

Re: Re: Re: Re: Re: Re: Re: Re: Re: Using Tags in alerts

Dear Framirez/Philip,

      Thanks for the explanation and feedback. We'll analyze what can be done and implement them.

If a monitor has tags owner:philip, owner:framirez, region:us, team:noc-team-us, team:noc-team-usbackup

When you give the custom parameter as 

{

  "owner":"$TAGS[owner]",
  "service":"$TAGS[service]",
  "type":"$TAGS[type]",
  "message_type":"CRITICAL"

}
The resulting response you are expecting is something like this 
 
{
  "owner":"[philip,framirez]",
  "team":"[noc-team-us,noc-teamusbackup]",
  "region":"[US]",
  "message_type":"CRITICAL"
}

I believe this is what you are expecting. 

-Jasper

Product Manager, Site24x7

Like (1) Reply