<?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 How to show all data of one field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621670#M216098</link>
    <description>&lt;P&gt;Hello, I put them in context before showing the query.&lt;/P&gt;
&lt;P&gt;I have a splunk that I test on it to see the query results because I don't have access to the splunk that has the data.&lt;/P&gt;
&lt;P&gt;I have a query that shows me the result of these two hostnames, but I need this same result but on all hostnames, not just these two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 queries.&lt;/P&gt;
&lt;P&gt;The first query gets me the results of the two teams, although I don't know if it does it because I have the data inserted (I can't find it by index) or it puts them because I use the makeresults (I read that it works in cache and the data doesn't have to be).&lt;/P&gt;
&lt;P&gt;|makeresults&lt;BR /&gt;| eval EventCode="20", hostname="wdv01ssps,DESCASSOAW01", error_code="0x80070003 0x80004004"|makemv delim="," hostname | makemv delim=" " EventCode|makemv delim=" " error_code&lt;BR /&gt;| mvexpand EventCode |mvexpand hostname |mvexpand error_code|table hostname EventCode error_code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to use the latter as it's easier for me to display results from hostname, in this case it's called ComputerName.&lt;/P&gt;
&lt;P&gt;How can I do to show all ComputerName with these same filters?&lt;/P&gt;
&lt;P&gt;index=sistemi sourcetype="wineventlog" TaskCategory="Windows Update Agent" AND EventCode IN (20, 27)&lt;BR /&gt;| eval day_of_week = lower(strftime(_time, "%A"))&lt;BR /&gt;| eval date_string = strftime(_time, "%Y-%m-%d")&lt;BR /&gt;| eval Weekend=if(day_of_week="saturday" OR day_of_week="sunday",1,null())&lt;BR /&gt;| search Weekend=1&lt;BR /&gt;| stats count by Message EventCode ComputerName date_string&lt;BR /&gt;| stats list(Message) by ComputerName date_string EventCode&lt;/P&gt;
&lt;P&gt;It may simply not be possible to list all the computer names without listing them one by one.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 14:35:25 GMT</pubDate>
    <dc:creator>userQ</dc:creator>
    <dc:date>2022-11-22T14:35:25Z</dc:date>
    <item>
      <title>How to show all data of one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621670#M216098</link>
      <description>&lt;P&gt;Hello, I put them in context before showing the query.&lt;/P&gt;
&lt;P&gt;I have a splunk that I test on it to see the query results because I don't have access to the splunk that has the data.&lt;/P&gt;
&lt;P&gt;I have a query that shows me the result of these two hostnames, but I need this same result but on all hostnames, not just these two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 queries.&lt;/P&gt;
&lt;P&gt;The first query gets me the results of the two teams, although I don't know if it does it because I have the data inserted (I can't find it by index) or it puts them because I use the makeresults (I read that it works in cache and the data doesn't have to be).&lt;/P&gt;
&lt;P&gt;|makeresults&lt;BR /&gt;| eval EventCode="20", hostname="wdv01ssps,DESCASSOAW01", error_code="0x80070003 0x80004004"|makemv delim="," hostname | makemv delim=" " EventCode|makemv delim=" " error_code&lt;BR /&gt;| mvexpand EventCode |mvexpand hostname |mvexpand error_code|table hostname EventCode error_code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to use the latter as it's easier for me to display results from hostname, in this case it's called ComputerName.&lt;/P&gt;
&lt;P&gt;How can I do to show all ComputerName with these same filters?&lt;/P&gt;
&lt;P&gt;index=sistemi sourcetype="wineventlog" TaskCategory="Windows Update Agent" AND EventCode IN (20, 27)&lt;BR /&gt;| eval day_of_week = lower(strftime(_time, "%A"))&lt;BR /&gt;| eval date_string = strftime(_time, "%Y-%m-%d")&lt;BR /&gt;| eval Weekend=if(day_of_week="saturday" OR day_of_week="sunday",1,null())&lt;BR /&gt;| search Weekend=1&lt;BR /&gt;| stats count by Message EventCode ComputerName date_string&lt;BR /&gt;| stats list(Message) by ComputerName date_string EventCode&lt;/P&gt;
&lt;P&gt;It may simply not be possible to list all the computer names without listing them one by one.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 14:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621670#M216098</guid>
      <dc:creator>userQ</dc:creator>
      <dc:date>2022-11-22T14:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all data of one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621684#M216102</link>
      <description>&lt;P&gt;I am not sure what you are asking for - all the computer names are listed by the stats call. Do you just want the computer names?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(ComputerName) as ComputerName&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Nov 2022 11:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621684#M216102</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-22T11:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all data of one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621701#M216113</link>
      <description>&lt;P&gt;Hi, sorry if I didn't explain myself well.&lt;BR /&gt;I would like to get all the hostnames instead of just naming those two, for example: hostname=*&lt;/P&gt;&lt;P&gt;Referencing the * as all the hostnames there are.&lt;/P&gt;&lt;P&gt;I know the * doesn't work in splunk like in programming languages, it only worked with index=* but not inside the query with the data.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 12:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621701#M216113</guid>
      <dc:creator>userQ</dc:creator>
      <dc:date>2022-11-22T12:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all data of one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621708#M216117</link>
      <description>&lt;P&gt;Why do you think * only works for index?&lt;/P&gt;&lt;P&gt;By not restricting the hostname i.e. not using a filter, you will be getting events for all hostnames. This is almost the same as hostname=* except that hostname=* will ensure hostname is not null.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 13:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-all-data-of-one-field/m-p/621708#M216117</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-22T13:36:00Z</dc:date>
    </item>
  </channel>
</rss>

