<?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 do you get the value from a tabular event for alerting? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384030#M173852</link>
    <description>&lt;P&gt;So I developed a Query like below &lt;/P&gt;

&lt;P&gt;sourcetype=mysourcetype| multikv forceheader=2  |convert dur2sec(Lag) AS Lag_in_secs |convert dur2sec(Time) AS Lag|table Lag_in_secs, Lag |where Lag_in_secs&amp;gt;900 OR Lag&amp;gt;900&lt;/P&gt;

&lt;P&gt;Please correct me if anything wrong here .&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 22:38:31 GMT</pubDate>
    <dc:creator>raj_mpl</dc:creator>
    <dc:date>2020-09-29T22:38:31Z</dc:date>
    <item>
      <title>How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384021#M173843</link>
      <description>&lt;P&gt;Hi my log event will be in a tabular format like below &lt;/P&gt;

&lt;P&gt;program     status      Group           Lag                  Time&lt;BR /&gt;&lt;BR /&gt;
ABC     RUNNING     process1       00:03:05      00:00:04&lt;BR /&gt;&lt;BR /&gt;
ABC     RUNNING     process2       00:06:20      00:00:02    &lt;/P&gt;

&lt;P&gt;Now I want to write an alert condition when Lag is greater than 30 minutes . How do I achieve this ?&lt;/P&gt;

&lt;P&gt;Thank you &lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 11:22:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384021#M173843</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-02T11:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384022#M173844</link>
      <description>&lt;P&gt;The &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Convert"&gt;convert dur2sec() function&lt;/A&gt; is what you are looking for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search
| convert dur2sec(Lag) AS Lag_in_secs
| where Lag_in_secs&amp;gt;30*60
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Jan 2019 12:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384022#M173844</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-01-02T12:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384023#M173845</link>
      <description>&lt;P&gt;Hi @whrg , thanks for your reply on this the first row that I mentioned is actually contained  program status Group (lag point), (Time point)&lt;BR /&gt;
Like below &lt;/P&gt;

&lt;P&gt;program status Group Lag point Time point&lt;BR /&gt;
ABC RUNNING process1 00:03:05 00:00:04 &lt;BR /&gt;
ABC RUNNING process2 00:06:20 00:00:02&lt;/P&gt;

&lt;P&gt;So now please let me know what would be the command to split them both , I need to write condition on both lag point and Time point &lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 16:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384023#M173845</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-02T16:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384024#M173846</link>
      <description>&lt;P&gt;I'm not sure I understand. What do you mean by splitting them both? Do you want the alert to trigger when either Lag point or Time point exceeds 30 minutes?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 19:05:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384024#M173846</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-01-02T19:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384025#M173847</link>
      <description>&lt;P&gt;Yes absolutely , and a single event itself contains all the 3 rows in a tabular format .. I want to make 1st row as fields (program,stats,group,lap point,Time point)&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 20:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384025#M173847</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-02T20:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384026#M173848</link>
      <description>&lt;P&gt;So your event is multiline and you are only interested in the "process1" line?&lt;/P&gt;

&lt;P&gt;Check out this field extraction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1 | eval _raw="program status Group Lag point Time point
ABC RUNNING process1 00:03:05 00:00:04
ABC RUNNING process2 00:06:20 00:00:02"
| rex field=_raw "(?&amp;lt;program&amp;gt;\S+)\s+(?&amp;lt;status&amp;gt;\S+)\s+(?&amp;lt;group&amp;gt;\S+)\s+(?&amp;lt;lag_point&amp;gt;\d+:\d+:\d+)\s+(?&amp;lt;time_point&amp;gt;\d+:\d+:\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You might be better off indexing your logs as CSV files. This way, the fields are automatically extracted.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 20:37:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384026#M173848</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-01-02T20:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384027#M173849</link>
      <description>&lt;P&gt;Iam trying to achieve using mulikv command bro like&lt;/P&gt;

