<?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 Re: How to bring together the alert results together in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316226#M10704</link>
    <description>&lt;P&gt;@xsstest - see the other question for information about multiple duplicate results in this kind of search.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/558452/too-many-search-jobs-found-in-the-dispatch-directo-3.html"&gt;https://answers.splunk.com/answers/558452/too-many-search-jobs-found-in-the-dispatch-directo-3.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 19:46:30 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-07-27T19:46:30Z</dc:date>
    <item>
      <title>How to bring together the alert results together</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316221#M10699</link>
      <description>&lt;P&gt;I have more than 20 alerts about network security. Such as: Port_Scan、Web_Attack、Host_Attack。&lt;BR /&gt;
The number of fields and field names for these alarm outputs are different. However, there is a field that contains the attacker IP.&lt;BR /&gt;
Although their field names are different&lt;BR /&gt;
Of course, these events from the index is not the same&lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;P&gt;Port_Scan        The attacker's IP field is    'scan_sip'                   (port_scan event come from the index  'firewall_logs')&lt;BR /&gt;
Web_Attack     The attacker's IP field is    'web_attack_sip'       (Web_Attack event come from  the index  'apache_access')&lt;BR /&gt;
Host_Attack    The attacker's IP field is    'host_attack_sip'       (Host_Attack event come from the index  'secure'&lt;/P&gt;

&lt;P&gt;ok. So I have the following two questions&lt;/P&gt;

&lt;P&gt;1、If these alert are triggered and output results, that is to say, the results are not empty.How to bring together the alert results togethe? That is, the results are aggregated in an index.&lt;/P&gt;

&lt;P&gt;Use summary index? However, there are many problems with the summary  index.&lt;BR /&gt;
     a、summary index is triggered in real-time, Regardless of whether the result is empty, that will be displayed in the Triggered Alert&lt;BR /&gt;
     b、Because in the cluster,If the alert is triggered and the result is not empty, there are many repeated results in summary index.&lt;BR /&gt;
           for example:  The ‘’port_scan‘’ alert has been triggered.I try to search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index = summary source = port_scan
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are five identical results. There will be a lot of duplicate data.&lt;/P&gt;

&lt;P&gt;2、How to bring all the attacker's IP in a field (for example, the field: hack_ip).   &lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/206880-01.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;sorry .please forgive my English&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:56:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316221#M10699</guid>
      <dc:creator>xsstest</dc:creator>
      <dc:date>2020-09-29T14:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to bring together the alert results together</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316222#M10700</link>
      <description>&lt;OL&gt;
&lt;LI&gt;Summary indexing would be the way to go. If the results are empty (alert not triggered), no summary index data would be written. Also, summary indexing works just fine with Search head cluster OR indexer cluster. May be something else is going on in your environment if you see duplicate events.&lt;/LI&gt;
&lt;LI&gt;In your alert search, rename the attacker's IP field to a common name. This way in the summary index, the attackers IP has same name for all results and your reporting out of the summary index will be easier.
e.g. Port_Scan:     &lt;CODE&gt;...alert search... | rename scan_sip as hacker_ip&lt;/CODE&gt;
Web_Attack:     &lt;CODE&gt;...alert search... | rename web_attack_sip as hacker_ip&lt;/CODE&gt;
Host_Attack:     &lt;CODE&gt;...alert search... | rename host_attack_sip as hacker_ip&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316222#M10700</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T14:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to bring together the alert results together</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316223#M10701</link>
      <description>&lt;P&gt;First, ensure you are putting a &lt;CODE&gt;_time&lt;/CODE&gt; or &lt;CODE&gt;alert_time&lt;/CODE&gt; into the summary index, for use in analysis.  &lt;/P&gt;

