<?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 do a line breaking after a string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407134#M170906</link>
    <description>&lt;P&gt;Can you tell what value you are getting for &lt;CODE&gt;Per&lt;/CODE&gt; at the end of eval.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2019 03:38:10 GMT</pubDate>
    <dc:creator>harshpatel</dc:creator>
    <dc:date>2019-06-05T03:38:10Z</dc:date>
    <item>
      <title>how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407126#M170898</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7164i287E574BD9E16846/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;hello&lt;/P&gt;

&lt;P&gt;I need to do a line breaking after "%" and after  " on a total of " &lt;BR /&gt;
| eval Perc=round((NbTOUCHNGOCrashByHost/NbIndHost)*100,1). " %"  + " on a total of " + NbIndHost + " machines "&lt;/P&gt;

&lt;P&gt;could tyou help me please?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 11:52:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407126#M170898</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-04T11:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407127#M170899</link>
      <description>&lt;P&gt;When you say line breaking, do you mean in context of event breaking in props.conf?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 12:09:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407127#M170899</guid>
      <dc:creator>martynoconnor</dc:creator>
      <dc:date>2019-06-04T12:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407128#M170900</link>
      <description>&lt;P&gt;Hi @jip31,&lt;/P&gt;

&lt;P&gt;You can use rex command as sed mode to add new line character at two points of your string.&lt;BR /&gt;
try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1 
| eval Perc=round((NbTOUCHNGOCrashByHost/NbIndHost)*100,1). " %" + " on a total of " + NbIndHost + " machines " 
| rex mode=sed field=Perc "s/%/%\n/g" 
| rex mode=sed field=Perc "s/on a total of/on a total of\n/g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jun 2019 12:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407128#M170900</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-06-04T12:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407129#M170901</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have changed the sentance:&lt;BR /&gt;
| eval Perc=round((NbTOUCHNGOCrashByHost/NbIndHost)*100,1). " %" + " /  " + NbIndHost + " machines "&lt;BR /&gt;
but it doesnt works &lt;/P&gt;

&lt;P&gt;| eval Perc=round((NbMESCrashByHost/NbIndHost)*100,1). " %" + " / " + NbIndHost + " machines " &lt;BR /&gt;
| rex mode=sed field=Perc "s/%/%\n/g" &lt;BR /&gt;
| table Perc&lt;/P&gt;

&lt;P&gt;an idea please???&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:13:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407129#M170901</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-04T13:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407130#M170902</link>
      <description>&lt;P&gt;Can you tell me what Splunk version you are using? Also, are you displaying this on the dashboard?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:26:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407130#M170902</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-06-04T13:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407131#M170903</link>
      <description>&lt;P&gt;7.0.1 version&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407131#M170903</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-04T13:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407132#M170904</link>
      <description>&lt;P&gt;Not at all&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 03:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407132#M170904</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-05T03:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407133#M170905</link>
      <description>&lt;P&gt;To my mind the rex command is not correct&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 03:33:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407133#M170905</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-05T03:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407134#M170906</link>
      <description>&lt;P&gt;Can you tell what value you are getting for &lt;CODE&gt;Per&lt;/CODE&gt; at the end of eval.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 03:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407134#M170906</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-06-05T03:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407135#M170907</link>
      <description>&lt;P&gt;you might want to escape the &lt;CODE&gt;\\&lt;/CODE&gt; in the sed regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex mode=sed field=Perc "s/%/%\\n/g" 
| rex mode=sed field=Perc "s/on a total of/on a total of\\n/g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 03:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407135#M170907</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-06-05T03:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407136#M170908</link>
      <description>&lt;P&gt;it actually works both ways, with or without escaping:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval foo=" need to do a line breaking after % and after \" on a total of \" " 
| rex mode=sed field=foo "s/%/&amp;amp;\n/g" 
| rex mode=sed field=foo "s/on a total of /&amp;amp;\\n/g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 03:49:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407136#M170908</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-06-05T03:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407137#M170909</link>
      <description>&lt;P&gt;like i said earlier I have changed the sentance&lt;BR /&gt;
now I use it :&lt;BR /&gt;
| eval Perc=round((NbMESCrashByHost/NbIndHost)*100,1). " %" + " / " + NbIndHost + " machines " &lt;/P&gt;

&lt;P&gt;but when I m doing  | rex mode=sed field=Perc "s/%/%\n/g"  there is always no breakdown...&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 07:11:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407137#M170909</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-05T07:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407138#M170910</link>
      <description>&lt;P&gt;Works fine for me (using exactly the code you posted here): &lt;A href="https://imgur.com/VV4Hd2A"&gt;https://imgur.com/VV4Hd2A&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please share a screenshot of your situation.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 08:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407138#M170910</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-05T08:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407139#M170911</link>
      <description>&lt;P&gt;done&lt;BR /&gt;
I need / 40 machines under the percentage&lt;BR /&gt;
I join also the xml piece :&lt;BR /&gt;
              &lt;QUERY&gt;[| inputlookup host.csv &lt;BR /&gt;
        | table host] index="x" sourcetype="PerfmonMk:Process" process_name=chrome ("%_Processor_Time"=0) &lt;BR /&gt;
    | dedup host &lt;BR /&gt;
    | lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE &lt;BR /&gt;
    | stats count as NbMESCrashByHost by host SITE &lt;BR /&gt;
    | search SITE=$tok_filtersite$ &lt;BR /&gt;
    | appendcols &lt;BR /&gt;
        [| inputlookup host.csv &lt;BR /&gt;
        | stats count as NbIndHost] &lt;BR /&gt;
    | eval Perc=round((NbMESCrashByHost/NbIndHost)*100,1). " %" + " / " + NbIndHost + " machines " &lt;BR /&gt;
     | rex mode=sed field=Perc "s/%/%\n/g" &lt;BR /&gt;
    | table Perc&lt;/QUERY&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407139#M170911</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-09-30T00:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407140#M170912</link>
      <description>&lt;P&gt;Right, so the issue is in displaying it as a single value. Apparently that viz does not support multiple lines. I indeed get the same result. I'm afraid what you want is not possible then. (or at least not with pure simple xml dashboard functionality).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 11:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407140#M170912</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-05T11:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to do a line breaking after a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407141#M170913</link>
      <description>&lt;P&gt;Grrrrrrrrrrrrrr&lt;BR /&gt;
ok fraanck thanks although&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 14:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-do-a-line-breaking-after-a-string/m-p/407141#M170913</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-05T14:39:07Z</dc:date>
    </item>
  </channel>
</rss>

