addTags

A Workflow Engine function that adds or updates a custom info field called “tags” with an array of string values.

This function is available as a feature of the Add-ons v1.3 download. See Install Moogsoft Add-ons for information on how to upgrade.

This function is available for event, alert, enrichment, and Situation workflows.

The workflow sweep up filter applies to this function.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function addTags takes the following arguments:

Name

Required

Type

Description

tags

Yes

Object

Array of tags to add. For example, ["tag1", "tag2"]

Example

The following example demonstrates typical use of Workflow Engine function addTags.

To add the tags “traps” and “network” to alerts of SNMP traps of networking devices, set the following:

  • tags: ["traps", "network"]

The UI translates your settings to the following JSON:

{"tags":"["traps", "network"]"}

If successful, the function returns true and adds the tags to in-scope alerts under custom_info. You can also now use the Tag field in UI filters New tags merge with those already in the custom_info.tags field. For example, if there are existing tags, and custom_info.tags is therefore present:

{ “tags”:["snmp"]}

The new tags now also appear in this field:

{ “tags”:["snmp", "traps", "network"]}