<?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: Modify the format of events in splunk UI in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273107#M176306</link>
    <description>&lt;P&gt;Hi @lukejadamec ,&lt;/P&gt;

&lt;P&gt;Thankyou so much for your time and efforts for helping me with this problem.&lt;BR /&gt;
The Splunk support advised us to use search-time rather than index-time which would affect splunk performance although I'm not aware of the problems caused by index-time extractions.&lt;BR /&gt;
It would be great if you could help me for a solution on this..&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2016 06:32:39 GMT</pubDate>
    <dc:creator>sarnagar</dc:creator>
    <dc:date>2016-11-04T06:32:39Z</dc:date>
    <item>
      <title>Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273099#M176298</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;
I have JSON Logs like below:&lt;/P&gt;

&lt;P&gt;SAMPLE EVENT:&lt;/P&gt;

&lt;P&gt;"line":" 2016-10-21 19:16:00 INFO [CollectorAccess] Updating peer collector list: [172.17.0.6:9998, 172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.8.9of6d5ylz2g8yc22wioksjhek.ingress:9998|10.255.0.13:9998|10.255.0.15:9998, 10.255.0.20:9998|172.18.0.4:9998|dynatrace_collector_dev-wlp_wlp.5.04w8s09obp9pwe2mu1s9elq7i.ingress:9998|10.255.0.13:9998, 172.17.0.9:9998, 172.17.0.3:9998, 172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.1.0bs4sokp2fpkkz0nfh4mo4xsc.ingress:9998|10.255.0.13:9998|10.255.0.16:9998, 172.17.0.8:9998, dynatrace_collector_dev-wlp_wlp.7.3hvzd4e5b5zdby4blgu1v8rm8.ingress:9998|172.18.0.4:9998|10.255.0.13:9998|10.255.0.22:9998, dynatrace_collector_dev-wlp_wlp.6.5huzo8ot2fnzavm9ji5it4p9d.ingress:9998|172.18.0.4:9998|10.255.0.13:9998|10.255.0.21:9998, 172.17.0.5:9998, 172.17.0.7:9998, 172.18.0.3:9998|10.255.0.13:9998|10.255.0.17:9998|dynatrace_collector_dev-wlp_wlp.2.5a4bbjtne3hxm3i3f0a0xj7lv.ingress:9998, 10.255.0.18:9998|172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.3.4tr7zjjhgqqtn0fh9hd0l7qoo.ingress:9998|10.255.0.13:9998, 172.17.0.4:9998, 10.255.0.19:9998|172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.4.ep9fshp8i94rdz7p7cpwi9v77.ingress:9998|10.255.0.13:9998",&lt;BR /&gt;
   &lt;EM&gt;"source":" stdout",&lt;BR /&gt;
   "tag":" itec-artifactory.hec.com:6555/com.hec.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11/Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8/5125046f7489&lt;/EM&gt; "&lt;/P&gt;

&lt;P&gt;I WANT TO MODIFY THE LAST ITALICISED LINE IN ABOVE EVENT TO SOMETHING LIKE BELOW : ( CHANGES HIGHLIGHTED AS BOLD)&lt;BR /&gt;
&lt;STRONG&gt;source&lt;/STRONG&gt;=stdout,&lt;BR /&gt;
&lt;STRONG&gt;container-image&lt;/STRONG&gt;=itec-artifactory.hec.com:6555/com.hec.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11,&lt;STRONG&gt;container-service&lt;/STRONG&gt;=Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8,&lt;STRONG&gt;container-id&lt;/STRONG&gt;=5125046f7489&lt;/P&gt;

&lt;P&gt;Basically I want to create field value pairs from the events and also modify its appearance in the UI.&lt;/P&gt;

