<?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 Search key with variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61332#M15138</link>
    <description>&lt;P&gt;I have events like this: Desc_1=eth1&lt;BR /&gt;
Desc_50=vlan.10&lt;BR /&gt;
Desc_123=vlan.20&lt;BR /&gt;
....&lt;/P&gt;

&lt;P&gt;the key is in Descr_* format and I want to have a search and disply as select box like this.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
&amp;lt;option value="Desc_1"&amp;gt;eth1&amp;lt;/option&amp;gt;&lt;BR /&gt;
&amp;lt;option value="Desc_50"&amp;gt;vlan.10&amp;lt;/option&amp;gt;&lt;BR /&gt;
&amp;lt;option value="Desc_123"&amp;gt;vlan.20&amp;lt;/option&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I have some try but no luck because the key is not static... Thanks alot. &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:52:16 GMT</pubDate>
    <dc:creator>hello_world15</dc:creator>
    <dc:date>2020-09-28T11:52:16Z</dc:date>
    <item>
      <title>Search key with variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61332#M15138</link>
      <description>&lt;P&gt;I have events like this: Desc_1=eth1&lt;BR /&gt;
Desc_50=vlan.10&lt;BR /&gt;
Desc_123=vlan.20&lt;BR /&gt;
....&lt;/P&gt;

&lt;P&gt;the key is in Descr_* format and I want to have a search and disply as select box like this.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
&amp;lt;option value="Desc_1"&amp;gt;eth1&amp;lt;/option&amp;gt;&lt;BR /&gt;
&amp;lt;option value="Desc_50"&amp;gt;vlan.10&amp;lt;/option&amp;gt;&lt;BR /&gt;
&amp;lt;option value="Desc_123"&amp;gt;vlan.20&amp;lt;/option&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I have some try but no luck because the key is not static... Thanks alot. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61332#M15138</guid>
      <dc:creator>hello_world15</dc:creator>
      <dc:date>2020-09-28T11:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search key with variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61333#M15139</link>
      <description>&lt;P&gt;This section of the docs covers this pretty well. &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Developer/AddDropDowns"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Developer/AddDropDowns&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2012 14:49:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61333#M15139</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-27T14:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Search key with variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61334#M15140</link>
      <description>&lt;P&gt;Sorry, may be I have not described my question clearly.&lt;/P&gt;

&lt;P&gt;Acutally I need to have a search result like this, so that I will make it become select box.&lt;/P&gt;

&lt;P&gt;key         value&lt;BR /&gt;
Desc_1      eth1&lt;BR /&gt;
Desc_50     vlan.10&lt;BR /&gt;
Desc_123    vlan.20&lt;/P&gt;

&lt;P&gt;Since the key is in Desc_* format, i tried the search like this not work:&lt;/P&gt;

&lt;P&gt;Desc_* | stats count by Descr_* &lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61334#M15140</guid>
      <dc:creator>hello_world15</dc:creator>
      <dc:date>2020-09-28T11:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search key with variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61335#M15141</link>
      <description>&lt;P&gt;Have a look at the &lt;CODE&gt;fieldForValue&lt;/CODE&gt; and &lt;CODE&gt;fieldForLabel&lt;/CODE&gt; parameters. One is used for setting the label, and one for setting the value.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2012 07:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-key-with-variable/m-p/61335#M15141</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-28T07:00:02Z</dc:date>
    </item>
  </channel>
</rss>

