<?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: About setting alert (search) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325311#M97004</link>
    <description>&lt;P&gt;Thank you for answers.&lt;BR /&gt;
I am sorry that there is little explanation.&lt;/P&gt;

&lt;P&gt;Currently only A logs are acquired.&lt;BR /&gt;
The attached file name is not displayed in the A log, I will try to acquire it from the B log.&lt;BR /&gt;
* The attached file name is displayed in the B log.&lt;/P&gt;

&lt;P&gt;Therefore, compare the message IDs of the A log and B log, and in the same case, want to be able to output the attachment file name of the B log.&lt;/P&gt;

&lt;P&gt;Currently the following search sentences are used.&lt;/P&gt;

&lt;P&gt;Index = A log logtype = message_log from = "&lt;EM&gt;" subject = "&lt;/EM&gt;"&lt;BR /&gt;
 | 【omitted】&lt;BR /&gt;
 | table subject, count, from&lt;BR /&gt;
 | collect index = xxx source = "yyy" sourcetype = generic_single_line&lt;/P&gt;

&lt;P&gt;I would like to add the attached file name to the output result of the search sentence that is finally being used.&lt;BR /&gt;
I would like to display the attachment file name that is linked to the message ID&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:02:04 GMT</pubDate>
    <dc:creator>honobe</dc:creator>
    <dc:date>2020-09-29T15:02:04Z</dc:date>
    <item>
      <title>About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325308#M97001</link>
      <description>&lt;P&gt;I would like to compare the two logs and output the attachment file name to the alert if it is the same message ID.&lt;/P&gt;

&lt;P&gt;For example, the A log and the B log are compared, and when the message ID is the same, the attached file name described in the B log is outputted to the alert.&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;BR /&gt;
If it is possible,what kind of search sentences should I write?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 09:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325308#M97001</guid>
      <dc:creator>honobe</dc:creator>
      <dc:date>2017-07-20T09:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325309#M97002</link>
      <description>&lt;P&gt;@honobe, it will be easier for us to assist if you provide sample/mocked data and field names from log A and log B.&lt;/P&gt;

&lt;P&gt;If two sources/sourcetypes for log A and log B are different and both have messageID field, you are looking for stats command to correlate them and alert when number of result &amp;gt; 0&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="logA" OR sourcetype="logB" messageID=*
| stats count as eventcount values(sourcetype) as sourcetypes by messageID
| search eventcount&amp;gt;1 sourcetype="logA" AND sourcetype="logB"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jul 2017 10:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325309#M97002</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-20T10:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325310#M97003</link>
      <description>&lt;P&gt;@niketnilay - add &lt;CODE&gt;values(filename) as filename&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 01:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325310#M97003</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-21T01:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325311#M97004</link>
      <description>&lt;P&gt;Thank you for answers.&lt;BR /&gt;
I am sorry that there is little explanation.&lt;/P&gt;

&lt;P&gt;Currently only A logs are acquired.&lt;BR /&gt;
The attached file name is not displayed in the A log, I will try to acquire it from the B log.&lt;BR /&gt;
* The attached file name is displayed in the B log.&lt;/P&gt;

&lt;P&gt;Therefore, compare the message IDs of the A log and B log, and in the same case, want to be able to output the attachment file name of the B log.&lt;/P&gt;

&lt;P&gt;Currently the following search sentences are used.&lt;/P&gt;

&lt;P&gt;Index = A log logtype = message_log from = "&lt;EM&gt;" subject = "&lt;/EM&gt;"&lt;BR /&gt;
 | 【omitted】&lt;BR /&gt;
 | table subject, count, from&lt;BR /&gt;
 | collect index = xxx source = "yyy" sourcetype = generic_single_line&lt;/P&gt;

&lt;P&gt;I would like to add the attached file name to the output result of the search sentence that is finally being used.&lt;BR /&gt;
I would like to display the attachment file name that is linked to the message ID&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325311#M97004</guid>
      <dc:creator>honobe</dc:creator>
      <dc:date>2020-09-29T15:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325312#M97005</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/47875"&gt;@honobe&lt;/a&gt;&lt;/P&gt;

&lt;P&gt;Then you can use sendemail command on the query itself.&lt;/P&gt;

&lt;P&gt;your base search |  sendemail to=&lt;A href="mailto:example@splunk.com" target="_blank"&gt;example@splunk.com&lt;/A&gt; server=mail.example.com subject="$message_id$ " message="$message_id$" sendresults=true format=raw sendpdf=true&lt;/P&gt;

&lt;P&gt;I hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325312#M97005</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2020-09-29T14:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325313#M97006</link>
      <description>&lt;P&gt;I believe that niketnilay's answer is pretty much what you need.  &lt;/P&gt;

&lt;P&gt;Here's another way of looking at it.  Remember that only streaming commands are allowed in the subsearches in multisearch,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| multisearch 

      [search index = Alog logtype=message_log from=* subject=* | fields index messageID subject count from]

      [search index = Blog  your other search terms  | fields index messageID filename]

 | whatever you omitted

 | stats count as eventcount values(*) as * by messageID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jul 2017 20:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325313#M97006</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-21T20:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: About setting alert (search)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325314#M97007</link>
      <description>&lt;P&gt;Thank you very much.&lt;BR /&gt;
I thank everyone who responded.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 07:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/About-setting-alert-search/m-p/325314#M97007</guid>
      <dc:creator>honobe</dc:creator>
      <dc:date>2017-07-25T07:36:56Z</dc:date>
    </item>
  </channel>
</rss>

