Map external data to the Moogsoft Cloud schema
Note
This is step 3 in the Define a custom integration workflow.
After you set up your external service to send data to the endpoint, the next step is to map your external data fields to their equivalents in the Moogsoft Cloud schema.
In Moogsoft Cloud, go to Data Config > Ingestion Services > Create your own Integration and select the endpoint you created.
Go to 2 Map Your Data.
Select a payload from the table.
Map each source field in the payload to its corresponding Moogsoft Cloud target field.
To add additional mappings, click Add a Mapping.
To remove an unneeded mapping, click the trashcan to delete the corresponding row.
If one payload does not include all the source fields you need to map, select another payload in the list that does. You can select different payloads in sequence and map all your source fields in one operation.
If there is no source field that corresponds to a required Moogsoft Cloud target field, click inside Source Field and scroll to the end of the list of source fields. Type a placeholder value for Default Text. You can then create an event workflow to populate this field.
The Moogsoft Cloud events schema requires a
severity
field. Click Map Values to map the severity values in your source data to their target equivalents.
NOTE: Moogsoft Cloud automatically maps source fields to target fields with the same name.
Mapping multiple source fields to the same target field
You might want to do this when the relevant data for a target field is in multiple source fields. The mapping behavior is different for target fields that are simple strings, such as source
, and target fields that are lists, such as service
.
Mapping string fields
For target fields that are simple strings, such as source and class, the mapper uses an if-then-else mechanism. Suppose your payloads encode the event source as follows:
Given this, the mapper populates the target field source
based on the order of mappings in the table:
An
fqdn
field for application eventsAn
ip
field for network eventsAll events include a
labels
tag, which includes the hostname and a lot of other information about the event.
In the third case, the source
field is still unmapped but the Moogsoft Cloud event still has the source name: it is embedded in the tags.labels
string.
In this case, you can map the fields as follows.
Event has an
fqdn
field => mapfqdn
tosource
Event has no
fqdn
field but it does has anip
field => map ip tosource
Event has no
fqdn
oripe
field => map string "TBD" tosource
. You can then create an automated workflow that extracts the hostname from thelabels
tag and maps it to thesource
target field.
Note that the mapping behavior is determined by the order in which these mappings are defined in the mapping table:

Mapping list fields
Suppose your payload has the following fields:
An
app
field that defines the user-facing name for an appA
microservice
field that defines the back-end service that supports the app
In this case, you can map both fields to the service
target field. Because the target field is a list, it gets populated with both names: "service" : ["myApp", myMicroService"]
Mapping types
In addition to basic mapping, you can use transformations to customize the way source field data is mapped to target fields.
All Source to Target mappings are basic mappings unless you click the Mapping type selector (arrow) between source and target fields and select a different type from the popup:

See Use mapping types in custom integrations for a complete list of mapping types and instructions explaining how to use them.