<?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 Custom Event Renderer in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18608#M177213</link>
    <description>&lt;P&gt;I'm trying to write a custom event renderer for an event type. I want to change the event display to a single field of the event. Basically it's working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;%def name="event_raw(job, event, request, options, xslt)"&amp;gt; 
        &amp;lt;% msg = event.fields.get('message') %&amp;gt; 
        % if msg is None: 
                &amp;lt;%parent:event_raw job="${job}", event="${event}", request="${request}", options="${options}", xslt="${xslt}" /&amp;gt;
        % else: 
                &amp;lt;pre class="event"&amp;gt;${msg}&amp;lt;/pre&amp;gt; 
        % endif 
&amp;lt;/%def&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that I'm loosing the segmentation functionality (highlighting and selection in the GUI). It seems that this is achieved with the event.raw.toXml() call. Can I do something like that with any field ?&lt;/P&gt;

&lt;P&gt;Thx for any help,
Wollinet&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2010 20:22:08 GMT</pubDate>
    <dc:creator>wollinet</dc:creator>
    <dc:date>2010-07-22T20:22:08Z</dc:date>
    <item>
      <title>Custom Event Renderer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18608#M177213</link>
      <description>&lt;P&gt;I'm trying to write a custom event renderer for an event type. I want to change the event display to a single field of the event. Basically it's working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;%def name="event_raw(job, event, request, options, xslt)"&amp;gt; 
        &amp;lt;% msg = event.fields.get('message') %&amp;gt; 
        % if msg is None: 
                &amp;lt;%parent:event_raw job="${job}", event="${event}", request="${request}", options="${options}", xslt="${xslt}" /&amp;gt;
        % else: 
                &amp;lt;pre class="event"&amp;gt;${msg}&amp;lt;/pre&amp;gt; 
        % endif 
&amp;lt;/%def&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that I'm loosing the segmentation functionality (highlighting and selection in the GUI). It seems that this is achieved with the event.raw.toXml() call. Can I do something like that with any field ?&lt;/P&gt;

&lt;P&gt;Thx for any help,
Wollinet&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2010 20:22:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18608#M177213</guid>
      <dc:creator>wollinet</dc:creator>
      <dc:date>2010-07-22T20:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Event Renderer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18609#M177214</link>
      <description>&lt;P&gt;Native segmentation is only available on the raw event text.  Fields are simple lists and are never segmented.  You can recreate segmentation logic on the value of your fields and then render them as segments by generating something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;pre class="event"&amp;gt;&amp;lt;em class="t"&amp;gt;SOME_VALUE_HERE&amp;lt;/em&amp;gt;&amp;lt;/pre&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The UI will handle the hover and clicking.  The event fields do not have a matching .toXml() method.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 04:57:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18609#M177214</guid>
      <dc:creator>Johnvey</dc:creator>
      <dc:date>2010-10-13T04:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Event Renderer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18610#M177215</link>
      <description>&lt;P&gt;Thx fpr your answer. Support told me that, too. But unfortunately I have to handle a bunch of different event formats (some of them XML). They are all wrapped in a message which I tried to remove with this approach.&lt;/P&gt;

&lt;P&gt;But even if it would work, there are a lot more problems:&lt;BR /&gt;
- export still uses the raw format&lt;BR /&gt;
- field extraction dialog uses the raw format&lt;BR /&gt;
- and a lot more&lt;/P&gt;

&lt;P&gt;So we ended up stripping the message part from the event and put everything we need from it (basically meta data) into indexed fields.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 13:19:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-Event-Renderer/m-p/18610#M177215</guid>
      <dc:creator>wollinet</dc:creator>
      <dc:date>2010-10-13T13:19:33Z</dc:date>
    </item>
  </channel>
</rss>

