<?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 I format the output from a Splunk query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60231#M14839</link>
    <description>&lt;P&gt;Can you show the search command you are currently using and perhaps some sample output?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2011 15:44:58 GMT</pubDate>
    <dc:creator>dmaislin_splunk</dc:creator>
    <dc:date>2011-08-18T15:44:58Z</dc:date>
    <item>
      <title>How can I format the output from a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60230#M14838</link>
      <description>&lt;P&gt;How can I format the output from a Splunk query?&lt;/P&gt;

&lt;P&gt;For example I have three fields extracted, A, B, C. I'd like to output "For server A service B is in state C". The original format of the log is so horrible (nearly 20 additional fields I don't want) I'd rather not have to have my users have to struggle through reading it in the raw format. The table command doesn't work since how I'm using the output the table headers are useless. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 15:22:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60230#M14838</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2011-08-18T15:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I format the output from a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60231#M14839</link>
      <description>&lt;P&gt;Can you show the search command you are currently using and perhaps some sample output?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 15:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60231#M14839</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2011-08-18T15:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I format the output from a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60232#M14840</link>
      <description>&lt;P&gt;You can concatenate strings together to a new field holding the concatenated string using the &lt;CODE&gt;eval&lt;/CODE&gt; command and then output that using &lt;CODE&gt;table&lt;/CODE&gt; or however you want to output the field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourbasesearch&amp;gt; 
| eval userfriendlydesc="For server ".A." service ".B." is in state".C
| table userfriendlydesc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If for some reason you don't want to use &lt;CODE&gt;table&lt;/CODE&gt; you could change the raw message at search time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourbasesearch&amp;gt; 
| eval _raw="For server ".A." service ".B." is in state".C
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Aug 2011 16:09:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60232#M14840</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-08-18T16:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I format the output from a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60233#M14841</link>
      <description>&lt;P&gt;That is exactly what I was looking for. I hadn't thought about using an eval in that way - I didn't think that the string concatenation like that would work. Many thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 13:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-format-the-output-from-a-Splunk-query/m-p/60233#M14841</guid>
      <dc:creator>timbCFCA</dc:creator>
      <dc:date>2011-08-19T13:34:39Z</dc:date>
    </item>
  </channel>
</rss>

