<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Alert tokens and dynamic fields in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-tokens-and-dynamic-fields/m-p/548748#M10418</link>
    <description>&lt;P&gt;Hi all, I am using&amp;nbsp;&lt;EM&gt;slack_alerts&amp;nbsp;&lt;/EM&gt;addon to send Slack messages.&lt;/P&gt;&lt;P&gt;It allows for use of tokens in the message body as referenced here&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.3/Alert/EmailNotificationTokens" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.3/Alert/EmailNotificationTokens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(E.G AWS CloudTrail events) I am trying to figure out a way that I can either:&lt;/P&gt;&lt;P&gt;a) Have various fields renamed to a single field (such as a security group ID, or a bucket name be rewritten to field called "resource") so that I can reference this field in my token ($result.&lt;EM&gt;resource&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;b) have a dynamic token that looks at various fields&lt;/P&gt;&lt;P&gt;Currently I just have a line in my alert that looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;*Resource:* `$result.requestParameters.policyName$ $result.requestParameters.policyArn$ $result.requestParameters.groupId$ $result.responseElements.groupId$ $result.requestParameters.groupDescription$ $result.requestParameters.bucketName$`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but this is messy and the results show up with spaces before and after the value&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I was wondering if strcat is the right search expression to use for this, the search runs in realtime so it shouldnt make a jumble fo 2 or 3 resources in a single line?&lt;/P&gt;&lt;P&gt;Hoping someone will have some useful insight&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 08:55:25 GMT</pubDate>
    <dc:creator>poiromaniax</dc:creator>
    <dc:date>2021-04-21T08:55:25Z</dc:date>
    <item>
      <title>Alert tokens and dynamic fields</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-tokens-and-dynamic-fields/m-p/548748#M10418</link>
      <description>&lt;P&gt;Hi all, I am using&amp;nbsp;&lt;EM&gt;slack_alerts&amp;nbsp;&lt;/EM&gt;addon to send Slack messages.&lt;/P&gt;&lt;P&gt;It allows for use of tokens in the message body as referenced here&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.3/Alert/EmailNotificationTokens" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.3/Alert/EmailNotificationTokens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(E.G AWS CloudTrail events) I am trying to figure out a way that I can either:&lt;/P&gt;&lt;P&gt;a) Have various fields renamed to a single field (such as a security group ID, or a bucket name be rewritten to field called "resource") so that I can reference this field in my token ($result.&lt;EM&gt;resource&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;b) have a dynamic token that looks at various fields&lt;/P&gt;&lt;P&gt;Currently I just have a line in my alert that looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;*Resource:* `$result.requestParameters.policyName$ $result.requestParameters.policyArn$ $result.requestParameters.groupId$ $result.responseElements.groupId$ $result.requestParameters.groupDescription$ $result.requestParameters.bucketName$`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but this is messy and the results show up with spaces before and after the value&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I was wondering if strcat is the right search expression to use for this, the search runs in realtime so it shouldnt make a jumble fo 2 or 3 resources in a single line?&lt;/P&gt;&lt;P&gt;Hoping someone will have some useful insight&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 08:55:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-tokens-and-dynamic-fields/m-p/548748#M10418</guid>
      <dc:creator>poiromaniax</dc:creator>
      <dc:date>2021-04-21T08:55:25Z</dc:date>
    </item>
  </channel>
</rss>

