Compare value at t and t-7days - graphite

To get some "visual alerting", I'd like to draw simultaneously two curves on the same graph in Grafana:
current time-window graph
same graph but with 7 days ago data
The idea is to be able to compare data evolution on the same day in the previous week.
I could not find a Graphite function for that (but I may have missed something in the doc).
Is there a way to do it?

You can use timeShift to make a metric in grafana with your series shifted back a week.
This kind of thing is also a good application for series-specific display overrides in grafana, so you can make the shifted series display differently from the current data.

Related

Unable to get data of Present Month in Apache Superset

I am using Apache Superset for reporting purpose. I am want to draw a chart to show the graph for present Month. I used several ways but it is showing me the last day of the month. I used this method and other like start of this month It is showing me end of this month. Please show me the correct way to get the data of the current month.
After a rigorous research I found the answer. here it is
datetrunc(datetime("this month start"), month)

Google analytics and Data Studio: How to show a time series of Year over Year percentage growth

On spreadsheets, I have a monthly reporting sheet by various Google Analytics channels (organic, direct, mobile, desktop etc). For each channel, I have another column that automatically calculates the percentage of growth Y-o-Y EX: (A12-A1)/A1. These percentages are then used in a graph to show the trend. So far I haven't found any method of doing this in Data Studio. I presume that calculated fields would be the way but can't figure it out.
For a better understanding of the situation, here is a sample data with attached graph done in Google spreadsheets https://docs.google.com/spreadsheets/d/1HyrKb1RysZNXWxFo-W3DZ2EbrKBVmwt5Jvag3_4TJ3A/edit#gid=883733931
Blending data together should do.
Blend the same fields choosing in the date range previous and last year, let's say your metric is pageviews you'll end up with two (2018 and 2019) pageview, in this way you will be able to apply that calculation (not too sure about that A1, perhaps is a typo and should be A11).
Example:

Grafana graph to display call response time

I have been playing with Grafana for a while, and got stuck with the following issue.
I need to produce a chart that displays the round trip time for some REST calls my application is doing.
I am using Dropwizard metrics and starting a PausableTimer when I fire the call, and stop it when the expected response comes back. From Grafana, then, I can see the data source I need but when I build the graph, I am forced to apply some statistical calculation on my data (stddev, mean, max, min, etc.) whereas all I need is to chart the numbers from the series.
Below is a screenshot of the config part I am referring to:
The dropdown contains a number of transformations to apply to the priginal data, and I cannot find a way to tell Grafana that I wans to display the data the way it is.
I am not really sure how to do this, had anyone had this issue before -- and solved it?
Thanks in advance.

Single-stat percentage change from initial value in graphite/grafana?

Is there a way to simply show the change of a value over the selected time period? All I'm interested in is the offset of the last value compared to the initial one. The values can vary above and below these over the time period, it's not really relevant (and would be exceptions in my case).
For an initial value of 100 and an final value of 105, I'd expect a single stat box displaying 5%.
I have the feeling I'm missing something obvious obvious, but can't find a method to display this deceptively simple task.
Edit:
I'm trying to create a scripted Grafana dashboard that will automatically populate disk consumption growth for all our various volumes. The data is already in Graphite, but for purposes of capacity management and finance planning (which projects/departments gets billed) it would be helpful for managers to have a simple and coarse overview of which volumes grow outside expected parameters.
The idea was to create a list of single-stat values with color coding that could easily be scrolled through to find abnormalities. Disk usage would obviously never be negative, but volatility in usage between the start and end of the time period would be lost in this view. That's not a big concern for us as this is all shared storage and such usage is expected to a certain degree.
The perfect solution would be to have the calculations change dynamically based on the selected time period.
I'm thinking that this is not really possible (at least not easily) to do with just Graphite and Grafana and have started looking for alternative methods. We might have to implement a different reporting system for this purpose.
Edit 2
I've tried implementing the suggested solution from Leonid, and it works after a fashion. The calculations seems somewhat off from what I expected though.
My test dashboard looks like follows:
If I were to calculate the change manually, I'd end up with roughly 24% change between the start (7,23) and end (8.96) value. Graphite calculates this to 19%. It's probably a reason for the discrepancy, probably something to do with it being a time-series and not discreet values?
As a sidenote: The example is only 30 days, even though the most interesting number would be a year. We don't have quite a year of data in Graphite yet and having a 30 day view is also interesting. It seems I have to implement several dashboards with static times.
You certainly can do that for some fixed period. For example following query take absolute difference betweent current metric value and value that metric has one minute ago (i.e. initial value) and then calculate it's percentage of inital value.
asPercent(absolute(diffSeries(my_metric, timeShift(my_metric, '1m'))), timeShift(my_metric, '1m'))
I believe you can't do that for time period selected in Grafana picker.
But is that really what you need? It's seems strange because as you said value can change in both directions. Maybe standard deviation would be more suitable for you? It's available in Graphite as stdev function.

Searching a range of events in a time graph

I'm trying to implement the graph from this blog post: http://blog.neo4j.org/2012/02/modeling-multilevel-index-in-neoj4.html
Inside the blogpost is a schematic of the graph and a query on how to find a range of events. However in my use case i don't have a set consecutive days. So for example the current state of the graph could be that i have day nodes from 12-7-2013 (12 july 2013) to 12-8-2013 (12 august 2013). Then when adding an event on 12-7-2014 i'm missing all the inbetween days for a whole year!
First problem is if i start to write queries that generate those days it might become very slow (application needs to be responsive). Second problem is i end up with days on which no event could be taken place, and so have unneeded data in my database.
So my question is: How can i get a range of events without using the NEXT relation between days?

Resources