<?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 can multiselect input accommodate logs with different field names for the same values? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275134#M17403</link>
    <description>&lt;P&gt;Yeah.  I tried it and that does not handle the multiple values&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2017 02:45:32 GMT</pubDate>
    <dc:creator>MonkeyK</dc:creator>
    <dc:date>2017-02-08T02:45:32Z</dc:date>
    <item>
      <title>How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275131#M17400</link>
      <description>&lt;P&gt;My dashboard is based on a datamodel but it has drilldowns to the actual logs&lt;/P&gt;

&lt;P&gt;If I have a multiselect for actions (A, B, C), I can set the valuePrefix with a delimiter of "OR"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="form_action"&amp;gt;
      &amp;lt;label&amp;gt;Action&amp;lt;/label&amp;gt;
      &amp;lt;choice value="=A"&amp;gt;A&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="=B"&amp;gt;B&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="=C"&amp;gt;C&amp;lt;/choice&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;DataModel.action&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
      &amp;lt;default&amp;gt;=A,=B&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;=A,=B&amp;lt;/initialValue&amp;gt;
 &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So that based on selections, I can define DataModel search terms to &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;DataModel.action=A OR DataModel.action=B&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;However the actual event log does not have the field DataModel.action.  It only has "action".  So when I do a drilldown to the log events, I would like to be able so drill down to a search that includes &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;action=A OR action=B&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The two ideas that I have to do this are&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;rename the prefix to just "action" and delay my datamodel search terms until after I have selected from my datamodel: &lt;/P&gt;

&lt;P&gt;|tstats count from datamode=DataModel by DataModel.action | eval action=DataModel.action | search $form_action$&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;create field alias for my log source field action called DataModel.action  then searches for DataModel.action should work&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;IMO, the first option is bad because it does not allow further variation in log sources.  So if I had visualizations that might drill down to different log sources, with different field names for "action", I could not create those drill downs&lt;BR /&gt;
The second option is slightly better but I would also not like to start creating aliases for logs source to match data models&lt;/P&gt;

&lt;P&gt;Is there a better way to do this? &lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 23:37:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275131#M17400</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-02-02T23:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275132#M17401</link>
      <description>&lt;P&gt;have you tried putting the token inside the tstats?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count from datamode=DataModel  where $form_action$ by DataModel.action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Tstats"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Tstats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 12:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275132#M17401</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-02-03T12:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275133#M17402</link>
      <description>&lt;P&gt;Does that resolve multiple values from the multiselect?  I am thinking not.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 17:42:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275133#M17402</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-02-03T17:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275134#M17403</link>
      <description>&lt;P&gt;Yeah.  I tried it and that does not handle the multiple values&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 02:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275134#M17403</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-02-08T02:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275135#M17404</link>
      <description>&lt;P&gt;i just made a dashboard with &lt;CODE&gt;tstats&lt;/CODE&gt; and used the same multiselect XML as yours above and am able to click one or both of them and the data is showing.  check my edit. I had a typo.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 12:42:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275135#M17404</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-02-08T12:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275136#M17405</link>
      <description>&lt;P&gt;Yes, your edit is what I had been doing.  As noted in my qestion, the multi-select works on a single source.&lt;BR /&gt;
My problem occurs when I want to drill down or use the same input for a source that names the field differently.  My question is looking for a best way to handle that.  &lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 17:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275136#M17405</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-02-08T17:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275137#M17406</link>
      <description>&lt;P&gt;I have recently learned that I can create a new token using eval:&lt;/P&gt;

&lt;P&gt;in the case of my drilldown, inside the drilldown definition, I can do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown target="_blank"&amp;gt;
          &amp;lt;set token="newAction"&amp;gt;$form_action$&amp;lt;/set&amp;gt;
          &amp;lt;eval token="newAction"&amp;gt;replace($form_action$,"DataModel.action","action")&amp;lt;/eval&amp;gt;
          &amp;lt;eval token="newAction"&amp;gt;replace($newAction$,"DataModel.action","action")&amp;lt;/eval&amp;gt;
...
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 17:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275137#M17406</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-02-08T17:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can multiselect input accommodate logs with different field names for the same values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275138#M17407</link>
      <description>&lt;P&gt;You beat me to it! I was sitting at home thinking about this and I thought, "oh an eval would work, I'll quick add a comment" but I hadn't noticed that you've posted so long ago!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 02:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-multiselect-input-accommodate-logs-with-different-field/m-p/275138#M17407</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-02-09T02:09:05Z</dc:date>
    </item>
  </channel>
</rss>

