<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Receiving json-data over http-service]]></title><description><![CDATA[<p dir="auto">Hi together,</p>
<p dir="auto">I need some help with this data:</p>
<p dir="auto"><img src="https://camo.nodebb.org/edd6aea16a393db06e3cb9c8db33eb0e6ec23dd2?url=https%3A%2F%2Fi.imgur.com%2FZe2W1Ce.png" alt="0_1470847376624_json-source.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">That data comes from a software logger over http-service in json-fomat. I need the two parameters under "tuples": [(timestamp, value)]. Some suggestions? I was trying out some variants of data sources, but it didn´t worked.</p>
<p dir="auto">Regards<br />
Sasa</p>
]]></description><link>https://forum.mango-os.com/topic/2408/receiving-json-data-over-http-service</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 13:12:50 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2408.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Aug 2016 16:45:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Receiving json-data over http-service on Thu, 11 Aug 2016 16:39:53 GMT]]></title><description><![CDATA[<p dir="auto">Terry,</p>
<p dir="auto">thank you for your help. I used the type "HTTP Retriever" where it is possible to create points by choosing the groups of the matched regular expression (now I understand the functionallity ;-)). I had to change the expression a little bit. Here is the working implementation as example for others and documentation.</p>
<p dir="auto"><strong>Regular Expression</strong></p>
<pre><code>.*"tuples": \[ \[ ([0-9]+), ([0-9]+\.[0-9]+).\] \] \} \] \}
</code></pre>
<p dir="auto"><strong>Target string:</strong></p>
<pre><code>{ "version": "0.5.1", "generator": "vzlogger", "data": [ { "uuid": "123", "last": 1470924327196, "interval": 5, "protocol": "d0", "tuples": [ [ 1470924327195, 115.185 ] ] } ] }
</code></pre>
<p dir="auto"><strong>Matcher</strong></p>
<pre><code>group(0)	{ "version": "0.5.1", "generator": "vzlogger", "data": [ { "uuid": "123", "last": 1470924327196, "interval": 5, "protocol": "d0", "tuples": [ [ 1470924327195, 115.185 ] ] } ] }
</code></pre>
<pre><code>group(1)	1470924327195
</code></pre>
<pre><code>group(2)	115.185
</code></pre>
<p dir="auto">Configuration in Mango for choosing the value group 2 (115.185)</p>
<p dir="auto"><img src="https://camo.nodebb.org/76d6a3ae447b23bb9a40fe9a83ecf2ce3cf11130?url=https%3A%2F%2Fi.imgur.com%2FzK1v01c.png" alt="0_1470933096792_http-retriever-point.PNG" class=" img-fluid img-markdown" /><br />
.</p>
<p dir="auto"><strong>Value in the watchlist</strong></p>
<p dir="auto"><img src="https://camo.nodebb.org/10992fab94cc992a25334ef7ed77e191478993a1?url=https%3A%2F%2Fi.imgur.com%2FjEFUwjO.png" alt="0_1470933232504_watchlist.PNG" class=" img-fluid img-markdown" /></p>
<h2>.</h2>
<p dir="auto">Thank you very much!<br />
Sasa</p>
]]></description><link>https://forum.mango-os.com/post/12399</link><guid isPermaLink="true">https://forum.mango-os.com/post/12399</guid><dc:creator><![CDATA[sasa]]></dc:creator><pubDate>Thu, 11 Aug 2016 16:39:53 GMT</pubDate></item><item><title><![CDATA[Reply to Receiving json-data over http-service on Wed, 10 Aug 2016 23:41:49 GMT]]></title><description><![CDATA[<p dir="auto">sasa,</p>
<p dir="auto">I would suggest using the HTTP Retriever data source and setting up data points with the appropriate regex patterns to extract the values for the points.  Basically point the HTTP Retriever at the URL you need and then setup 2 Numeric points with regex setup to extract each of the values from "tuples".</p>
<p dir="auto">Here is some regex that sort of works for a simple test but you may need to tweak it a little:</p>
<pre><code>.*"tuples": \[ \{ ([0-9]+), ([0-9]+).*}.*
</code></pre>
<p dir="auto">You can test your regex here or any of the many sites that allow testing regex patterns:<br />
<a href="http://regex-testdrive.com/" rel="nofollow ugc">http://regex-testdrive.com/</a></p>
]]></description><link>https://forum.mango-os.com/post/12395</link><guid isPermaLink="true">https://forum.mango-os.com/post/12395</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Wed, 10 Aug 2016 23:41:49 GMT</pubDate></item></channel></rss>