Continuous query run status

is there any way to check if a continuous query has run or not.

i created a continuous query cq1 as below:
create continuous query cq1 on db1 resample every 1m for 10m begin select * into m1_back from m1 group by * end

this query is supposed to run the select query every 1m and fetch data for previus 10m.
how can i verify is this query has completed succesfully, becasue i cannot see data been populated into
m1_back at all.

the m1_back measurement existed before i created this continuous query.

You can check inside InfluxDB to see if the query was succesful or not, if you log into the Influx CLI

1) use _internal
2) select * from cq order by desc limit 5

checkcq

If it is failing, then it could be that the query is taking longer to finish that the resample time. As in, you resample every minute but the query might take 1 minute 10 seconds. In which case the query will never complete.

Unfortunately you can’t edit a CQ once it’s been defined, so you might have to remove the current one and play around a little with different time settings.

thank you @philb.
but i have checked and that’s not the case… it takes only takes 5-10 seconds when i run the select query for now() to now()-10m time range to populate the m1_back measurement.
is there any log where i can check what really happened when the continuous query ran?
i have set log-enabled = true in the influxdb.conf file

i am actually fetching three month time range data into a measurement and for the data that is older than 1 month i want to change the granularity to 1m(which originally is 10s). can i do both of these task through one CQ.
i.e.
fetch all the data that lies between now() and now()-90d as it is and set the granularity for data between now()-30d to now()-90d to 1m.