<?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: Splunk Alert in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544950#M154315</link>
    <description>&lt;P&gt;Sorry for asking more what is the syntax for selecting field 2 and field 5&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 14:46:17 GMT</pubDate>
    <dc:creator>sshanmua</dc:creator>
    <dc:date>2021-03-23T14:46:17Z</dc:date>
    <item>
      <title>Splunk Alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544922#M154311</link>
      <description>&lt;P&gt;&lt;BR /&gt;I am trying to create a Splunk alert where the log line is delimited with comma,&lt;BR /&gt;I need to get the field 4 and check if the value is greater than threshold then raise an alert&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to search the field from corresponding file but unable to fetch the uniq filed and please help with getting the corresponding field which is delimit with comma &amp;gt; threshold&lt;/P&gt;&lt;P&gt;log: when i search for ,dat1,&amp;nbsp; it get me both the lines&amp;nbsp;&lt;BR /&gt;date,dat1,queue,0,100,0,0,0,0&lt;BR /&gt;date,am.dat1,queue,10000,23,34,0,0&lt;/P&gt;&lt;P&gt;index=index host="hostname" source="logpath" dat1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 13:00:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544922#M154311</guid>
      <dc:creator>sshanmua</dc:creator>
      <dc:date>2021-03-23T13:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544927#M154312</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232797"&gt;@sshanmua&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you already extracted field4, it's very easy to run a search to use in an alert:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index host="hostname" source="logpath" dat1
| where field4&amp;gt;10000&lt;/LI-CODE&gt;&lt;P&gt;where 1000 is the theshold.&lt;/P&gt;&lt;P&gt;If instead you didn't extracted the field4, you have to extract it using a regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index host="hostname" source="logpath" dat1
| rex "^[^,]+,[^,]+,[^,]+,(?&amp;lt;field4&amp;gt;\d+)"
| where field4&amp;gt;10000&lt;/LI-CODE&gt;&lt;P&gt;regex that you can check at&amp;nbsp;&lt;A href="https://regex101.com/r/YLI5KN/1" target="_blank"&gt;https://regex101.com/r/YLI5KN/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 13:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544927#M154312</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-23T13:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544950#M154315</link>
      <description>&lt;P&gt;Sorry for asking more what is the syntax for selecting field 2 and field 5&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 14:46:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544950#M154315</guid>
      <dc:creator>sshanmua</dc:creator>
      <dc:date>2021-03-23T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544953#M154316</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232797"&gt;@sshanmua&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can extract all the fields or only some of them using a similar regex, this is for fields 2, 4 and 5, as you requested:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^[^,]+,(?&amp;lt;field2&amp;gt;[^,]+),[^,]+,(?&amp;lt;field4&amp;gt;\d+),(?&amp;lt;field5&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 15:03:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Alert/m-p/544953#M154316</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-23T15:03:11Z</dc:date>
    </item>
  </channel>
</rss>

