Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Timeseries queries with sparse data points



I’d like to use Insights to monitor our Microsoft Azure auto-scaling rules, and I’ve written a tool that creates a custom Insights event whenever one of our Azure webapps scales up or down.

I’m trying to use NRQL to plot a timeseries graph with the number of instances a particular webapp is using over time. The data looks roughly like this:

timestamp    appName   newInstanceCount  scaleDirection
00:10        site1     2                 ScaleUp
00:15        site2     4                 ScaleDown
04:00        site1     3                 ScaleUp
05:00        site1     2                 ScaleDown

I’m using a NRQL query like SELECT max(newInstanceCount) FROM AutoScaleAction SINCE 1 DAY AGO WHERE appName = 'site1' TIMESERIES AUTO to render a line chart with the value of newInstanceCount over time.

The problem I’m running into is that when using TIMESERIES, periods during which there is no data are rendered as zero on the graph. Since I only insert an event when the value of newInstanceCount changes, the line drops to zero between 00:10 and 04:00. I’d like the line chart to display the last-known value for periods where there is no data, rather than zero.

I’ve looked at the NRQL reference but I can’t seem to figure out a way to graph the data the way I want – Is this sort of scenario supported? What am I doing wrong here? :slightly_smiling:

Feature Idea: Export Some Custom Params (>10k entries)

Hey @brantb,

Nice job! You’re not doing anything wrong here. Unfortunately we don’t support this specific scenario at this point in time. With that said, I’d like to submit a feature request for you so we can support the behavior in the future. While I don’t have an immediate workaround for you, I will ask that you are notified if this feature request is implemented. Hopefully that will help out. Let me know if you have any other questions regarding this.

Time series 'no data' instead of '0'

Any word on that feature request?


How about doing a "Select uniqueCount(host) from Transaction where appName = ‘site1’ TIMESERIES Auto since 1 Day AGO limit 1000. That will only report on hosts doing something and will show you the rise and fall.


I have a similar problem. Is there any news on this topic?