<?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: fetch host in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684160#M56015</link>
    <description>&lt;P&gt;host is same across all the env. i am facing issue when i bind the same value to drop down list saying "&lt;SPAN&gt;Duplicate values causing conflict&lt;/SPAN&gt;". But i need dropdown list with TEST/QA/PROD(label) with same host value. - how can i achieve this?&lt;/P&gt;</description>
    <pubDate>Sat, 13 Apr 2024 11:50:02 GMT</pubDate>
    <dc:creator>Jasmine</dc:creator>
    <dc:date>2024-04-13T11:50:02Z</dc:date>
    <item>
      <title>fetch host</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684082#M56002</link>
      <description>&lt;P&gt;what is the error in the below query which i am using to populate in drop down list&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=aaa(source="/var/log/testd.log") |stats count by host
| eval env=case(match(host, "*10qe*"), "Test",
match(host, "*10qe*"), "QA",
match(host, "*10qe*"), "Prod" )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 18:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684082#M56002</guid>
      <dc:creator>Jasmine</dc:creator>
      <dc:date>2024-04-12T18:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: fetch host</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684086#M56003</link>
      <description>&lt;P&gt;Some potential problems with your query are:&lt;/P&gt;&lt;P&gt;1. index=aaa(source="/var/log/testd.log")&lt;BR /&gt;Does not have a space between the index and source filters&lt;/P&gt;&lt;P&gt;2. the match() functions in your eval env=case() part should have valid regexes in the second argument of the match function, as in match(&amp;lt;field&amp;gt;,&amp;lt;regex&amp;gt;). Try this:&lt;BR /&gt;| eval env=case(match(host, ".*10qe.*"), "Test",&lt;BR /&gt;match(host, ".*10qe.*"), "QA",&lt;BR /&gt;match(host, ".*10qe.*"), "Prod" )&lt;BR /&gt;&lt;BR /&gt;ref:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SCS/current/SearchReference/ConditionalFunctions" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/SearchReference/ConditionalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 19:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684086#M56003</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-04-12T19:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: fetch host</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684127#M56009</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/255320"&gt;@Jasmine&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/263556"&gt;@marnall&lt;/a&gt;&amp;nbsp;said a space is missing between the index value and the source condition.&lt;/P&gt;&lt;P&gt;I suppose that the erro is that the argument of the match function in the eval command is a regex, so you don't need to use asterisk:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=aaa (source="/var/log/testd.log") 
| stats count by host
| eval env=case(
   match(host, "10qe"), "Test",
   match(host, "10qe"), "QA",
   match(host, "10qe"), "Prod")&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 05:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684127#M56009</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-04-13T05:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: fetch host</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684160#M56015</link>
      <description>&lt;P&gt;host is same across all the env. i am facing issue when i bind the same value to drop down list saying "&lt;SPAN&gt;Duplicate values causing conflict&lt;/SPAN&gt;". But i need dropdown list with TEST/QA/PROD(label) with same host value. - how can i achieve this?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 11:50:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/fetch-host/m-p/684160#M56015</guid>
      <dc:creator>Jasmine</dc:creator>
      <dc:date>2024-04-13T11:50:02Z</dc:date>
    </item>
  </channel>
</rss>

