<?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 Extract a field/or a single value from a scheduled alert table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256835#M76938</link>
    <description>&lt;P&gt;So I am generating an alert everyday at 2am, the alert is basically a table with several fields, now I would like the user to utilize this saved alert by only using a single value from it (I need the entire table because beforehand I do not know which value the user will select)&lt;/P&gt;

&lt;P&gt;currently it is only &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
&amp;lt;search ref="alert_objects"&amp;gt;&amp;lt;/search&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is it possible to search in this like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
&amp;lt;search ref="alert_objects"&amp;gt; | search * host="$host_token$" 
 table total_time&amp;lt;/search&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 16 Oct 2016 23:49:56 GMT</pubDate>
    <dc:creator>smhsplunk</dc:creator>
    <dc:date>2016-10-16T23:49:56Z</dc:date>
    <item>
      <title>Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256835#M76938</link>
      <description>&lt;P&gt;So I am generating an alert everyday at 2am, the alert is basically a table with several fields, now I would like the user to utilize this saved alert by only using a single value from it (I need the entire table because beforehand I do not know which value the user will select)&lt;/P&gt;

&lt;P&gt;currently it is only &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
&amp;lt;search ref="alert_objects"&amp;gt;&amp;lt;/search&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is it possible to search in this like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
&amp;lt;search ref="alert_objects"&amp;gt; | search * host="$host_token$" 
 table total_time&amp;lt;/search&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 Oct 2016 23:49:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256835#M76938</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-16T23:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256836#M76939</link>
      <description>&lt;P&gt;&lt;CODE&gt;&amp;lt;search ref="alert_objects"&amp;gt;&amp;lt;/search&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
 is not the search query. &lt;/P&gt;

&lt;P&gt;can you copy and paste the whole xml please.. &lt;BR /&gt;
or, the &lt;CODE&gt;&amp;lt;query&amp;gt;&lt;/CODE&gt; part.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 08:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256836#M76939</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-10-17T08:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256837#M76940</link>
      <description>&lt;P&gt;The actual search query is saved as an alert (alert name "alert_objects")&lt;BR /&gt;
I am trying to get a field value from it, this is the actual query (saved as alert)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host="*"   
                  | transaction startswith="StartSession" endswith="EndSession" by source   
          | appendpipe [ | stats count | where count = 0 | eval duration=0]
                  | eval session_per_source = duration 
                  | stats sum(session_per_source) as total_time by host
                  | table host, total_time
                  | fillnull value=NULL 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need the entire table as an alert, and was wondering if I could query this alert and only show the value part &lt;BR /&gt;
| search * host="$host_token$" &lt;BR /&gt;
  table total_time&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:26:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256837#M76940</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2020-09-29T11:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256838#M76941</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;P&gt;Replace &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
 &amp;lt;search ref="alert_objects"&amp;gt;&amp;lt;/search&amp;gt;
 &amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With &lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
...other xml portions..
&amp;lt;search ref="alert_objects" id="base_alert_objects" &amp;gt;&amp;lt;/search&amp;gt;
....
 &amp;lt;table&amp;gt;
 &amp;lt;search base="base_alert_objects"&amp;gt; &amp;lt;query&amp;gt; search * host="$host_token$" |  table total_time&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
 &amp;lt;/table&amp;gt;
...
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Oct 2016 14:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256838#M76941</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-17T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256839#M76942</link>
      <description>&lt;P&gt;This should work but it is giving me the entire table again, seems like its ignoring this entire part &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search * host="$host_token$" |  table total_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;
&amp;lt;panel&amp;gt;
&amp;lt;search ref="alert_objects" id="base_alert_objects" &amp;gt;&amp;lt;/search&amp;gt;
&amp;lt;table&amp;gt;
  &amp;lt;search base="base_alert_objects"&amp;gt;  search * host="$host_token$" |  table total_time&amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:26:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256839#M76942</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-17T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256840#M76943</link>
      <description>&lt;P&gt;I missed the query tag in there. Try the updated one.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256840#M76943</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-17T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a field/or a single value from a scheduled alert table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256841#M76944</link>
      <description>&lt;P&gt;awesome it works!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:40:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-a-field-or-a-single-value-from-a-scheduled-alert-table/m-p/256841#M76944</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-17T15:40:06Z</dc:date>
    </item>
  </channel>
</rss>

