Grafana Queries independent of time range seletion

Hi,
I am new to grafana.
I am using Grafana V1.7
I have machine start time-date and machine status in my table( which gets updated only on change of machine status) along with other real time parameters of the machine( which gets updated at every 5 mins interval).So suppose my Machine got started 2 days/3 days back and it is on since then,
so in the same dashboard with" Today So Far" selection…I am getting Machine Status and date-time as" No Data" since the Grafana Query is taking the time selection of the dashboard.

So In need to configure the single stat plugin in such a way that I wont take the dashboard time interval into consideration.
Please help.

Thanks in advance

I use Grafana 6 so I don’t know if that fuction is available, but in the query setup I have Aggregators, Selectors, … and there is a last() function that could do the trick. You might have to edit the raw query (the little pencil symbol in Grafana 6) and remove the $timeFilter expression.

HTH,
Patrick

Thanks for the help.

@neelanjan You have not said what datasource you are using.

I use Prometheus and in Grafana there is an Instant toggle switch on the query which means it will use the last, most recent metric/s. So it’s as simple as setting the query to Instant.

Or as @pmhausen said, you have functions such as last() and removing any timefilter or specifying a hard-coded time filter etc.

@codlord I am using InfluxDB as the data source.

In that case I think you will need to use aggregate functions like first/last, as I don’t think there is a built-in Instant flag. See here: