<?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: Splunk replace host name with application name  in search query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79394#M181728</link>
    <description>&lt;P&gt;Yes you can put replace command , but count it first then apply the case/replace command. You can do a column chart to show your stats. Thanks&lt;/P&gt;

&lt;P&gt;e.g. &lt;BR /&gt;
host="*" source="/home/abc/tomcat/logs/app_error_log.txt" chart count by host| eval teamname=case(host="1234", "abc", host="5678", "def") |fields teamname,count&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:12:59 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2020-09-28T14:12:59Z</dc:date>
    <item>
      <title>Splunk replace host name with application name  in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79389#M181723</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;I am new to Splunk portal. I have to search on multiple hosts for HTTP hits and display the result in single graph by application names hosted on the hosts. Not to display hostname.&lt;/P&gt;

&lt;P&gt;Query is &lt;BR /&gt;
&lt;STRONG&gt;host="*" source="/home/abc/tomcat/logs/localhost_access_log.txt"  | chart count over host by date_wday | fields host monday tuesday wednesday thursday friday saturday sunday&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This query displays HTTP traffic by hostanme. But i want to replace the hostname with respective application name.&lt;/P&gt;

&lt;P&gt;Wanna show the application name instead of hostname on graph with http counts&lt;/P&gt;

&lt;P&gt;Looking forward for your help&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79389#M181723</guid>
      <dc:creator>ravinder82</dc:creator>
      <dc:date>2020-09-28T14:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk replace host name with application name  in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79390#M181724</link>
      <description>&lt;P&gt;if application name is in a field or  is in data coming from hosts then you can extract field of application.&lt;BR /&gt;
If both the above case are not then make lookup file with host and respective application column. and use application name in search.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 15:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79390#M181724</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2013-06-28T15:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk replace host name with application name  in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79391#M181725</link>
      <description>&lt;P&gt;Thanks Kml, for the response.&lt;/P&gt;

&lt;P&gt;I extracted the field but dont know how to fit that filed in query. i have extracted it as appname.&lt;/P&gt;

&lt;P&gt;Can you please help me to get this in query with respective to the hostname&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 15:41:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79391#M181725</guid>
      <dc:creator>ravinder82</dc:creator>
      <dc:date>2013-06-28T15:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk replace host name with application name  in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79392#M181726</link>
      <description>&lt;P&gt;Hello Ravi,&lt;BR /&gt;
if you have your appname extracted then,&lt;BR /&gt;
host="*" source="/home/abc/tomcat/logs/localhost_access_log.txt"|timechart count(application) by _time should work for you on dashboard. _time can replaced according to your requirement by other date fields.&lt;/P&gt;

&lt;P&gt;Make a query and see on search app if its giving you the desired result or you may need to tweak a bit.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:12:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79392#M181726</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T14:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk replace host name with application name  in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79393#M181727</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;I did not have application name in the application error logs (cant be extracted.&lt;/P&gt;

&lt;P&gt;Please help if using replace .... with or case functionality i can display the name of application inplace of host name.&lt;/P&gt;

&lt;P&gt;host="*" source="/home/abc/tomcat/logs/app_error_log.txt"  | eval teamname=case(host="1234", "abc", host="5678", "def") |chart count by teamname&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Ravinder&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79393#M181727</guid>
      <dc:creator>ravinder82</dc:creator>
      <dc:date>2020-09-28T14:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk replace host name with application name  in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79394#M181728</link>
      <description>&lt;P&gt;Yes you can put replace command , but count it first then apply the case/replace command. You can do a column chart to show your stats. Thanks&lt;/P&gt;

&lt;P&gt;e.g. &lt;BR /&gt;
host="*" source="/home/abc/tomcat/logs/app_error_log.txt" chart count by host| eval teamname=case(host="1234", "abc", host="5678", "def") |fields teamname,count&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:12:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-replace-host-name-with-application-name-in-search-query/m-p/79394#M181728</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T14:12:59Z</dc:date>
    </item>
  </channel>
</rss>