&lt;P&gt;sourcetype = mydata | multikv forceheader=2| ......&lt;/P&gt;

&lt;P&gt;Something like above query I need , it's a tabular data and Iam interested in "lag point' and "time point" .. which Iam not able to extract as fields &lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 02:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384027#M173849</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-03T02:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384028#M173850</link>
      <description>&lt;P&gt;Hi @raj_mpl ,&lt;/P&gt;

&lt;P&gt;You need to tweak the multikv extracttion using the multikv.conf file. code below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[demo_mkv]
header.start = "program"
header.linecount = 1
header.tokens = _tokenize_, -1," "
body.tokens = _tokenize_,-1, " "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You need to place this conf file in local/default folder in your app as multikv.conf. Ans restart splunk. I indexed the data in main index and the below query working for me. Then you can use your own logic on lag field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main 
|  multikv conf=demo_mkv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have discussed the same stuff below,&lt;/P&gt;

&lt;P&gt;&lt;A href="https://youtu.be/8kWgDVZZ0GQ"&gt;https://youtu.be/8kWgDVZZ0GQ&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Sid&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 06:14:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384028#M173850</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2019-01-03T06:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384029#M173851</link>
      <description>&lt;P&gt;Hi @sdchakraborty , Thanks for your reply on this &lt;BR /&gt;
I need to do this using search head only ., Gone through your video about multikv its worth and good stuff&lt;BR /&gt;
So when I fire this sourcetype=mysourcetype| multikv forceheader=2 , I am getting two fields named as Lag and Time . I believe Splunk extracted the filed name of Lag Point as Lag and Time point as Time .&lt;BR /&gt;
Now help me with a query to build an alert to check when Lag OR Time is greater than 15 minutes&lt;/P&gt;

&lt;P&gt;Thank you &lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 06:26:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384029#M173851</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-03T06:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384030#M173852</link>
      <description>&lt;P&gt;So I developed a Query like below &lt;/P&gt;

&lt;P&gt;sourcetype=mysourcetype| multikv forceheader=2  |convert dur2sec(Lag) AS Lag_in_secs |convert dur2sec(Time) AS Lag|table Lag_in_secs, Lag |where Lag_in_secs&amp;gt;900 OR Lag&amp;gt;900&lt;/P&gt;

&lt;P&gt;Please correct me if anything wrong here .&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:38:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384030#M173852</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2020-09-29T22:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384031#M173853</link>
      <description>&lt;P&gt;This query looks good. &lt;BR /&gt;
Sid&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 06:42:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384031#M173853</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2019-01-03T06:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384032#M173854</link>
      <description>&lt;P&gt;Thanks Sid&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 06:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384032#M173854</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-03T06:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384033#M173855</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/151987"&gt;@whrg&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;Developed the query like below&lt;/P&gt;

&lt;P&gt;sourcetype=mysourcetype| multikv forceheader=2 |convert dur2sec(Lag) AS Lag_in_secs |convert dur2sec(Time) AS Lag|table Lag_in_secs, Lag |where Lag_in_secs&amp;gt;900 OR Lag&amp;gt;900&lt;/P&gt;

&lt;P&gt;Please correct me if anything wrong here .&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:38:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384033#M173855</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2020-09-29T22:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384034#M173856</link>
      <description>&lt;P&gt;I think it needs to be: multikv forceheader=1&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 07:53:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384034#M173856</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-01-03T07:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the value from a tabular event for alerting?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384035#M173857</link>
      <description>&lt;P&gt;Yes , My event will start with a timestamp and some other information in first line &lt;BR /&gt;
so multikv forceheader=2 , worked for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 11:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-the-value-from-a-tabular-event-for-alerting/m-p/384035#M173857</guid>
      <dc:creator>raj_mpl</dc:creator>
      <dc:date>2019-01-03T11:00:46Z</dc:date>
    </item>
  </channel>
</rss>

