Skip to main content

Use case walkthrough: Use tags to create custom fields ►

This video explains how to create custom fields using tags in Moogsoft Cloud.

While working on data ingestion, you may realize you need additional fields other than the ones provided by Moogsoft to map your incoming payload. Tags are custom fields you can create to store such information.

For example, let’s say you are creating an integration using the Events API.

You’ve mapped basic information to the fields available by default.

1_CreateCustomFields_00_00_26_29_Still002.jpg

But you also need to map the environment value in your incoming payload. There’s no field available for that to be mapped. What to do?

This is where you use tags.

This shows the JSON format for a custom tag. There is a key: environment, and a value: production. Moogsoft will generate a tag to hold the environment type when the Events API receives this in an event payload.

2_CreateCustomFields_00_00_50_00_Still003.jpg

Keep in mind, you should create tags ONLY WHEN you need to use them later in the journey of the data. if that data is not useful for routing, filtering, correlation, or troubleshooting, there’s no need to map every single field to Moogsoft.

3_CreateCustomFields_00_01_04_29_Still004.jpg

Instead of the Events API, you may be using the Create Your Own Integration feature for the flexibility of its field mapping. In that case, there’s a convenient feature to auto-create tags. Here’s how it works.

4_CreateCustomFields_00_01_19_15_Still005.jpg

Add a new mapping row.

5_CreateCustomFields_00_01_30_29_Still006.jpg

And in the target field, select tags.

6_CreateCustomFields_00_01_33_29_Still007.jpg

And for payload fields, search for and add the JSON key which includes the tags you want to use. We’ll add the instance details.

7_CreateCustomFields_00_01_44_00_Still008.jpg

This adds IP Address and Instance ID at the same time.

8_CreateCustomFields_00_01_48_22_Still009.jpg

Of course, you can also map tags one at a time. Here's how you do that. Now we have the environment value stored as a tag.

9_CreateCustomFields_00_01_58_22_Still010.jpg

Another way to create tags is using the workflow engine.

Let’s say the impacted customer is not part of the incoming event payload, so you want to enrich events with customer information from an external source.

This workflow queries the data catalog using the instance_id. It looks up the customer value and stores it in a newly created tag.

10_CreateCustomFields_00_02_23_15_Still011.jpg
11_CreateCustomFields_00_02_27_25_Still012.jpg

You can generate tags from any workflow action that allows you to specify an output field. For example, Extract Substring or Match and Update.

12_CreateCustomFields_00_02_39_18_Still013.jpg

OK, now that you know how to create tags, next, let me show you how to use them.

You can use tags to filter a list. We’ll add a column for the customer tag…

13_CreateCustomFields_00_02_57_27_Still014.jpg

…and filter by the value we want.

14_CreateCustomFields_00_03_07_06_Still015.jpg

And, you can refer to tags to help with troubleshooting.

15_CreateCustomFields_00_03_16_20_Still016.jpg

This correlation definition uses tags to filter, and to correlate.

Let’s say the alerts originating in the test environment should not be put through this correlation definition.

Since you have a tag for the environment value, you can use that to filter the alert flow like this.

16_CreateCustomFields_00_03_33_29_Still017.jpg

Also, suppose you want to use the customer name to correlate alerts. Here alerts that share the exact same value for the customer tag and similar values for service are grouped together into an incident.

17_CreateCustomFields_00_03_43_26_Still018.jpg

Another place you can use tags is routing. Let’s say your support team uses PagerDuty to respond to customer-impacting incidents. So you want to route production incidents to PagerDuty, but not incidents affecting the development or test servers.

Here, we’ve used the environment tag to create a filter so only production incidents will be routed to this integration.

19_CreateCustomFields_00_04_08_03_Still019.jpg

Now you know how to use tags. Thanks for watching.

Now you know how to Thanks for watching!