&lt;P&gt;How can I achieve this??&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:33:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273099#M176298</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2020-09-29T11:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273100#M176299</link>
      <description>&lt;P&gt;Can you post your current inputs, props, and transforms configs for this input?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2016 13:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273100#M176299</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-10-29T13:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273101#M176300</link>
      <description>&lt;P&gt;Give this a try.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex mode=sed "s/\"tag\":\s\"([^\/]+\/[^\/]+)\/([^\/]+)\/([^\"]+)/\"container-image\":\"\1\",\"container-service\":\"\2\",\"container-id\":\"\3/" | spath
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The regex was created assuming your raw event, in text format looks like this. You might have to adjust the regex if there is a diff&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{  
"line": "2016-10-21 19:16:00 INFO [CollectorAccess] Updating peer collector", "list": "[172.17.0.6:9998, 172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.8.9of6d5ylz2g8yc22wioksjhek.ingress:9998|10.255.0.13:9998|10.255.0.15:9998, 10.255.0.20:9998|172.18.0.4:9998|dynatrace_collector_dev-wlp_wlp.5.04w8s09obp9pwe2mu1s9elq7i.ingress:9998|10.255.0.13:9998, 172.17.0.9:9998, 172.17.0.3:9998, 172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.1.0bs4sokp2fpkkz0nfh4mo4xsc.ingress:9998|10.255.0.13:9998|10.255.0.16:9998, 172.17.0.8:9998, dynatrace_collector_dev-wlp_wlp.7.3hvzd4e5b5zdby4blgu1v8rm8.ingress:9998|172.18.0.4:9998|10.255.0.13:9998|10.255.0.22:9998, dynatrace_collector_dev-wlp_wlp.6.5huzo8ot2fnzavm9ji5it4p9d.ingress:9998|172.18.0.4:9998|10.255.0.13:9998|10.255.0.21:9998, 172.17.0.5:9998, 172.17.0.7:9998, 172.18.0.3:9998|10.255.0.13:9998|10.255.0.17:9998|dynatrace_collector_dev-wlp_wlp.2.5a4bbjtne3hxm3i3f0a0xj7lv.ingress:9998, 10.255.0.18:9998|172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.3.4tr7zjjhgqqtn0fh9hd0l7qoo.ingress:9998|10.255.0.13:9998, 172.17.0.4:9998, 10.255.0.19:9998|172.18.0.3:9998|dynatrace_collector_dev-wlp_wlp.4.ep9fshp8i94rdz7p7cpwi9v77.ingress:9998|10.255.0.13:9998]", 
"source": "stdout", 
"tag": "itec-artifactory.fmr.com:6555/com.fmr.pl000123.ezpaas.ezpaas-dynatrace-collector:6.3-11/Dynatrace_Collector_DEV-WLP_WLP.7.3hvzd4e5b5zdby4blgu1v8rm8/5125046f7489" 
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Oct 2016 16:02:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273101#M176300</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-29T16:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273102#M176301</link>
      <description>&lt;P&gt;@somesoni2 how can this be adapted to happen behind the scenes?  We've already figured out how to extract the fields in configs without a special search.  How do you change the UI without a special search?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2016 20:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273102#M176301</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-10-29T20:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273103#M176302</link>
      <description>&lt;P&gt;Hi  @somesoni2 ,&lt;BR /&gt;
I want to thank you so much for your efforts and time trying to help me out with my problem.&lt;BR /&gt;
This is exactly what I was looking for.&lt;/P&gt;

&lt;P&gt;As @lukejadamec said , Is there a way to get this done via configs without running the special search everytime?&lt;/P&gt;

&lt;P&gt;Highly appreciate your help on this.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 12:59:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273103#M176302</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2016-11-02T12:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273104#M176303</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/31231"&gt;@lukejadamec&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;I tried these two configs and none worked.&lt;/P&gt;

&lt;P&gt;PROPS&lt;/P&gt;

&lt;P&gt;[ _json ]&lt;BR /&gt;
CHARSET=UTF-8&lt;/P&gt;

&lt;H1&gt;INDEXED_EXTRACTIONS=json&lt;/H1&gt;

&lt;P&gt;KV_MODE=json&lt;BR /&gt;
SHOULD_LINEMERGE=true&lt;BR /&gt;
category=Structured&lt;BR /&gt;
disabled=false&lt;BR /&gt;
pulldown_type=true&lt;BR /&gt;
TIMESTAMP_FIELDS=line&lt;BR /&gt;
EXTRACT-fields = (\"source\":\")(?\w+)\",\"tag\":\"(?.&lt;STRONG&gt;\/{1}.&lt;/STRONG&gt;)\/(?.&lt;STRONG&gt;)\/(?.&lt;/STRONG&gt;)\"&lt;/P&gt;

&lt;P&gt;2.&lt;/P&gt;

&lt;P&gt;PROPS&lt;/P&gt;

&lt;P&gt;[ _json ]&lt;BR /&gt;
CHARSET=UTF-8&lt;/P&gt;

&lt;H1&gt;INDEXED_EXTRACTIONS=json&lt;/H1&gt;

&lt;P&gt;KV_MODE=json&lt;BR /&gt;
SHOULD_LINEMERGE=true&lt;BR /&gt;
category=Structured&lt;BR /&gt;
disabled=false&lt;BR /&gt;
pulldown_type=true&lt;BR /&gt;
TIMESTAMP_FIELDS=line&lt;BR /&gt;
REPORT-transform = fields&lt;/P&gt;

&lt;P&gt;TRANSFORMS&lt;/P&gt;

&lt;P&gt;[fields]&lt;BR /&gt;
REGEX = (\"source\":\")(?\w+)\",\"tag\":\"(?.&lt;STRONG&gt;\/{1}.&lt;/STRONG&gt;)\/(?.&lt;STRONG&gt;)\/(?.&lt;/STRONG&gt;)\"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:40:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273104#M176303</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2020-09-29T11:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273105#M176304</link>
      <description>&lt;P&gt;Adding the screenshot since the REGEX ain't captured correctly in comment section:&lt;BR /&gt;
&lt;IMG src="http://C:Usersa594588DesktopParseLogsregex.MHT" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 10:04:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273105#M176304</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2016-11-03T10:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273106#M176305</link>
      <description>&lt;P&gt;I'm trying some things to restructure/pull this data out at index time.  &lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 17:35:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273106#M176305</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-11-03T17:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273107#M176306</link>
      <description>&lt;P&gt;Hi @lukejadamec ,&lt;/P&gt;

&lt;P&gt;Thankyou so much for your time and efforts for helping me with this problem.&lt;BR /&gt;
The Splunk support advised us to use search-time rather than index-time which would affect splunk performance although I'm not aware of the problems caused by index-time extractions.&lt;BR /&gt;
It would be great if you could help me for a solution on this..&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 06:32:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273107#M176306</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2016-11-04T06:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273108#M176307</link>
      <description>&lt;P&gt;I have created a SEDCMD string that when added to props.conf (and a restart) for the sourcetype will change all new indexed events:&lt;BR /&gt;
"source to LogSource=&lt;BR /&gt;
"tag to ContainerImage=&lt;BR /&gt;
the second / from the end to ,ContainerService=&lt;BR /&gt;
the first / from the end to ,ContainerID=&lt;/P&gt;

&lt;P&gt;It works fine on all of the example data you've posted so far.  Splunk automatically recognizes new field= names and sets the values accordingly.&lt;BR /&gt;
However, the SEDCMD literally changes the event data before it is indexed and the change is permanent (no going back without re-indexing the events).  Also, this will not affect any data that has already been indexed, so a separate search like those posted by @somesoni2 would be required for searching old data (or you could re-index the entire data set with the new config).&lt;BR /&gt;
I can post the string, but I highly recommend that you create a test index, test sourcetype, and test input to test it before you implement it in production.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 12:46:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273108#M176307</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-11-04T12:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273109#M176308</link>
      <description>&lt;P&gt;Wow..Thats great..!! Please post the configs and I will try it DEV first ..&lt;BR /&gt;
Thankyou soo much for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
1) Also after I use these configs , I will be unable to use the query that @somesoni2 provided since the events format gets changed before its indexed right??&lt;BR /&gt;
2) Infact I modified query to view it in a format I wanted. Below is my query:&lt;BR /&gt;
my base query | rex mode=sed "s/\"tag\":\"([^\/]+\/[^\/]+)\/([^\/]+)\/([^\"]+)/\n\"container-image\":\"\1\",\n\"container-service\":\"\2\",\n\"container-id\":\"\3/&lt;BR /&gt;
s/\"line\":\"/\"/&lt;BR /&gt;
s/{//&lt;BR /&gt;
s/}//&lt;BR /&gt;
s/\",\"s/\"\n\"s/"&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 14:29:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273109#M176308</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2016-11-04T14:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273110#M176309</link>
      <description>&lt;P&gt;The current query you're using will work on events before this SEDCMD implementation but not after.&lt;BR /&gt;
Good luck.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-modifySource = s/\"source\":/LogSource=/g s/\"tag\":/ContainerImage=/g s/\/(?=[^\/]+$)/,ContainerID=/1 s/\/(?=[^\/]+[^\/]+$)/,ContainerService=/1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;SEDCMD is space delimited, so you'll actually find 4 replacement commands in the string.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 15:10:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273110#M176309</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-11-04T15:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273111#M176310</link>
      <description>&lt;P&gt;I should also mention that SEDCMD cannot be used post parsing, so you can't use automated Splunk sourcetypes that include extractions, and it is almost always required that the config is on the forwarder (not the indexer).&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 15:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273111#M176310</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-11-04T15:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273112#M176311</link>
      <description>&lt;P&gt;Hi @lukejadamec @somesoni2 ,&lt;/P&gt;

&lt;P&gt;Thankyou for all your inputs and help. I really appreciate all your support and help and it was really helpfull.&lt;BR /&gt;
I used the SEDCMD and modified the format as required. But the team doesn't want to get this done during index-time due to the complications involved. Is there a possibility of getting it done during search-time??&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 14:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273112#M176311</guid>
      <dc:creator>sarnagar</dc:creator>
      <dc:date>2016-11-10T14:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modify the format of events in splunk UI</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273113#M176312</link>
      <description>&lt;P&gt;You can extract the fields so that they show up in Interesting Fields, and use those fields directly in searches, but you cannot change how they display in the UI with config changes without using SEDCMD.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 13:27:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-the-format-of-events-in-splunk-UI/m-p/273113#M176312</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-11-11T13:27:08Z</dc:date>
    </item>
  </channel>
</rss>