&lt;P&gt;Also, preferably, you should &lt;STRONG&gt;create a specific summary index&lt;/STRONG&gt; for this particular kind of data, rather than using the default one.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Second, for your own sanity, please resolve to &lt;STRONG&gt;regularize your naming conventions&lt;/STRONG&gt; (and other formatting).  Having a different name in each alert for the same conceptual data field is going to cause your code to become ridiculous over time.  &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Third, &lt;STRONG&gt;look into field aliasing&lt;/STRONG&gt;.  If you alias the various attacker IP fields in the summary index, then you won't have to deal with individually coding them in your searches.   See reference - &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/Knowledge/Addaliasestofields"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.2/Knowledge/Addaliasestofields&lt;/A&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Fourth, for now, you can &lt;STRONG&gt;use coalesce&lt;/STRONG&gt; (either &lt;CODE&gt;coalesce&lt;/CODE&gt; or &lt;CODE&gt;mvappend&lt;/CODE&gt;) to get the variously named fields into a single field. Use &lt;CODE&gt;mvappend&lt;/CODE&gt; only if there may be more than one of the fields and you want to retain the multiple values.  That looks like either...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval hacker_ip = coalesce(scan_sip, web_attack_sip, host_attack_sip,....)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...or... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval hacker_ip = mvappend(scan_sip, web_attack_sip, host_attack_sip,....)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Fifth, assuming you've already tightened your timeframe to include only relevant events, then you can get rid of the &lt;STRONG&gt;_time&lt;/STRONG&gt; field and use &lt;CODE&gt;uniq&lt;/CODE&gt; to kill any complete dups. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - _* 
| uniq
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternately, you could use a separate &lt;CODE&gt;dedup&lt;/CODE&gt; for each type of record, with &lt;CODE&gt;keepempty=t&lt;/CODE&gt; so that only that type of record will be deduped by those parameters.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dedup scan_sip scan_dip scan_dport scan_type status keepempty=t
| dedup web_attack_sip server attack_type request_link keepempty=t
| dedup host_attack_sip server attack_type keepempty=t
| dedup ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Sixth, you will then feed your &lt;CODE&gt;hacker_ip&lt;/CODE&gt; into &lt;CODE&gt;iplocation&lt;/CODE&gt; to determine &lt;CODE&gt;Country&lt;/CODE&gt; etc.   See reference - &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Iplocation"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Iplocation&lt;/A&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Finally, a starting place for your aggregation report...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  earliest=foo index=summary (source=port_scan OR source=web_attack OR source=host_attack ...)
| dedup scan_sip scan_dip scan_dport scan_type status keepempty=t
| dedup web_attack_sip server attack_type request_link keepempty=t
| dedup host_attack_sip server attack_type keepempty=t
| dedup ...
| eval hacker_ip = coalesce(scan_sip, web_attack_sip, host_attack_sip,....)
| eval unit=1
| stats sum(unit) as hack_count by hacker_ip
| iplocation hacker_ip
| table hacker_ip Country City hack_count
| rename hack_count as "Count of Hack Attempts" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Jul 2017 15:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316223#M10701</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-19T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to bring together the alert results together</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316224#M10702</link>
      <description>&lt;P&gt;hi  DalJeanis~Thank you for your help. But I have a problem that is not clear enough.&lt;/P&gt;

&lt;P&gt;When an alert(for example: port_scan) is triggered, I search "index=summary source=port_scan ", There are 5 identical that alert in summay index. why? The splunk_server of these 5 events is one of the index servers in the indexer cluster.Host is the search head for the current search execution. This is also a headache for me to solve&lt;/P&gt;

&lt;P&gt;In addition, since the summary index is real-time search and has too many summary indexes, it will prompt a message: Splunk tells me that the number of alerts currently triggered is too much. It's against me. Message probably said so&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:01:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316224#M10702</guid>
      <dc:creator>xsstest</dc:creator>
      <dc:date>2020-09-29T15:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to bring together the alert results together</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316225#M10703</link>
      <description>&lt;P&gt;@DalJeanis&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 11:53:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316225#M10703</guid>
      <dc:creator>xsstest</dc:creator>
      <dc:date>2017-07-26T11:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to bring together the alert results together</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316226#M10704</link>
      <description>&lt;P&gt;@xsstest - see the other question for information about multiple duplicate results in this kind of search.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/558452/too-many-search-jobs-found-in-the-dispatch-directo-3.html"&gt;https://answers.splunk.com/answers/558452/too-many-search-jobs-found-in-the-dispatch-directo-3.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 19:46:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-bring-together-the-alert-results-together/m-p/316226#M10704</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-27T19:46:30Z</dc:date>
    </item>
  </channel>
</rss>

