<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Time series Archives - OVHcloud Blog</title>
	<atom:link href="https://blog.ovhcloud.com/tag/time-series/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.ovhcloud.com/tag/time-series/</link>
	<description>Innovation for Freedom</description>
	<lastBuildDate>Fri, 08 Jan 2021 10:54:57 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.ovhcloud.com/wp-content/uploads/2019/07/cropped-cropped-nouveau-logo-ovh-rebranding-32x32.gif</url>
	<title>Time series Archives - OVHcloud Blog</title>
	<link>https://blog.ovhcloud.com/tag/time-series/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Erlenmeyer and PromQL compatibility</title>
		<link>https://blog.ovhcloud.com/erlenmeyer-and-promql-compatibility/</link>
		
		<dc:creator><![CDATA[Aurélien Hébert]]></dc:creator>
		<pubDate>Wed, 16 Dec 2020 11:03:27 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Time series]]></category>
		<guid isPermaLink="false">https://www.ovh.com/blog/?p=20123</guid>

					<description><![CDATA[Today in the monitoring world, we see the rise of the Prometheus tool. It&#8217;s a great tool to deploy in your infrastructure, as it allows you to scrap all of your servers or applications to retrieve, store and analyze the metrics. And all you have to do is to extract and run it, it does [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Ferlenmeyer-and-promql-compatibility%2F&amp;action_name=Erlenmeyer%20and%20PromQL%20compatibility&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>Today in the monitoring world, we see the rise of the <a href="https://prometheus.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Prometheus</a> tool. It&#8217;s a great tool to deploy in your infrastructure, as it allows you to scrap all of your servers or applications to retrieve, store and analyze the metrics. And all you have to do is to extract and run it, it does all the work by itself. Of course, Prometheus comes with some trade-offs (pull, how to handle late ingestion), and some limits, as you have your data only for a couple of days.</p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" src="https://www.ovh.com/blog/wp-content/uploads/2020/12/IMG_0404-1024x537.png" alt="Erlenmeyer and PromQL compatibility" class="wp-image-20266" width="512" height="269" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/12/IMG_0404-1024x537.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/12/IMG_0404-300x157.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/12/IMG_0404-768x403.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/12/IMG_0404.png 1200w" sizes="(max-width: 512px) 100vw, 512px" /></figure></div>



<h2 class="wp-block-heading">Context</h2>



<p>How is it possible to handle Prometheus long-time storage? A vast amount of Time Series DataBase are now fully compatible with Prometheus. It&#8217;s easy to check that Prometheus ingest is working well, however, how can we validate the PromQL &#8211; or Prometheus queries &#8211; part? A few months ago, <a href="https://promlabs.com/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">PromLab</a> released a new tool called &#8220;<a href="https://github.com/promlabs/promql-compliance-tester" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">PromQL compliance tester</a>&#8220;. They recently created <a href="https://promlabs.com/promql-compliance-tests" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">this page</a> where they reference the result of several products PromQL compliance tests. On this blog post, we will see how this tool helps us improve our PromQL implementation. </p>



<h3 class="wp-block-heading">Compliance tester</h3>



<p>The <a href="https://github.com/promlabs/promql-compliance-tester" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">PromQL compliance tester</a> is open source and contains a full set of tests. When using this tool, it generates for you around 500 PromQL queries covering the vast majority of the language. It includes tests on simple scalar, selectors, time range functions, operators, and so on. This tool will execute a request on both a Prometheus instance and the tested backend. It will then expect you to get the same result as PromQL output. It expects an exact match for all metadata of a series (tags and names). It&#8217;s more flexible for the ticks as you can set a parameter to round your check at the milliseconds. Finally, the compliance tool checks the equality of both query values, as many things can impact the floating predictability, it computes an approximated equality. </p>



<h3 class="wp-block-heading">Erlenmeyer</h3>



<p>At Metrics, we used a <a href="https://warp10.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10</a> TSDB with it&#8217;s own analytical query engine <a href="https://warp10.io/content/03_Documentation/04_WarpScript" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">WarpScript</a>. We decided to build an open source tool to transpile PromQL queries into WarpScript called <a href="https://github.com/ovh/erlenmeyer" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Erlenmeyer</a>. This compliance tester was a great help to validate some of our implementation and to detect which query were not fully ISO.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="573" height="295" src="https://www.ovh.com/blog/wp-content/uploads/2020/12/IMG_0406.png" alt="Erlenmeyer and PromQL compatibility" class="wp-image-20265" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/12/IMG_0406.png 573w, https://blog.ovhcloud.com/wp-content/uploads/2020/12/IMG_0406-300x154.png 300w" sizes="(max-width: 573px) 100vw, 573px" /></figure></div>



<h3 class="wp-block-heading">Set up</h3>



<p>To start testing our PromQL experience, we set up a local Prometheus with a default configuration. This configuration makes Prometheus run and collect some &#8220;Demo&#8221; Metrics, then we forwarded all of them to one of our Metrics regions using Prometheus remote write. We added a local instance of Erlenmeyer to query the data stored in a distributed Warp10 backend. Then, we iterated on each set of tests of the PromLab compliance tool to identify all issues and improved our existing PromQL implementation. </p>



<p>To be compliant, we had to reduce the precision for the value of the compliance tool. We set the precision to <code>0.001</code> instead of <code>0.00001</code>. We also had to remove the Warp10 <code>.app</code> label from the result. As on Warp10 instance, we identify users based on this <code>.app</code> label.</p>



<h3 class="wp-block-heading">A test query</h3>



<p>When running the test, you will get a full report of your failing queries. Let&#8217;s take an example:</p>



<pre class="wp-block-code"><code class="">RESULT: FAILED: Query returned different results:
  model.Matrix{
  	&amp;{
  		Metric: Inverse(DropResultLabels, s`{instance="demo.promlabs.com:10002", job="demo"}`),
  		Values: []model.SamplePair{
  			... // 52 identical elements
  			{Timestamp: s"1606323726.058", Value: Inverse(TranslateFloat64, float64(2.6928936527e+10))},
  			{Timestamp: s"1606323736.058", Value: Inverse(TranslateFloat64, float64(2.691644054725e+10))},
  			{
  				Timestamp: s"1606323746.058",
- 				Value:     Inverse(TranslateFloat64, float64(2.6922272529119648e+10)),
+ 				Value:     Inverse(TranslateFloat64, float64(2.689432207325e+10)),
  			},
  			{Timestamp: s"1606323756.058", Value: Inverse(TranslateFloat64, float64(2.6915188293125e+10))},
  			{Timestamp: s"1606323766.058", Value: Inverse(TranslateFloat64, float64(2.69215848005e+10))},
  			... // 4 identical elements
  		},
  	},
  }</code></pre>



<p>The test reports includes all errors occurring during the test. In this example, we can see, that for a single series we have 56 correct values. However one is invalid, we see it on two lines. The first one is the one starting by &#8220;-&#8220;. This stands for the expected value. And the second one starting by a &#8220;+&#8221; corresponds to the tested instance value. In this case, the value isn&#8217;t precise enough (2.68 instead of 2.69).</p>



<h2 class="wp-block-heading">Results</h2>



<p>Now that we have a full test set-up running, we can see what we improved from its results. If you want to access the full detailed fixes, you can check the code update made <code><a href="https://github.com/ovh/erlenmeyer/pull/48" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">here</a></code>. This tool helped us to fix some implementation, sanitize known issues, to know what PromQL features we missed, and detect a few new bugs! Let&#8217;s review the change.</p>



<h3 class="wp-block-heading">Quick implementation fixes</h3>



<p>Running those test was a great help for us to understand some of implementations errors we had when trying to match PromQL behavior. For example, the time range function was sampling before computing the operation. Reversing those steps provided us a direct match with a native query. It also helped us also fix some minor bugs on how to handle the comparison operators or multiple functions as label_replace, holt_winters, predict_linear or the full set of time functions (hour, minute, month&#8230;). </p>



<p>We improved also our handling of PromQL operator aggregators : by and without. </p>



<h3 class="wp-block-heading">Sanitize known issues</h3>



<p>We discovered recently, that we were not matching PromQL behavior on the series name. As a result we were keeping the name for all compute operations. Prometheus has, however, a different approach as the name is only kept when it&#8217;s relevant. The compliance tester helps us on how to validate this specific update for all queries. </p>



<p>With this tool, we test the validity of a query compared to a native PromQL query, it helps us to sanitize our query output. We knew that, in case of missing values or empty series, we were not ISO compliant. We have corrected the part of the Erlenmeyer software handling the output to match all PromQL cases included in the tests.</p>



<h3 class="wp-block-heading">Unimplemented features</h3>



<p>Running the test, lead us to discover that we missed some PromQL native features. As a matter of fact, Erlenmeyer now supports the PromQL unary or the &#8220;bool&#8221; keywords. The support of unary allows the use of &#8220;-my_series&#8221; for example. In PromQL, the bool keywords convert the result to booleans. It returns as series values 1 or 0 depending on the condition, where 1 stands for true and zero for false.</p>



<h3 class="wp-block-heading">Open issues</h3>



<p>Running all compliance tests and improving our code base lead to us to around 91% of success. For the rest, we open <a href="https://github.com/ovh/erlenmeyer/issues" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">new issues</a> on Erlenmeyer, we detected that: </p>



<ul class="wp-block-list"><li>the handling of the over_time function is not correct when the range is below the data point frequency,</li><li>rate, delta, increase and predict_linear, our result isn&#8217;t precise enough to match PromQL output when then the range is below 5 minutes,</li><li>some minor bugs on series selector (!=), or on the label_replace (some checks are missing on parameters validators),</li><li>the PromQL subqueries, as well as, some functions are not implemented: ^ and % on two series set and the deriv function.</li></ul>



<p>Those are the 4 missing points to cover the full PromQL feature set with Erlenmeyer. Our <a href="https://github.com/ovh/erlenmeyer/blob/master/doc/promql.md" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">documentation</a> already contained all the missing implementations. </p>



<h2 class="wp-block-heading">Actions</h2>



<p>This tool was a great help to improve our PromQL compliance and we are happy with our compliance result. Indeed we reach 91% with the provided test result:  </p>



<pre class="wp-block-code"><code class="">General query tweaks:
*  Metrics test
================================================================================
Total: 496 / 541 (91.68%) passed</code></pre>



<p>Our next action, is to release those fixes and improvements on all our Metrics regions. Looking forward to see what you think about our PromQL implementation! </p>



<p>We now see a lot of projects are implementing Prometheus writes and reads. These projects bring Prometheus a lot of missing features like long-term storage, delete, late ingestion, historical data analysis, HA&#8230; Being able to validate PromQL implementation is a big challenge, and is a great help in choosing the right backend according to the need. </p>
<img decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Ferlenmeyer-and-promql-compatibility%2F&amp;action_name=Erlenmeyer%20and%20PromQL%20compatibility&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Open Source Metrics family welcomes Catalyst and Erlenmeyer</title>
		<link>https://blog.ovhcloud.com/the-open-source-metrics-family-welcomes-catalyst-and-erlenmeyer/</link>
		
		<dc:creator><![CDATA[Aurélien Hébert]]></dc:creator>
		<pubDate>Fri, 20 Mar 2020 09:43:32 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Time series]]></category>
		<guid isPermaLink="false">https://www.ovh.com/blog/?p=16747</guid>

					<description><![CDATA[At OVHcloud Metrics, we love open source! Our goal is to provide all of our users with a full experience. We rely on the Warp10 time series database which enables us to build open source tools for our users benefit. Let&#8217;s take a look at some in this blogpost. Storage tool Our Infrastructure is based [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fthe-open-source-metrics-family-welcomes-catalyst-and-erlenmeyer%2F&amp;action_name=The%20Open%20Source%20Metrics%20family%20welcomes%20Catalyst%20and%20Erlenmeyer&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>At <strong>OVHcloud Metrics</strong>, we love open source! Our goal is to provide all of our users with a <strong>full experience</strong>. We rely on the<strong> <a href="https://warp10.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10</a></strong> time series database which enables us to build <strong>open source tools</strong> for our users benefit. Let&#8217;s take a look at some in this blogpost. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="537" src="https://www.ovh.com/blog/wp-content/uploads/2020/03/00FFA362-5C7E-41CC-9CFA-E4046F632282-1024x537.png" alt="" class="wp-image-17633" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/03/00FFA362-5C7E-41CC-9CFA-E4046F632282-1024x537.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/00FFA362-5C7E-41CC-9CFA-E4046F632282-300x157.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/00FFA362-5C7E-41CC-9CFA-E4046F632282-768x403.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/00FFA362-5C7E-41CC-9CFA-E4046F632282.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<h3 class="wp-block-heading">Storage tool</h3>



<p>Our Infrastructure is based on the <strong>open source time series database: <a href="https://warp10.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10</a></strong>. This database includes two versions: a stand-alone one and a <strong>distributed one</strong>. The distributed one relies on distributed tools such as <strong>Apache Kafka, Apache Hadoop</strong> and <strong>Apache HBase</strong>. </p>



<p>Unsurprisingly, our team makes its own <strong>contributions to the <a href="https://github.com/senx/warp10-platform" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10</a></strong> platform. Due to our unique requirements, we even <strong>contribute</strong> to the <a href="https://www.ovh.com/blog/contributing-to-apache-hbase-custom-data-balancing/" data-wpel-link="exclude">underlying open source database <strong>HBase</strong></a>! </p>



<h3 class="wp-block-heading">Metrics data ingest</h3>



<p>As a matter of fact, we were the first to get stuck in on the <strong>ingest process</strong>! We often build adapted tools to collect and push <strong>monitoring</strong> <strong>data</strong> on Warp10 &#8211; this is how <a href="https://github.com/ovh/noderig" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer"><strong>noderig</strong></a> came to life. Noderig is an adapted tool that is able to <strong>collect</strong> a <strong>simple core</strong> of metrics from <strong>any server or any virtual machine</strong>. It is also possible to send metrics safely to a backend. <a href="https://github.com/ovh/beamium/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer"><strong>Beamium</strong></a>, a Rust tool, is able to push the Noderig metrics to <strong>one or several Warp 10</strong> backend(s).<em> </em></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="369" src="https://www.ovh.com/blog/wp-content/uploads/2020/03/734E67C9-BC8E-4D16-93BD-077E6BF1EE4E-1024x369.png" alt="" class="wp-image-17638" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/03/734E67C9-BC8E-4D16-93BD-077E6BF1EE4E-1024x369.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/734E67C9-BC8E-4D16-93BD-077E6BF1EE4E-300x108.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/734E67C9-BC8E-4D16-93BD-077E6BF1EE4E-768x277.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/734E67C9-BC8E-4D16-93BD-077E6BF1EE4E-1536x553.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/734E67C9-BC8E-4D16-93BD-077E6BF1EE4E.png 1857w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<p><em>What if I want to collect my <strong>own custom metrics</strong>?</em> First, you&#8217;ll need to expose them following the &#8216;Prometheus model&#8217;. <a href="https://github.com/ovh/beamium/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Beamium</a> is then able to <strong>scrap</strong> applications based on their configuration file and forward all the data to the configured Warp 10 backend(s)! </p>



<p>If you are looking to monitor <strong>specific applications</strong> using the <strong><a href="https://www.influxdata.com/time-series-platform/telegraf/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Influx Telegraf</a> agent</strong> (in order to expose the Metrics you require) we have also contributed the <a href="https://github.com/influxdata/telegraf/tree/master/plugins/outputs/warp10" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10 Telegraf</a> <strong>connector</strong>, which was recently merged!</p>



<p><em>This looks great so far, but what if I usually push Graphite, Prometheus, Influx or OpenTSDB<strong> </strong>metrics; <strong>how can I simply migrate to Warp10</strong>? </em>Our answer is <strong>Catalyst</strong>: a proxy layer that is able to parse Metrics in the related formats, and convert them to Warp10 native. </p>



<h3 class="wp-block-heading">Catalyst</h3>



<p><a href="https://github.com/ovh/catalyst" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Catalyst</a> is a Go HTTP proxy used to parse multiple Open Source TimeSeries database writes. At the moment, it supports multiple Open Source TimeSeries database writes; such as OpenTSDB, PromQL, Prometheus-remote_write, Influx and Graphite. Catalyst runs a <strong>HTTP server</strong> that listens to a <strong>specific path</strong>; starting with the <strong>protocol time series name</strong> and then the <strong>native query</strong> one. For example, in order to collect influx data, you simply send a request to <code>influxdb/write</code>. Catalyst will natively parsed the <code>influx</code> data and convert it to <a href="https://warp10.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp 10</a> ingest native format.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="700" height="158" src="https://www.ovh.com/blog/wp-content/uploads/2020/03/9288E49A-F0A9-4A98-982B-9E0D4B40F7F5.png" alt="" class="wp-image-17636" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/03/9288E49A-F0A9-4A98-982B-9E0D4B40F7F5.png 700w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/9288E49A-F0A9-4A98-982B-9E0D4B40F7F5-300x68.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure></div>



<h3 class="wp-block-heading">Metrics queries</h3>



<p>Data collection is an important first step, but we have also considered how existing query Monitoring protocols could be used on top of Warp10. This has led us to implement <a href="https://github.com/ovh/tsl" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer"><strong>TSL</strong></a>. TSL was discussed at length during the <a href="https://www.meetup.com/Paris-Time-Series-Meetup/events/266610627/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Paris Time Series Meetup</a> as well as in this <a href="https://www.ovh.com/blog/tsl-a-developer-friendly-time-series-query-language-for-all-our-metrics/" data-wpel-link="exclude">blog post</a>. </p>



<p>Now let&#8217;s take a user that is using Telegraf and pushing data to Warp10 with Catalyst. They will wish to use the <strong>native Influx Grafana dashboard</strong>, but how? And what about users that <strong>automate</strong> queries with the <strong>OpenTSDB</strong> query protocol? Our answer was to develop a proxy: <strong>Erlenmeyer</strong>.</p>



<h3 class="wp-block-heading">Erlenmeyer</h3>



<p><a href="https://github.com/ovh/erlenmeyer" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer"><strong>Erlenmeyer</strong></a> is a Go HTTP proxy that enables users to query <strong>Warp 10</strong> based on <strong>Open Source</strong> query protocol. At the moment, it supports multiple Open Source TimeSeries formats; such as PromQL, Prometheus remote-read, InfluxQL, OpenTSDB or Graphite. Erlenmeyer runs a <strong>HTTP server</strong> that listens to a <strong>specific path</strong>; starting with the <strong>protocol time series name</strong> and then the <strong>native query</strong> one. For example, to run a promQL query, the user sends a request to <code>prometheus/api/v0/query</code>. Erlenmeyer will natively parsed the <code>promQL</code> request and then build a native WarpScript request that any <a href="https://warp10.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10</a> backend can support. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="687" height="228" src="https://www.ovh.com/blog/wp-content/uploads/2020/03/E25204ED-BBF9-41B5-8F96-592EF3475B8E.png" alt="" class="wp-image-17635" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/03/E25204ED-BBF9-41B5-8F96-592EF3475B8E.png 687w, https://blog.ovhcloud.com/wp-content/uploads/2020/03/E25204ED-BBF9-41B5-8F96-592EF3475B8E-300x100.png 300w" sizes="auto, (max-width: 687px) 100vw, 687px" /></figure></div>



<h2 class="wp-block-heading">To be continued</h2>



<p>At first, <strong><a href="https://github.com/ovh/erlenmeyer" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Erlenmeyer</a> and <a href="https://github.com/ovh/catalyst" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Catalyst</a></strong> represented a quick implementation of native protocols, aimed to help <strong>internal teams</strong> migrate, while still <strong>utilising a familiar tool</strong>. We have now integrated a lot of the <strong>native functionality</strong> of each protocol, and feel they are ready for sharing. It&#8217;s time to make them <strong>available to the <a href="https://warp10.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10</a> community</strong>, so we can receive <strong>feedback </strong>and continue to work hard in supporting open source protocols. You can find us in <strong>OVHcloud Metrics <a href="https://gitter.im/ovh/metrics" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">gitter room</a></strong>!</p>



<p>Other Warp10 users may require unimplemented protocol. They will be able to use <strong><a href="https://github.com/ovh/erlenmeyer" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Erlenmeyer</a> and <a href="https://github.com/ovh/catalyst" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Catalyst</a></strong> to support them on their <strong>own Warp10 backend</strong>.</p>



<p><strong>Welcome</strong> <strong><a href="https://github.com/ovh/erlenmeyer" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Erlenmeyer</a> and <a href="https://github.com/ovh/catalyst" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Catalyst</a></strong> &#8211; <strong>Metrics Open Source projects</strong>!</p>



<p></p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fthe-open-source-metrics-family-welcomes-catalyst-and-erlenmeyer%2F&amp;action_name=The%20Open%20Source%20Metrics%20family%20welcomes%20Catalyst%20and%20Erlenmeyer&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Jerem: An Agile Bot</title>
		<link>https://blog.ovhcloud.com/jerem-an-agile-bot/</link>
		
		<dc:creator><![CDATA[Aurélien Hébert]]></dc:creator>
		<pubDate>Fri, 21 Feb 2020 16:58:47 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Agile Telemetry]]></category>
		<category><![CDATA[Agility]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Observability]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Time series]]></category>
		<guid isPermaLink="false">https://www.ovh.com/blog/?p=16943</guid>

					<description><![CDATA[At OVHCloud, we are open sourcing our “Agility Telemetry” project. Jerem, as our data collector, is the main component of this project. Jerem scrapes our JIRA at regular intervals, and extracts specific metrics for each project. It then forwards them to our long-time storage application, the OVHCloud Metrics Data Platform.&#160;&#160; Agility concepts from a developer&#8217;s [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fjerem-an-agile-bot%2F&amp;action_name=Jerem%3A%20An%20Agile%20Bot&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>At OVHCloud, we are open sourcing our “Agility Telemetry” project. <strong><a href="https://github.com/ovh/jerem" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Jerem</a></strong>, as our data collector, is the main component of this project. Jerem scrapes our <strong>JIRA</strong> at regular intervals, and extracts <strong>specific metrics</strong> for each project. It then forwards them to our long-time storage application, the <strong>OVHCloud <a href="https://www.ovh.com/fr/data-platforms/metrics/" data-wpel-link="exclude">Metrics Data Platform</a></strong>.&nbsp;&nbsp;</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="537" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/1FA9BFB1-689F-4D25-A0EC-A65B99909343-1024x537.jpeg" alt="Jerem: an agile bot" class="wp-image-17160" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/1FA9BFB1-689F-4D25-A0EC-A65B99909343-1024x537.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/1FA9BFB1-689F-4D25-A0EC-A65B99909343-300x157.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/1FA9BFB1-689F-4D25-A0EC-A65B99909343-768x403.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/1FA9BFB1-689F-4D25-A0EC-A65B99909343.jpeg 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Agility concepts from a developer&#8217;s point of view</h3>



<p>To help you understand our goals for <strong>Jerem</strong>, we need to explain some Agility concepts we will be using. First, we will establish a <strong>technical quarterly roadmap</strong> for a product, which sets out all <strong>features</strong> we <strong>plan to release</strong> every three months. This is what we call an <strong>epic</strong>.&nbsp;</p>



<p>For each epic, we identify the tasks that will need to be completed. For all of those tasks, we then evaluate the complexity of tasks using <strong>story points</strong>, during a team preparation session. A story point reflects the effort required to complete the specific JIRA task. </p>



<p>Then, to advance our roadmap, we will conduct regular <strong>sprints</strong> that correspond to a period of <strong>ten days</strong>, during which the team will onboard several tasks. The amount of story points taken in a sprint should match, or be close to, the <strong>team velocity</strong>. In other words, the average number of story points that the team is able to complete each day.</p>



<p>However, other urgent tasks may arise unexpectedly during sprints. That’s what we call an <strong>impediment</strong>. We might, for example, need to factor in helping customers, bug fixes, or urgent infrastructure tasks.&nbsp;&nbsp;&nbsp;</p>



<h3 class="wp-block-heading">How Jerem works </h3>



<p>At OVH we use JIRA to track our activity. Our <strong>Jerem</strong> bot scraps our <strong>projects</strong> <strong>from</strong> <strong>JIRA</strong> and exports all necessary data to our  <strong>OVHCloud <a href="https://www.ovh.com/fr/data-platforms/metrics/" data-wpel-link="exclude">Metrics Data Platform</a></strong>. Jerem can also push data to any Warp 10 compatible database. In Grafana, you simply query the Metrics platform (using <a href="https://github.com/ovh/ovh-warp10-datasource" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Warp10 datasource</a>) with for example our <a href="https://github.com/ovh/jerem/blob/master/grafana/program_management.json" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">program management dashboard</a>. All your KPI are now available in a nice dashboard!</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="256" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/DD1C99D4-E0B6-4AEC-9BDF-9ACA09CB1D45-1024x256.jpeg" alt="" class="wp-image-17164" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/DD1C99D4-E0B6-4AEC-9BDF-9ACA09CB1D45-1024x256.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/DD1C99D4-E0B6-4AEC-9BDF-9ACA09CB1D45-300x75.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/DD1C99D4-E0B6-4AEC-9BDF-9ACA09CB1D45-768x192.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/DD1C99D4-E0B6-4AEC-9BDF-9ACA09CB1D45-1536x384.jpeg 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/DD1C99D4-E0B6-4AEC-9BDF-9ACA09CB1D45.jpeg 1720w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<h3 class="wp-block-heading">Discover Jerem metrics</h3>



<p>Now that we have an overview of the main Agility concepts involved, let&#8217;s dive into Jerem! How do we convert those Agility concepts into metrics? First of all, we&#8217;ll retrieve all metrics related to epics (i.e. new features). Then, we will have a deep look at the sprint metrics.</p>



<h4 class="wp-block-heading">Epic data</h4>



<p>To explain Jerem epic metrics, we&#8217;ll start by creating a new one. In this example, we called it <code>Agile Telemetry</code>. We add a Q2-20 label, which means that we plan to release it for Q2. To record an epic with Jerem, you need to set a quarter for the final delivery! Next, we&#8217;ll simply add four tasks, as shown below:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="651" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Epic-1-1024x651.png" alt="" class="wp-image-16984" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Epic-1-1024x651.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Epic-1-300x191.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Epic-1-768x489.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Epic-1.png 1182w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>To get the metrics, we need to evaluate each individual task. We we&#8217;ll do this together during preparation sessions. In this example, we have custom story points for each task. For example, we estimated the <code>write a BlogPost about Jerem</code> task as being a 3.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="472" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-11.32.10-1024x472.png" alt="" class="wp-image-16957" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-11.32.10-1024x472.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-11.32.10-300x138.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-11.32.10-768x354.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-11.32.10-1536x709.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-11.32.10.png 1697w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>As a result, Jerem now has everything it needs to start collecting epic metrics. This example provides five metrics:</p>



<ul class="wp-block-list"><li><code>jerem.jira.epic.storypoint</code>: the total number of story points needed to complete this epic. The value here is 14 (the sum of all the epic story points). This metric will evolve whenever as the epic is updated by adding or removing tasks.&nbsp;</li><li><code>jerem.jira.epic.storypoint.done</code>: the number of completed tasks. In our example, we have already completed the <code>Write Jerem bot</code> and <code>Deploy Jerem Bot</code>, so we have already completed eight story points.</li><li><code>jerem.jira.epic.storypoint.inprogress</code>: the number of &#8216;in progress&#8217; tasks, such as <code>Write a BlogPost about Jerem</code>.</li><li><code>jerem.jira.epic.unestimated</code>: the number of unestimated tasks, shown as <code>Unestimated Task</code> in our example.</li><li><code>jerem.jira.epic.dependency</code>: the number of tasks that have dependency labels, indicating that they are mandatory for other epics or projects.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="443" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Metris-epics-1024x443.png" alt="" class="wp-image-16958" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metris-epics-1024x443.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metris-epics-300x130.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metris-epics-768x332.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metris-epics-1536x665.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metris-epics.png 1784w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This way, for each epic in a project, Jerem collects five unique metrics.  </p>



<h4 class="wp-block-heading">Sprint data</h4>



<p>To complete epic tasks, we work using a <strong>sprint</strong> process. When doing sprints, we want to provide a lot of <strong>insights</strong> into our <strong>achievements</strong>. That&#8217;s why Jerem collects sprint data too! </p>



<p>So let&#8217;s open a new sprint in JIRA and start working on our task. This gives us the following JIRA view:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="241" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Sprint-ui-1024x241.png" alt="" class="wp-image-16963" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Sprint-ui-1024x241.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Sprint-ui-300x71.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Sprint-ui-768x181.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Sprint-ui-1536x362.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Sprint-ui.png 1804w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Jerem collects the following metrics for each sprint:&nbsp;</p>



<ul class="wp-block-list"><li><code>jerem.jira.sprint.storypoint.total</code>: the total number of story points onboarded into a sprint.</li><li><code>jerem.jira.sprint.storypoint.inprogress</code>: the story points currently in progress within a sprint.</li><li><code>jerem.jira.sprint.storypoint.done</code>: the number of story points currently completed within a sprint.</li><li><code>jerem.jira.sprint.events</code>: the &#8216;start&#8217; and of the &#8216;end&#8217; dates of sprint events, recorded as Warp10 string values.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="480" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Metrics-sprints-1024x480.png" alt="" class="wp-image-16964" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-sprints-1024x480.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-sprints-300x141.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-sprints-768x360.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-sprints-1536x720.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-sprints.png 1785w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>As you can see in the Metrics view above, we will record every sprint metric twice. We do this to provide a quick view of the active sprint, which is why we use the &#8216;current&#8217; label&#8217;. This also enables us to query past sprints, using the real sprint name. Of course, an active sprint can also be queried using its name.   </p>



<h4 class="wp-block-heading">Impediment data</h4>



<p>Starting a sprint means you need to know all the tasks you will have to work on over the next few days. But how can we track and measure unplanned tasks? For example, the very urgent one for your manager, or the teammate that needs a bit of help?</p>



<p>We can add special tickets on JIRA to keep track of those task. That&#8217;s what we call an &#8216;impediment&#8217;. They are labelled according their nature. If, for example, the production requires your attention, then it&#8217;s an &#8216;Infra&#8217; impediment. You will also retrieve metrics for the &#8216;Total&#8217; (all kinds of impediments), &#8216;Excess&#8217; (the unplanned tasks), &#8216;Support&#8217; (helping teammates), and &#8216;Bug fixes or other&#8217; (for all other kinds of impediment).</p>



<p>Each impediment belongs to the active sprint it was closed in. To close an impediment, you only have to flag it as &#8216;Done&#8217; or &#8216;Closed&#8217;.</p>



<p>We also retrieve metrics like:</p>



<ul class="wp-block-list"><li><code>jerem.jira.impediment.TYPE.count</code>: the number of impediments that occurred during a sprint.</li><li><code>jerem.jira.impediment.TYPE.timespent</code>: the amount of time spent on impediments during a sprint.</li></ul>



<p><code>TYPE</code> corresponds to the <strong>kind</strong> of recorded impediment. As we didn&#8217;t open any actual impediments, Jerem collects only the <code>total</code> metrics.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="433" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Metrics-impediment-1024x433.png" alt="" class="wp-image-16965" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-impediment-1024x433.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-impediment-300x127.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-impediment-768x325.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-impediment-1536x650.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Metrics-impediment.png 1773w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>To start recording impediments, we simply create a new JIRA task, in which we add an &#8216;impediment&#8217; label. We we also set its nature, and the actual time spent on it.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="819" height="903" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-14.16.54.png" alt="" class="wp-image-16967" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-14.16.54.png 819w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-14.16.54-272x300.png 272w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/Screen-Shot-2020-02-06-at-14.16.54-768x847.png 768w" sizes="auto, (max-width: 819px) 100vw, 819px" /></figure>



<p>For the impediment, we&#8217;ll we also retrieve the global metrics that Jerem always records:</p>



<ul class="wp-block-list"><li><code>jerem.jira.impediment.total.created</code>: the time spent from the creation date to complete an impediment. This allows us to retrieve a total impediment count. We can also record all impediment actions, even outside sprints.&nbsp;</li></ul>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>For a single Jira project, like our example, you can expect around 300 metrics. This might increase depending on the epic you create and flag on Jira, and the one you close.</p></blockquote>



<h3 class="wp-block-heading">Grafana dashboard</h3>



<p>We love building Grafana dashboards! They provide both the team and the manager a lot of insights into KPIs. The best part of it for me, as a developer, is that I see why it&#8217;s nice to fill a JIRA task!</p>



<p>In our first <a href="https://github.com/ovh/jerem/blob/master/grafana/program_management.json" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Grafana dashboard</a>, you will retrieve all the best program management KPIs. Let&#8217;s start with the global overview:</p>



<h4 class="wp-block-heading">Quarter data overview</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="421" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/quarter-data-sandbox-1024x421.png" alt="" class="wp-image-16968" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/quarter-data-sandbox-1024x421.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/quarter-data-sandbox-300x123.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/quarter-data-sandbox-768x316.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/quarter-data-sandbox-1536x632.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/quarter-data-sandbox.png 1840w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Here, you will find the current epic in progress. You will also find the global team KPIs, such as the predictability, the velocity, and the impediment stats. It&#8217;s here where the magic happens! When filled correctly, this dashboard will show you exactly what your team should deliver in the current quarter. This means you have quick access to all important current subjects. You will also be able to see if your team is expected to deliver on too many subjects, so you can quickly take action and delay some of the new features.</p>



<h4 class="wp-block-heading">Active sprint data</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="286" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/sprintdata-1024x286.png" alt="" class="wp-image-16969" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/sprintdata-1024x286.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/sprintdata-300x84.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/sprintdata-768x214.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/sprintdata-1536x428.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/sprintdata.png 1839w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The active sprint data panel is often a great support during our daily meetings. In this panel, we get a quick overview of the team&#8217;s achievements, and can establish the time spent on parallel tasks. </p>



<h4 class="wp-block-heading">Detailed data</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="286" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/detail-KPI-1024x286.png" alt="" class="wp-image-16970" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/detail-KPI-1024x286.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/detail-KPI-300x84.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/detail-KPI-768x215.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/detail-KPI-1536x429.png 1536w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/detail-KPI.png 1847w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The last part provides more detailed data. Using the epic Grafana variable, we can check specific epics, along with the completion of more global projects. You have also a <code>velocity chart</code>, which plots the past sprint, and compares the expected story points to the ones actually completed.   </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>The Grafana dashboard is directly availble in the Jerem project. You can import it directly in Grafana, provided you have a valid Warp 10 datasource configured. </p><p>To make the dashboard work as required, you have to configure the Grafana project variable in the form of a WarpScript list <code>[ 'SAN' 'OTHER-PROJECT' ]</code>. If our program manager can do it, I am sure you can! 😉 </p></blockquote>



<p>Setting up Jerem and automatically loading program management data give us a lot of insights. As a developer, I really enjoy it and I&#8217;ve quickly become used to tracking a lot more events in JIRA than I did before. You are able to directly see the impact of your tasks. For example, you see how quickly the roadmap is advancing, and you become able to identify any bottlenecks that are causing impediments. Those bottlenecks then become epics. In other words, once we start to use Jerem, we just auto-fill it! I hope you will enjoy it too! If you have any feedback, we would love to hear it.</p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fjerem-an-agile-bot%2F&amp;action_name=Jerem%3A%20An%20Agile%20Bot&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>TSL (or how to query time series databases)</title>
		<link>https://blog.ovhcloud.com/tsl-or-how-to-query-time-series-databases/</link>
		
		<dc:creator><![CDATA[Aurélien Hébert]]></dc:creator>
		<pubDate>Fri, 31 Jan 2020 13:41:34 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Observability]]></category>
		<category><![CDATA[Time series]]></category>
		<category><![CDATA[TSL]]></category>
		<guid isPermaLink="false">https://www.ovh.com/blog/?p=16734</guid>

					<description><![CDATA[Last year, we released TSL as an open source tool to query a Warp 10 platform, and by extension, the OVHcloud Metrics Data Platform. But how has it evolved since then? Is TSL ready to query other time series databases? What about TSL states on the Warp10 eco-system? TSL to query many time series databases [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Ftsl-or-how-to-query-time-series-databases%2F&amp;action_name=TSL%20%28or%20how%20to%20query%20time%20series%20databases%29&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>Last year, we released <a href="https://github.com/ovh/tsl/)" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer"><strong>TSL</strong></a> as an <strong>open source tool</strong> to <strong>query</strong> a<strong> Warp 10</strong> platform, and by extension, the <a href="https://www.ovh.com/fr/data-platforms/metrics/" data-wpel-link="exclude"><strong>OVHcloud Metrics Data Platform</strong></a>. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="540" src="https://www.ovh.com/blog/wp-content/uploads/2020/01/135A79BD-555F-4967-96DF-32F0A92E6C8A-1024x540.jpeg" alt="TSL by OVHcloud" class="wp-image-16774" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/01/135A79BD-555F-4967-96DF-32F0A92E6C8A-1024x540.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/135A79BD-555F-4967-96DF-32F0A92E6C8A-300x158.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/135A79BD-555F-4967-96DF-32F0A92E6C8A-768x405.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/135A79BD-555F-4967-96DF-32F0A92E6C8A.jpeg 1202w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>But how has it evolved since then? Is TSL ready to query <strong>other time series databases</strong>? What about TSL states on the <strong>Warp10 eco-system</strong>?</p>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">TSL to query many time series databases</h3>



<p>We wanted TSL to be usable in front of <strong>multiple time series databases</strong>. That&#8217;s why we also released a <strong>PromQL query generator</strong>.</p>



<p>One year later, we now know this wasn&#8217;t the way to go. Based on what we learned, the <strong><a href="https://github.com/aurrelhebert/TSL-Adaptor/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">TSL-Adaptor</a> project</strong> was open sourced, as a proof of concept for how TSL can be used  to query a <em>non-Warp 10</em> database. Put simply, TSL-Adaptor allows TSL to <strong>query an InfluxDB</strong>.</p>



<h4 class="wp-block-heading">What is TSL-Adaptor?</h4>



<p>TSL-Adaptor is a <strong><a href="https://quarkus.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Quarkus</a> JAVA REST API</strong> that can be used to query a backend. TSL-Adaptor parses the TSL query, identifies the fetch operation, and loads natively raw data from the backend.  It then computes the TSL operations on the data, before returning  the result to the user. The main goal of TSL-Adaptor is <strong>to make TSL available</strong> on top of <strong>other TSDBs</strong>.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="971" height="702" src="https://www.ovh.com/blog/wp-content/uploads/2020/01/8834E834-6E98-4567-A2B0-B6FD530B2197.png" alt="" class="wp-image-16866" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/01/8834E834-6E98-4567-A2B0-B6FD530B2197.png 971w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/8834E834-6E98-4567-A2B0-B6FD530B2197-300x217.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/8834E834-6E98-4567-A2B0-B6FD530B2197-768x555.png 768w" sizes="auto, (max-width: 971px) 100vw, 971px" /></figure></div>



<p>In concrete terms, we are running a JAVA REST API that<strong> integrates the WarpScript library</strong> in its runtime. TSL is  then used to compile the query into a valid WarpScript one. This is <strong>fully transparent</strong>, and only deals with TSL queries on the user&#8217;s side. </p>



<p>To load raw data from the InfluxDB, we created a WarpScript extension. This extension integrates an abstract class <code>LOADSOURCERAW</code> that needs  to be implemented to create an TSL-Adaptor data source. This requires only two methods: <code>find</code> and <code>fetch</code>. <code>Find</code> gathers all series selectors matching a query (class names, tags or labels), while <code>fetch</code>actually retrieves the raw data within a time span.</p>



<h4 class="wp-block-heading">Query Influx with TSL-Adaptor</h4>



<p>To get started, simply run an <a href="https://www.influxdata.com/products/influxdb-overview/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">InfluxDB</a> locally on the 8086 port. Then, let&#8217;s start an influx <a href="https://www.influxdata.com/time-series-platform/telegraf/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Telegraf</a> agent and record Telegraf data on the local influx instance.</p>



<p>Next, make sure you have locally installed TSL-Adaptor and updated its config with the path to a <a href="https://github.com/ovh/tsl/releases" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer"><code>tsl.so</code> library</a>.</p>



<p>To specify a custom influx address or databases, update the <a href="https://github.com/aurrelhebert/TSL-Adaptor/blob/master/src/main/resources/application.properties" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">TSL-Adaptor configuration</a> file accordingly.</p>



<p>You can start TSL-Adaptor with the following example command:</p>



<pre class="wp-block-code"><code class="">java -XX:TieredStopAtLevel=1 -Xverify:none -Djava.util.logging.manager=org.jboss.logmanager.LogManager -jar build/tsl-adaptor-0.0.1-SNAPSHOT-runner.jar </code></pre>



<p>And that&#8217;s it! You can now query your influx database with TSL and TSL-Adaptor.</p>



<p>Let&#8217;s start with the retrieval of the time series relating to the disk measurements.</p>



<pre class="wp-block-code"><code class="">curl --request POST \
  --url http://u:p@0.0.0.0:8080/api/v0/tsl \
  --data 'select("disk")'</code></pre>



<p>Now let&#8217;s use the TSL analytics power! </p>



<p>First, we would like to retrieve only the data containing a mode set to <code>rw</code>.&nbsp;</p>



<pre class="wp-block-code"><code class="">curl --request POST \
  --url http://u:p@0.0.0.0:8080/api/v0/tsl \
  --data 'select("disk").where("mode=rw")'</code></pre>



<p>We would like to retrieve the maximum value at every five-minute interval, for the last 20 minutes. The TSL query will therefore be:</p>



<pre class="wp-block-code"><code class="">curl --request POST \
  --url http://u:p@0.0.0.0:8080/api/v0/tsl \
  --data 'select("disk").where("mode=rw").last(20m).sampleBy(5m,max)'</code></pre>



<p>Now it&#8217;s your turn to have some fun with TSL and InfluxDB. You can find details of all the implemented functions in the <a href="https://github.com/ovh/tsl/blob/master/spec/doc.md" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">TSL documentation</a>. Enjoy exploring!</p>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">What&#8217;s new on TSL with Warp10?</h3>



<p>We originally built TSL as a <a href="https://github.com/ovh/tsl" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">GO proxy</a> in front of Warp10. <strong>TSL</strong> has now integrated the Warp 10 ecosystem as a <strong>Warp10 extension</strong>, or as a <strong>WASM library</strong>! We have also added some <strong>new native TSL functions</strong> to make the language even richer!</p>



<h4 class="wp-block-heading">TSL as WarpScript function</h4>



<p>To make TSL work as a Warp10 function, you need to have the <code>tsl.so</code> library available locally. This library can be found in <a href="https://github.com/ovh/tsl/releases" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">TSL github repository</a>. We have also made a <a href="https://warpfleet.senx.io/browse/io.ovh/tslToWarpScript#main" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">TSL WarpScript extension</a> available from <a href="https://warpfleet.senx.io/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">WarpFleet</a>, the extension repository of the Warp 10 community. </p>



<p>To set up TSL extension on your Warp 10, simply download the JAR indicated in <a href="https://warpfleet.senx.io/browse/io.ovh/tslToWarpScript#main" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">WarpFleet</a>. You can then configure the extension in the Warp 10 configuration file: </p>



<pre class="wp-block-code"><code class="">warpscript.extensions = io.ovh.metrics.warp10.script.ext.tsl.TSLWarpScriptExtension
warpscript.tsl.libso.path = &lt;PATH_TO_THE_tsl.so_FILE></code></pre>



<p>Once you reboot Warp 10, you are ready to go. You can test if it&#8217;s working by running the following query:</p>



<pre class="wp-block-code"><code class="">// You will need to put here a valid Warp10 token when computing a TSL select statement
// '&lt;A_VALID_WARP_10_TOKEN>' 

// A valid TOKEN isn't needed on the create series statement in this example
// You can simply put an empty string
''

// Native TSL create series statement
 &lt;'
    create(series('test').setValues("now", [-5m, 2], [0, 1])) 
'>
TSL</code></pre>



<p>With the WarpScript TSL function, you can use native WarpScript variables in your script, as shown in the example below:</p>



<pre class="wp-block-code"><code class="">// Set a Warp10 variable

NOW 'test' STORE

'' 

// A Warp10 variable can be reused in TSL script as a native TSL variable
 &lt;'
    create(series('test').setValues("now", [-5m, 2], [0, 1])).add(test)
'>
TSL</code></pre>



<h4 class="wp-block-heading">TSL WASM</h4>



<p>To expand TSL&#8217;s potential uses, we have also exported it as a Wasm library, so you can use it directly in a browser! The Wasm version of the library parses TSL queries locally and generates the WarpScript. The result can then be used to query a Warp 10 backend. You will find more details on the <a href="https://github.com/ovh/tsl#use-tsl-with-webassembly" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">TSL github</a>.</p>



<h4 class="wp-block-heading">TSL&#8217;s new features</h4>



<p>As TSL has grown in popularity, we have detected and fixed a few bugs, and also added some additional native functions to accommodate new use cases.</p>



<p>We added the <code>setLabelFromName</code>method, to set a new label to a series, based on its name. This label can be the exact series name, or the result of a regular expression. </p>



<p>We also completed the <code>sort</code>method, to allow users to sort their series set based on series meta data (i.e. selector, name or labels).</p>



<p>Finally, we added a <code>filterWithoutLabels</code>, to filter a series set and remove any series that do not contain specific labels.</p>



<p>Thanks for reading! I hope you will give TSL a try, as I would love to hear your feedback.  </p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">Paris Time Series meetup</h2>



<p>We are delighted to be <strong>hosting</strong>, at the <strong>OVHcloud office</strong> in Paris, soon the third<strong> <a href="https://www.meetup.com/Paris-Time-Series-Meetup/events/266610627/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Paris Time Series meetup</a></strong>, organised by Nicolas Steinmetz. During this meetup, we will be speaking about TSL, as well as listening to an introduction of the Redis Times Series platform.</p>



<p>If you are available, we will be happy to meet you there!</p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Ftsl-or-how-to-query-time-series-databases%2F&amp;action_name=TSL%20%28or%20how%20to%20query%20time%20series%20databases%29&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>TSL: a developer-friendly Time Series query language for all our metrics</title>
		<link>https://blog.ovhcloud.com/tsl-a-developer-friendly-time-series-query-language-for-all-our-metrics/</link>
		
		<dc:creator><![CDATA[Aurélien Hébert]]></dc:creator>
		<pubDate>Wed, 13 Feb 2019 13:11:28 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Time series]]></category>
		<category><![CDATA[TSL]]></category>
		<guid isPermaLink="false">https://blog.ovh.com/fr/blog/?p=14445</guid>

					<description><![CDATA[At the Metrics team we have been working on time series for several years. From our experience the data analytics capabilities of a Time Series Database (TSDB) platform is a key factor to create value from your metrics. And these analytics capabilities are mostly defined by the query languages they support. 

TSL stands for Time Series Language. In a few words, TSL is an abstracted way, under the form of an HTTP proxy, to generate queries for different TSDB backends. Currently it supports Warp 10's WarpScript and  Prometheus' PromQL query languages but we aim to extend the support to other major TSDB.


To better understand why we created TSL, we are reviewing some of the TSDB query languages supported on OVH Metrics Data Platform. When implementing them, we learnt the good, the bad and the ugly of each one. At the end, we decided to build TSL to simplify the querying on our platform, before open-sourcing it to use it on any TSDB solution. 

Why did we decide to invest some of our Time in such a proxy? Let me tell you the story of the OVH metrics protocol!<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Ftsl-a-developer-friendly-time-series-query-language-for-all-our-metrics%2F&amp;action_name=TSL%3A%20a%20developer-friendly%20Time%20Series%20query%20language%20for%20all%20our%20metrics&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>At the Metrics team, we have been working on Time Series for several years now. In our experience, the <strong>data analytics capabilities</strong> of a Time Series Database (TSDB) platform is a key factor in <strong>creating value</strong> from your metrics. These analytics capabilities are mostly defined by the <strong>query languages</strong> they support. </p>



<p>TSL stands for <strong>Time Series Language</strong>. In simple terms, <a rel="noreferrer noopener nofollow external" href="https://github.com/ovh/tsl" target="_blank" data-wpel-link="external">TSL</a> is an abstracted way of generating queries for <strong>different TSDB backends</strong>, in the form of an HTTP proxy. It currently supports Warp 10&#8217;s WarpScript and  Prometheus&#8217; PromQL query languages, but we aim to extend the support to other major TSDBs.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="300" height="213" src="/blog/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A-300x213.png" alt="TSL - Time Series Language" class="wp-image-14499" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A-300x213.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A-768x545.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A.png 885w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure></div>



<p><em>To provide some context around why we created TSL, it began with a review of some of the <strong>TSDB query languages</strong> supported on the&nbsp;<strong>OVH Metrics Data Platform</strong>. When implementing them, we learned the good, the bad and the ugly of each one. In the end, we decided to build TSL to <strong>simplify the querying</strong> on our platform, before open-sourcing it to use it on any TSDB solution.&nbsp;</em></p>



<p><em>So why did we decide to invest our time in developing such a proxy? Well, let me tell you <strong>the story of the OVH Metrics protocol</strong>!</em></p>



<h3 class="wp-block-heading">From OpenTSDB&#8230;</h3>



<div class="wp-block-image"><figure class="alignleft"><img loading="lazy" decoding="async" width="300" height="80" src="/blog/wp-content/uploads/2019/02/AEEDC522-26CE-44F6-A6F2-6B80480F8FC2-300x80.png" alt="OpenTSDB" class="wp-image-14507" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/02/AEEDC522-26CE-44F6-A6F2-6B80480F8FC2-300x80.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/AEEDC522-26CE-44F6-A6F2-6B80480F8FC2-768x205.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/AEEDC522-26CE-44F6-A6F2-6B80480F8FC2.png 810w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure></div>



<p>The first aim of our platform is to be able to support the OVH infrastructure and application monitoring. When this project started, a lot of people were using <a href="http://opentsdb.net/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external">OpenTSDB</a>, and were familiar with its query syntax. <a href="http://opentsdb.net/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external">OpenTSDB</a> is a scalable database for Time Series. The <a href="http://opentsdb.net/docs/build/html/user_guide/query/index.html" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">OpenTSDB query</a>&nbsp;syntax is easy to read, as you send a JSON document describing the request. The document below will load all<code>sys.cpu.0</code>&nbsp;metrics of the<code>test</code>datacentre, summing them between the<code>start</code>&nbsp;and <code>end</code> dates:</p>



<pre class="wp-block-code"><code lang="java" class="language-java">{
    "start": 1356998400,
    "end": 1356998460,
    "queries": [
        {
            "aggregator": "sum",
            "metric": "sys.cpu.0",
            "tags": {
                "host": "*",
                "dc": "test"
            }
        }
    ]
}</code></pre>



<p>This enables the quick retrieval of specific data, in a specific time range. At OVH, this was used for graphs purpose, in conjunction with Grafana, and helped us to spot potential issues in real time, as well as investigate past events. OpenTSDB integrates simple queries, where you can define your own sampling and deal with counter data, as well as filtered and aggregated raw data.</p>



<p>OpenTSDB was the first protocol supported by the Metrics team, and is still widely used today. Internal statistics shows that 30-40% of our traffic is based on OpenTSDB queries. A lot of internal use cases can still be entirely resolved with this protocol, and the queries are easy to write and understand.</p>



<p>For example, a query with OpenTSDB to get the max value of the<code>usage_system</code>for the<code>cpu</code>0 to 9, sampled for a 2-minute span by their values&#8217; average, looks like this:</p>



<pre class="wp-block-code"><code lang="java" class="language-java">{
    "start": 1535797890,
    "end": 1535818770,
    "queries":  [{
        "metric":"cpu.usage_system",
        "aggregator":"max",
        "downsample":"2m-avg",
        "filters": [{
            "type":"regexp",
            "tagk":"cpu",
            "filter":"cpu[0–9]+",
            "groupBy":false
            }]
        }]
}</code></pre>



<p>However, OpenTSDB quickly shows its limitations, and some specific uses cases can&#8217;t be resolved with it. For example, you can&#8217;t apply any operations directly on the back-end. You have to load the data on an external tool and use it to apply any analytics.</p>



<p>One of the main areas where OpenTSDB (version 2.3) is lacking&nbsp; is multiple Time Series set operators, which allow actions like a divide series. Those operators can be a useful way to compute the individual query time per request, when you have (for example) a set of total time spend in requests and a set of total requests count series. That’s one of the reasons why the OVH Metrics Data Platform supports other protocols.</p>



<h2 class="wp-block-heading">&#8230; to PromQL</h2>



<div class="wp-block-image"><figure class="alignleft"><img loading="lazy" decoding="async" width="150" height="150" src="/blog/wp-content/uploads/2019/02/790C8FFD-E734-475E-BF7E-B93F0708C604-150x150.png" alt="Prometheus" class="wp-image-14503"/></figure></div>



<p>The second protocol we worked on was <a href="https://prometheus.io/docs/prometheus/latest/querying/basics/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">PromQL</a>, the query language of the <a href="https://prometheus.io/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external">Prometheus</a> Time Series database. When we made that choice in 2015, <a href="https://prometheus.io/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external">Prometheus</a> was gaining some traction, and it still has an impressive adoption rate. But if Prometheus is a success, it isn&#8217;t for it’s query language, PromQL. This language never took off internally, although it has started to gain some adoption recently, mainly due to the arrival of people that worked with Prometheus in their previous companies. Internally,&nbsp;<strong>PromQL queries represent about 1-2%</strong> of our daily traffic. The main reasons are that a lot of simple use cases can be solved quickly and with more control of the raw data with OpenTSDB queries, while a lot of more complex use cases cannot be solved with PromQL. A similar request to the one defined in OpenTSDB would be:</p>



<pre class="wp-block-code"><code lang="c" class="language-c">api/v1/query_range?
query=max(cpu. usage_system{cpu=~"cpu[0–9]%2B"})
start=1535797890&amp;
end=1535818770&amp;
step=2m</code></pre>



<p>With PromQL, <strong>you lose control of how you sample the data</strong>, as the only operator is <strong>last</strong>. This means that &nbsp;if (for example) you want to downsample your series with a 5-minute duration, you are only able to keep the last value of each 5-minute series span. In contrast, all competitors include a range of operators. For example, with OpenTSDB, you can choose between several operators, including average, count, standard deviation, first, last, percentiles, minimal, maximal or summing all values inside your defined span.</p>



<p>In the end, a lot of people choose to use a much more complex method: WarpScript, which is powered by the Warp10 Analytics Engine we use behind the scenes.</p>



<h2 class="wp-block-heading">Our internal adoption of WarpScript</h2>



<div class="wp-block-image"><figure class="alignleft"><img loading="lazy" decoding="async" width="300" height="106" src="/blog/wp-content/uploads/2019/02/559ED4E1-4AD2-453B-A96B-74BF6490D6B9-300x106.png" alt="WarpScript by SenX" class="wp-image-14505" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/02/559ED4E1-4AD2-453B-A96B-74BF6490D6B9-300x106.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/559ED4E1-4AD2-453B-A96B-74BF6490D6B9-768x272.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/559ED4E1-4AD2-453B-A96B-74BF6490D6B9.png 837w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure></div>



<p><a rel="noreferrer noopener nofollow external" href="https://www.warp10.io/content/03_Documentation/04_WarpScript/01_Concepts" target="_blank" data-wpel-link="external">WarpScript</a> is the current Time Series language of <a rel="noreferrer noopener nofollow external" href="https://www.warp10.io/" target="_blank" data-wpel-link="external">Warp 10(R)</a>, our underlying backend. WarpScript will help for any complex Time Series use case, and solves numerous real-world problems, as you have full control of all your operations. You have dedicated frameworks of functions to sample raw data and fill missing values. You also have frameworks to apply operations on single-value or window operations. You can apply operations on multiple Time Series sets, and have dedicated functions to manipulate Time Series times, statistics, etc.</p>



<p>It works with a Reverse Polish Notation (like a good, old-fashioned HP48, for those who&#8217;ve got one!), and simple uses cases can be easy to express. But when it comes to analytics, while it certainly solves problems, it’s still complex to learn. In particular, Time Series use cases are complex and require a thinking model, so WarpScript helped to solve a lot of hard ones.</p>



<p>This is why it&#8217;s still the main query used at OVH on the OVH Metrics platform, with <strong>nearly 60%</strong> of internal queries making use of it. The same request that that we just computed in OpenTSDB and PromQL would be as follows in WarpScript:</p>



<pre class="wp-block-code"><code lang="c" class="language-c">[ "token" "cpu.average" { "cpu" "~cpu[0–9]+" } NOW 2 h ] FETCH
[ SWAP bucketizer.mean 0 2 m 0 ] BUCKETIZE
[ SWAP [ "host" ] reducer.max ] REDUCE</code></pre>



<p>A lot of users find it hard to learn WarpScript at first, but after solving their initial issues with some (sometimes a lot of) support, it becomes&nbsp;the first step of their Time Series adventure. Later, they figure out some new ideas about how they can gain knowledge from their metrics. They then come back with many demands and questions about their daily issues, some of which can be solved quickly, with their own knowledge and experience.</p>



<p>What we learned from WarpScript is that it’s a fantastic tool with which to build analytics for our Metrics data. We pushed many complex use cases with advanced signal-processing algorithms like <a href="https://www.warp10.io/doc/LTTB#sigTitle" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">LTTB</a>, <a href="https://www.warp10.io/tags/outlier" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Outliers</a> or <a href="https://www.warp10.io/doc/PATTERNDETECTION#sigTitle" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Patterns</a> detections, and&nbsp;<a href="https://en.wikipedia.org/wiki/Kernel_smoother" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">Kernel Smoothing,</a> where it proved to be a&nbsp; real enabler. However, it proved quite expensive to support for basic requirements, and feedback indicated the syntax and overall complexity were big concerns.</p>



<p>A WarpScript can involve dozens (or even hundreds) of lines, and a successful execution is often an accomplishment, with the special feeling that comes from having made full use of one&#8217;s brainpower. In fact, an inside joke amongst our team is being born able to write a WarpScript in a single day, or to earn a WarpScript Pro Gamer badge! That&#8217;s why we&#8217;ve distributed Metrics t-shirts to users that have achieved significant successes with the Metrics Data Platform.</p>



<p>We liked the WarpScript semantic, but we wanted it to have a significant impact on a broader range of use cases. This is why we started to write TSL with few simple goals:</p>



<ul class="wp-block-list"><li>Offer a clear Time Series analytics semantic</li><li>Simplify the writing and making it developer-friendly</li><li>Support data flow queries and ease debugging for complex queries</li><li>Don&#8217;t try and be the ultimate tool box. Keep it simple.</li></ul>



<p>We know that users will probably have to switch back to WarpScript every so often. However, we hope that using TSL will simplify their learning curve. TSL is simply a new step in the Time Series adventure!</p>



<h3 class="wp-block-heading">The path to&nbsp;TSL</h3>



<div class="wp-block-image"><figure class="alignleft"><img loading="lazy" decoding="async" width="300" height="213" src="/blog/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A-300x213.png" alt="TSL - Time Series Language" class="wp-image-14499" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A-300x213.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A-768x545.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/E80CF711-CFD0-45F8-B7E4-4CEBE7E5815A.png 885w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure></div>



<p><a rel="noreferrer noopener nofollow external" href="https://github.com/ovh/tsl" target="_blank" data-wpel-link="external">TSL</a> is the result of three years of Time Series analytics support, and offers a functional Time Series Language. The aim of TSL is to build a Time Series data flow as code. </p>



<p>With TSL, native methods, such as <code>select</code> and <code>where</code>, exist to choose which metrics to work on. Then, as Time Series data is time-related, we have to use a time selector method on the selected meta. The two available methods are <code>from</code> and <code>last</code>. The vast majority of the other TSL methods take Time Series sets as input and provide Time Series sets as the result. For example, you have methods that only select values above a specific threshold, compute rate, and so on. We have also included specific operations to apply to multiple subsets of Time Series sets, as additions or multiplications.</p>



<p>Finally, for a more readable language, you can define variables to store Time Series queries and reuse them in your script any time you wish. For now, we support only a few native types, such as <code>Numbers</code>, <code>Strings</code>, <code>Time durations</code>, <code>Lists</code>, and <code>Time Series</code> (of course!).</p>



<p>Finally, the same query used throughout this article will be as follows in TSL:</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript">select("cpu.usage_system")
.where("cpu~cpu[0–9]+")
.last(12h)
.sampleBy(2m,mean)
.groupBy(max)</code></pre>



<p>You can also write more complex queries. For example, we condensed our WarpScript hands-on, designed to detect <a href="https://helloexoworld.github.io/hew-hands-on/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external">exoplanets from NASA raw data</a>, into a single TSL query:</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript">sample = select('sap.flux')
 .where('KEPLERID=6541920')
 .from("2009–05–02T00:56:10.000000Z", to="2013–05–11T12:02:06.000000Z")
 .timesplit(6h,100,"record")
 .filterByLabels('record~[2–5]')
 .sampleBy(2h, min, false, "none")

trend = sample.window(mean, 5, 5)

sub(sample,trend)
 .on('KEPLERID','record')
 .lessThan(-20.0)</code></pre>



<p>So what did we do here? First we instantiated a <strong>sample</strong> variable in which we loaded the ‘sap.flux’ raw data of one star, the 6541920. We then cleaned the series, using the timesplit function (to split the star series when there is a hole in the data with a length greater than 6h), keeping only four records. Finally, we sampled the result, keeping the minimal value of each 2-hour bucket.</p>



<p>We then used this result to compute the series trend, using a moving average of 10 hours.</p>



<p>To conclude, the query returns only the points less than 20 from the result of the subtraction of the trend and the sample series.</p>



<h3 class="wp-block-heading">TSL is Open Source</h3>



<p>Even if our first community of users was mostly inside OVH, we&#8217;re pretty confident that TSL can be used to solve a lot of Time Series use cases.</p>



<p>We are currently beta testing TSL on our OVH Metrics public platform. Furthermore, TSL is <a href="https://github.com/ovh/tsl" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">open-sourced on Github</a>, so you can also test it on your own platforms.</p>



<p>We would love to get your feedback or comments on TSL, or Time Series in general. We&#8217;re available on the <a href="https://gitter.im/ovh/metrics" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">OVH Metrics gitter,</a> and you can find out more about TSL &nbsp;in <a href="https://labs.ovh.com/metrics-beta-features/" data-wpel-link="exclude">our Beta features documentation</a>.</p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Ftsl-a-developer-friendly-time-series-query-language-for-all-our-metrics%2F&amp;action_name=TSL%3A%20a%20developer-friendly%20Time%20Series%20query%20language%20for%20all%20our%20metrics&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
