Graph values incorrect with hours > 6 - grafana

I am using Grafana to record online player count. I am having a very strange issue where as soon as I increase the time frame from anything more than 6 hours, the numbers just don't make any sense. Anything less than 6 hours work completely fine. I am just using the count aggregator. Has anyone encountered anything similar?
6 Hours
12 Hours

Related

Compare values from now and 2 hours ago and how the difference

As can be see from the chart below we have a sensor that is recording pressure. The pressure has dropped 2 points within 2 hours. If this drops 2 points within 2 hours, this causes us some problems. I would like to create a query that compares the values from now and 2 hours in the past and display the difference. How can i achieve this in influx query language?
You are best off using a derivative and depending on the exact response, either derivateive or non negative to see rate of change:
InfluxDB Functions - Derivative
Youd set the unit to 2h (it defaults to 1s)
Thanks

reset chart to 0 in grafan

Below is a chart I have in grafana:
My problem is that if my chosen time range is say 5 minutes, the graph wont show only what happened in the last 5 minutes. So in the picture, nothing happened in the past 5 minutes so it's just showing the last points it has. How can I change this so that it goes back to zero if nothing has changed? I'm using a Prometheus counter for this, if that is relevant.
As explained in the Prometheus documentation, a counter value in itself is not of much use. It depends on when your job was last restarted and everything that happened since.
What's interesting about a counter is how much it changed over some period of time. I.e. either the average rate of change per second (e.g. 3 queries per second) or the increase over some time range (e.g. 10K queries in the last hour).
So instead of graphing something like e.g. http_requests, you should graph rate(http_requests[1m]) (the averate number of requests over the previous 1 minute) or increase(http_requests[1h]) (the total number of requests over the past hour). You can play with the range size until you get something which makes sense for your data. But make sure to use a range at least 2x your scrape interval (and ideally more, as Prometheus is somewhat daft in the way it computes rates/increases).

Grafana does not show graphs for longer time periods

We are using Grafana to visualise some times measured with an other application. I get a data point every 5 min.
I also get a nice graph if I only visualise the last 24 or 48h.
for longer time ranges no graph is shown.
I researched a little and found that in the database there are data points each minute. which means I only get one value and 4 time NULL every 5 minutes. For a time range bigger 48h grafana starts to cumulate the values it ends up with only NULL values.
Here are two pictures which show my problem:
Timerange 24h
Timerange 7 days
Are there some settings I can make to avoid this behaviour?
Thank you for your help
Are you using graphite? If so, please make sure you configured xFilesFactor correctly.

Detect when 2 recurring (time triggered) scripts will sync [Theoretical]

This is a somewhat theoretical question. I have 2 CRON jobs that run in a staggered interval, one every 13 minutes, and the other every 15 minutes.
I know it's very easy to stop them running at the same time etc with locks/stops.
However it got me thinking in a theoretical sense, how the synchronisations in time; when they both run at the same minute could be visualised.
So far it's actually a pretty interesting logic, as it's a case of converting the 13 minutes and 15 minutes into similar 24 based hour formats, and then detecting if any of them match. This bit isn't too hard, and the basic logic I have sort of got in this jsFiddle (Very ugly and janky/long way around, but it sort of works): http://jsfiddle.net/wigster/kdo5bwk9/
I can't quite visualise how/when these sync/simultaneousness' will occur though (I know they WILL occur, I just don't know if that's day's/weeks/months apart etc).
This may possibly be a question I should ask on https://math.stackexchange.com/ but StackOverflow is my frequent, so I'll try here first.
As I said, this is not for any real world application, simply a maths logic that has intrigued me today.
TL:DR 2 "Things" running at 13 minutes and 15 minutes. At first it may seem simple, numbers that are divisible by both 13 and 15. Eg, we know they will both run at 9:30 eventually. But HOW OFTEN / regularly will the 13 min cycle hit 9:30 at the same time the 15 minute cycle hits 9:30 as it's likely to be ahead/behind most of the time.
#MrWigster

Calculate Percentage Overtime in SSRS 2012

I am trying create a report that calcualtes the Overtime someone has worked in a week, my understanding of the calulation would be.
My Columns are :
Extra Hours Worked Per Week
Total Hour Worked Per Week
Calculation
Extra Hours Worked Per Week / (Extra Hours Worked Per Week + Total Hour Worked Per Week) * 100
If I represent All the columns as minutes sum them up and do the calculation I get one figure but if I sum up all the minutes in to hours and minutes and do the same calculation I get a different figure. What I want to know is, is the Calculation correct and if so, should I be doing the calculation just using minutes or using hours and minutes.
Hope someone can help.
Assuming you want to calculate the percentage of Extra hours, your calculation should be:
((TotalHours * 100)/(TotalHours - ExtraHours))-100
And my advise to you is to keep the calculation in minutes, and in the end convert it to hours (and minutes).