3

The log has come into datadog as a JSON object and attributes have been parsed automatically.

Next I want to extract the owner field from an array nested in the JSON:

This syntax doesn't work does in datadog: @detail.resources[0].tags.owner

{
  name: "example_name"
  detail: { 
    resources: [
     /*0*/ { tags: {owner: "[email protected]"}}, 
     /*1*/ { tags: {owner: "[email protected]"}}
    ]
}

This syntax doesn't work does in datadog: @detail.resources[0].tags.owner

each value in the array should have the same owner. How can I use datadog processors to remap the first found email from this array to another attribute called @application.owner? Do I have to unparse the JSON somehow and use a Grok Processor?

1 Answer 1

1

I had the same issue. What has worked for me at the end is using a Remapper, for example:

Set attribute(s) or tag key to remap: detail.resources.0.tags.owner

Set target attribute or tag key: application.owner

Sign up to request clarification or add additional context in comments.

1 Comment

...at the end - thank you @Vladimir - I struggled with this for a long time

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.