<?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 Query Assistance - break data into table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-Assistance-break-data-into-table/m-p/136562#M37361</link>
    <description>&lt;P&gt;I am working on a search that will take a massive list of user groups and table the servers under such group. &lt;BR /&gt;
An example input:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Group:  appldev ===&amp;gt; uslx233, uslx235, uslx238, uslx239, xls001cn03, xls001cn04
Group:  appldvs ===&amp;gt; xla001cn01, xla001cn02, xla001cn07, xls001cn01, xls001cn02, xls001cn03, xls001cn04
Group:  cmod ===&amp;gt; uslx30a, uslx31a, uslx32a, uslx33a, uslx34a, uslx1064, uslx1065, uslx1067
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the example, appldev is the group name and everything else after ===&amp;gt; are the servers it pertains to. This all comes in as a single Splunk log entry (it is about 58 lines long). &lt;BR /&gt;
I will be writing an XML based form in Splunk using the group names as radio buttons. When a group name is selected, it will bring up a table of all servers. I can get the radio button and dynamic dashboard into place, however, I am looking for suggestions on breaking out just the servers requested by the radio button.&lt;/P&gt;

&lt;P&gt;For example, if you ignore the radio button scenario above, how would I get a search to do the following:&lt;/P&gt;

&lt;P&gt;pseudo search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;group='appldev' | table related_hosts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output: &lt;/P&gt;

&lt;H2&gt;related_hosts: &lt;/H2&gt;

&lt;P&gt;uslx233&lt;BR /&gt;
uslx235&lt;BR /&gt;
uslx238&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
..&lt;/P&gt;

&lt;P&gt;Any suggestions are appreciated. &lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 12 Feb 2015 16:45:57 GMT</pubDate>
    <dc:creator>herndona</dc:creator>
    <dc:date>2015-02-12T16:45:57Z</dc:date>
    <item>
      <title>Search Query Assistance - break data into table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-Assistance-break-data-into-table/m-p/136562#M37361</link>
      <description>&lt;P&gt;I am working on a search that will take a massive list of user groups and table the servers under such group. &lt;BR /&gt;
An example input:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Group:  appldev ===&amp;gt; uslx233, uslx235, uslx238, uslx239, xls001cn03, xls001cn04
Group:  appldvs ===&amp;gt; xla001cn01, xla001cn02, xla001cn07, xls001cn01, xls001cn02, xls001cn03, xls001cn04
Group:  cmod ===&amp;gt; uslx30a, uslx31a, uslx32a, uslx33a, uslx34a, uslx1064, uslx1065, uslx1067
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the example, appldev is the group name and everything else after ===&amp;gt; are the servers it pertains to. This all comes in as a single Splunk log entry (it is about 58 lines long). &lt;BR /&gt;
I will be writing an XML based form in Splunk using the group names as radio buttons. When a group name is selected, it will bring up a table of all servers. I can get the radio button and dynamic dashboard into place, however, I am looking for suggestions on breaking out just the servers requested by the radio button.&lt;/P&gt;

&lt;P&gt;For example, if you ignore the radio button scenario above, how would I get a search to do the following:&lt;/P&gt;

&lt;P&gt;pseudo search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;group='appldev' | table related_hosts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output: &lt;/P&gt;

&lt;H2&gt;related_hosts: &lt;/H2&gt;

&lt;P&gt;uslx233&lt;BR /&gt;
uslx235&lt;BR /&gt;
uslx238&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;BR /&gt;
..&lt;/P&gt;

&lt;P&gt;Any suggestions are appreciated. &lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 16:45:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-Assistance-break-data-into-table/m-p/136562#M37361</guid>
      <dc:creator>herndona</dc:creator>
      <dc:date>2015-02-12T16:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search Query Assistance - break data into table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-Assistance-break-data-into-table/m-p/136563#M37362</link>
      <description>&lt;P&gt;if the field really is called "related_hosts",  then it would look like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;group='appldev' | stats count by related_hosts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the field is simply "host",  then &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;group='appldev' | stats count by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and if you want to sort by count, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    group='appldev' | stats count by host | sort 0 - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Feb 2015 21:23:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-Assistance-break-data-into-table/m-p/136563#M37362</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2015-02-12T21:23:24Z</dc:date>
    </item>
  </channel>
</rss>

