<?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 to give Line break in eval and display the same in single value chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/558079#M158507</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; It worked like a charm, Thanks a lot for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 01:01:18 GMT</pubDate>
    <dc:creator>ashutoshwalke</dc:creator>
    <dc:date>2021-07-02T01:01:18Z</dc:date>
    <item>
      <title>How to give Line break in eval and display the same in single value chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557724#M158404</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to display some data in field "result" for me in a single value chart using below query, and color/severity rule is based on keywords instead of numbers. i.e.&amp;nbsp; OK = GREEN and NOTOK = RED&lt;/P&gt;&lt;P&gt;Below code works for me but the only issue is I am unable to break the line in the chart.&lt;/P&gt;&lt;P&gt;I want it as OK/NOTOK on the top and then the EndTime or anything that I may concatenate further below the result field.&lt;/P&gt;&lt;P&gt;Example,&lt;/P&gt;&lt;P&gt;============================================&lt;/P&gt;&lt;P&gt;result as "OK/NOTOK"&lt;/P&gt;&lt;P&gt;EndTime&lt;/P&gt;&lt;P&gt;============================================&lt;/P&gt;&lt;P&gt;I have tried using regex/sed or actually using (shift + enter) in my splunk query and it does works but in search only not in the dashboard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;============================================&lt;/P&gt;&lt;P&gt;index=xyz | eval SLA=9.0&lt;BR /&gt;| eval Date=strftime(_time, "%m-%d-%y")&lt;BR /&gt;| eval EndTime=strftime(_time, "%H.%M")&lt;BR /&gt;| eval result=if(EndTime&amp;lt;SLA, "OK"."&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;\n&lt;/STRONG&gt;&lt;/FONT&gt;".EndTime, "NOTOK")&lt;BR /&gt;| table result EndTime&lt;BR /&gt;| eval severity=case(result="OK"." ".EndTime, 0, result="NOTOK", 1)&lt;BR /&gt;| rangemap field=severity low=0-0 default=severe&lt;/P&gt;&lt;P&gt;============================================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please advise ?&lt;/P&gt;&lt;P&gt;I had seen few posts that this could be achieved using some CSS/JS scripts but I do not have much knowledge on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/59"&gt;@Ayn&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Re&lt;SPAN&gt;gards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 01:13:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557724#M158404</guid>
      <dc:creator>ashutoshwalke</dc:creator>
      <dc:date>2021-06-30T01:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to give Line break in eval and display the same in single value chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557743#M158410</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233157"&gt;@ashutoshwalke&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure \n work but you can split value to make it same.&amp;nbsp;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval result="OK"."\n"."EndTime"| eval result = split(result,"\n")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KV&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 05:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557743#M158410</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-30T05:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to give Line break in eval and display the same in single value chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557865#M158435</link>
      <description>Hello Kamlesh, Thank you for your response. The query you have provided does work when run in splunk search but not when used in dashboard to display this data in single value chart. Also, not sure why is it showing an comma now in the chart with you query. RESULT (I got with your query in single value chart) ======================================= OK,EndTime Please advise.</description>
      <pubDate>Wed, 30 Jun 2021 16:47:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557865#M158435</guid>
      <dc:creator>ashutoshwalke</dc:creator>
      <dc:date>2021-06-30T16:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to give Line break in eval and display the same in single value chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557930#M158463</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; Please advise ?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 00:53:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557930#M158463</guid>
      <dc:creator>ashutoshwalke</dc:creator>
      <dc:date>2021-07-01T00:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to give Line break in eval and display the same in single value chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557972#M158467</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233157"&gt;@ashutoshwalke&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Singlevalue combine both again with comma separate. Here I suggest you go with below XML and try it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Single View Double Value&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults | eval result="OK", result1="EndTime" | table result result1&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;done&amp;gt;
            &amp;lt;set token="underlabel"&amp;gt;$result.result1$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="underLabel"&amp;gt;$underlabel$&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-07-01 at 10.58.39 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14908i4003BAFA72D274E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-07-01 at 10.58.39 AM.png" alt="Screenshot 2021-07-01 at 10.58.39 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 05:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/557972#M158467</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-01T05:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to give Line break in eval and display the same in single value chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/558079#M158507</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; It worked like a charm, Thanks a lot for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 01:01:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-give-Line-break-in-eval-and-display-the-same-in-single/m-p/558079#M158507</guid>
      <dc:creator>ashutoshwalke</dc:creator>
      <dc:date>2021-07-02T01:01:18Z</dc:date>
    </item>
  </channel>
</rss>

