<?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 do handle quotes in JSON when receiving AMQP messages in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156339#M14269</link>
    <description>&lt;P&gt;Can we get the modular input to escape properly? Then all that is needed is a kvmodr that handles escaping. &lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2015 08:31:26 GMT</pubDate>
    <dc:creator>marcusnilssonmr</dc:creator>
    <dc:date>2015-06-07T08:31:26Z</dc:date>
    <item>
      <title>How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156337#M14267</link>
      <description>&lt;P&gt;I am using Splunk AMQP Messaging Input with RabbitMQ. When posting a message with JSON content, I receive the following event in Splunk:&lt;/P&gt;

&lt;P&gt;Fri Feb 20 11:57:56 CET 2015 name="amqp_msg_received" event_id="5" msg_queue="splunk_consume" msg_exchange="x" msg_body="{"x": 5, "y": 5}"&lt;/P&gt;

&lt;P&gt;The problem is that since the json contains ", Splunk interprets msg_body as being "{", since the quotes are not escaped. What is the best way to handle this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156337#M14267</guid>
      <dc:creator>marcusnilssonmr</dc:creator>
      <dc:date>2020-09-28T19:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156338#M14268</link>
      <description>&lt;P&gt;Probably simplest to just do a custom field extraction in Splunk Web.&lt;BR /&gt;
Follow the "Extract New Fields" link.&lt;/P&gt;

&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/247i1C18230A34BFD34D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2015 20:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156338#M14268</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2015-02-20T20:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156339#M14269</link>
      <description>&lt;P&gt;Can we get the modular input to escape properly? Then all that is needed is a kvmodr that handles escaping. &lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2015 08:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156339#M14269</guid>
      <dc:creator>marcusnilssonmr</dc:creator>
      <dc:date>2015-06-07T08:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156340#M14270</link>
      <description>&lt;P&gt;So when I write Modular Inputs that can conceivably receive any type of payload once they are being used in the wild , I have to employ an architecture that &lt;A href="https://github.com/damiendallimore/SplunkModularInputsJavaFramework/blob/master/amqp/src/com/splunk/modinput/amqp/DefaultMessageHandler.java" target="_blank"&gt;ships with a default message handler&lt;/A&gt; (the format you see above) but also allows the end user to plugin their own message handler to perform whatever custom handling and output formatting of the received data that they desire.&lt;/P&gt;

&lt;P&gt;The AMQP Modular Input has such feature.&lt;/P&gt;

&lt;P&gt;So you can write your own handler and then declare this in your stanza setup.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://gist.github.com/damiendallimore/23ea57b53cf3b80cc641" target="_blank"&gt;Here is an example of some code&lt;/A&gt; that you would then compile , jar it up and dump in SPLUNK_HOME/etc/apps/amqp_ta/bin/lib&lt;/P&gt;

&lt;P&gt;Then declare the handler to be applied :&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/37949-screen+shot+2015-06-07+at+4.15.04+pm.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156340#M14270</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2020-09-28T20:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156341#M14271</link>
      <description>&lt;P&gt;The pluggable architecture make sense, thanks!. It would be very convenient though, if some more default handlers shipped with the plugin for some obvious choices, such as dumping as is (as you json handler above), and in a format compatible with KV_MODE=auto_escaped.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156341#M14271</guid>
      <dc:creator>marcusnilssonmr</dc:creator>
      <dc:date>2020-09-28T20:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156342#M14272</link>
      <description>&lt;P&gt;context.stanzaName is not accessible from classes outside of the package, otherwise it compiles fine.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2015 21:14:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156342#M14272</guid>
      <dc:creator>marcusnilssonmr</dc:creator>
      <dc:date>2015-06-15T21:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156343#M14273</link>
      <description>&lt;P&gt;Corrected the package name in the example gist.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 00:14:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156343#M14273</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2015-06-16T00:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do handle quotes in JSON when receiving AMQP messages</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156344#M14274</link>
      <description>&lt;P&gt;That is one of the core purposes as to why the code repo  is on Github , so ideally the community can collaborate and contribute handlers if they see that they are generic enough. Most handlers though will be very proprietary to people's use cases and data, so not warranted to be part of the core release of the AMQP Modular Input.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 00:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-handle-quotes-in-JSON-when-receiving-AMQP-messages/m-p/156344#M14274</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2015-06-16T00:16:50Z</dc:date>
    </item>
  </channel>
</rss>

