<?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: choose color based on text value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/638298#M221231</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Is this code being same for single value visualization?&lt;BR /&gt;I can see it works fine for table, but I need it for Single value visualization,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 06:11:00 GMT</pubDate>
    <dc:creator>smanojkumar</dc:creator>
    <dc:date>2023-04-03T06:11:00Z</dc:date>
    <item>
      <title>How to choose color based on text value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/636852#M221167</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; I need to choose the color in the dashboard based on the text results in dashboard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;where the value is "OK", it should be in green color,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; where the value is "Ko", it should be in red color,&lt;BR /&gt;&lt;BR /&gt;this is the only field that the dashboard returns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 16:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/636852#M221167</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-03-31T16:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/636858#M221171</link>
      <description>&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color"&amp;gt;
  &amp;lt;colorPalette type="map"&amp;gt;{"KO":#FF0000, "OK":#00FF00}&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/636858#M221171</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T10:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/638298#M221231</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Is this code being same for single value visualization?&lt;BR /&gt;I can see it works fine for table, but I need it for Single value visualization,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 06:11:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/638298#M221231</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-03T06:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/638313#M221234</link>
      <description>&lt;P&gt;You are right, this doesn't work for single visualisations. Instead you could ddd an extra field to your query called range.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval range=if(value=="OK","low","severe")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Apr 2023 07:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/638313#M221234</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-04-03T07:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639182#M221468</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Can you please help me here, where i need to make change, i just made in query, i'm having some error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form theme="dark"&amp;gt;
  &amp;lt;label&amp;gt; ASSET STATUS&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
    &amp;lt;input type="radio" token="category" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Category&amp;lt;/label&amp;gt;
      &amp;lt;choice value="work"&amp;gt;Work&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="auto"&amp;gt;Auto&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="server"&amp;gt;Server&amp;lt;/choice&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query/&amp;gt;
        &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;work&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="work"&amp;gt;
          &amp;lt;set token="Work"&amp;gt;"Work"&amp;lt;/set&amp;gt;
          &amp;lt;unset token="Auto"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="auto"&amp;gt;
          &amp;lt;set token="Auto"&amp;gt;"Auto"&amp;lt;/set&amp;gt;
          &amp;lt;unset token="Work"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="server"&amp;gt;
          &amp;lt;set token="Server"&amp;gt;"Server"&amp;lt;/set&amp;gt;
          &amp;lt;unset token="Work"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;unset token="Auto"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="text" token="src_name" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;src_name&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;row&amp;gt;
              &amp;lt;panel&amp;gt;
&amp;lt;title&amp;gt;SOC CHECK&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| inputlookup $category$_sanity_check_kvstore
| fields src_name, soc_check
| search src_name IN ($src_name$)
| eval soc_check=if(soc_check=1,"OK","KO")
| eval range=if(value=="OK","low","severe")
| table soc_check&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0xdc4e41","0x53a051"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 07 Apr 2023 09:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639182#M221468</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-07T09:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639183#M221469</link>
      <description>&lt;P&gt;What has this to do with your original question?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 09:12:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639183#M221469</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-04-07T09:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639186#M221472</link>
      <description>&lt;P&gt;In the above query, I added eval range command, since i didn't get the expected one,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same, If the soc_check is "OK", the result should be in green colour, if the soc_check is "KO", the result should be in red colour&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 09:22:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639186#M221472</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-07T09:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639359#M221525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;If the soc_check is "OK", the result should be in green color, if the soc_check is "KO", the result should be in red color, with the above query&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 11:20:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639359#M221525</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-10T11:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639360#M221526</link>
      <description>&lt;P&gt;Given that you didn't originally give much information, I would have expected you to adapt any solution given to your specific circumstances.&lt;/P&gt;&lt;P&gt;Try changing&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval range=if(value=="OK","low","severe")&lt;/LI-CODE&gt;&lt;P&gt;to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval range=if(soc_check=="OK","low","severe")&lt;/LI-CODE&gt;&lt;P&gt;since this is the field you appear to be using&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 11:26:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639360#M221526</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-04-10T11:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639361#M221527</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The query is working but the color is still not changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 11:32:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639361#M221527</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-10T11:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639595#M221629</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Can you help me in this?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 06:17:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639595#M221629</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-12T06:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639600#M221632</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236500"&gt;@smanojkumar&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Are you fetching the range field in table output fields?&lt;BR /&gt;If not, give both soc_check and range fields in table command.&lt;BR /&gt;&lt;BR /&gt;If this helps, karma would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manasa&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 08:23:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639600#M221632</guid>
      <dc:creator>Manasa_401</dc:creator>
      <dc:date>2023-04-12T08:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639603#M221635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251844"&gt;@Manasa_401&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Even after adding range field in table command, i cant see the color change,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to check the soc_check field value color based on its values&lt;BR /&gt;&lt;BR /&gt;OK- green&lt;/P&gt;&lt;P&gt;KO-Red&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 08:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639603#M221635</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-12T08:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639608#M221640</link>
      <description>&lt;P&gt;Try again by disabling the usecolors option&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 09:27:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639608#M221640</guid>
      <dc:creator>Manasa_401</dc:creator>
      <dc:date>2023-04-12T09:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: choose color based on text value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639621#M221648</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251844"&gt;@Manasa_401&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Still, I didn't get the expected after removing the command.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 10:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-choose-color-based-on-text-value/m-p/639621#M221648</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2023-04-12T10:24:11Z</dc:date>
    </item>
  </channel>
</rss>

