Hi,
I am using influx db and it has been great so far. I’m just a little confused about how the query count works. Usually if i run a query it will add 1 as it should. But when running this task, it adds 7 more queries ? We will be using tasks a lot with influx DB so it is important for us to understand how this task counts as 7 queries when we are not even querying from our buckets/measurements:
import "experimental/json"
import "experimental/http"
import "array"
option task = {name: "TableTest", every: 1h}
// option task_option = {name: "TableTest", every: 1h, offset: 0m}
// djangoUrl = "http://127.0.0.1:8000/projects/1/dashboard/cron/"
//
// response =
// http.get(
// url: djangoUrl,
// headers:
// {
// Authorization:
// "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjU3MzA4MjI5LCJpYXQiOjE2NTczMDA4NjcsImp0aSI6ImE1YjAzNWUyNGExMzQ3OWI5MmRhMzhlNmIwOTY5MDRmIiwidXNlcm5hbWUiOjF9.K1-sy0ZKkkpm0cDqXLanSfHiRCvIeYg746ukzTi_dGE",
// },
// )
//
// responseBody = response.body
//
seedRow = [{_time: now()}]
//
// body = json.parse(data: responseBody)
array.from(rows: seedRow)
|> map(
fn: (r) => {
return {r with _measurement: "battery_consumption",
_field: "power_output",
_value: 60,
}//body.value instead of 60 normalement
},
)
|> to(org: "vadimUS", bucket: "Project Test")
array.from(rows: seedRow)
|> map(
fn: (r) => {
return {r with _measurement: "solar_consumption", _field: "power_output", _value: 90}
},
)
|> to(org: "vadimUS", bucket: "Project Test")
array.from(rows: seedRow)
|> map(
fn: (r) => {
return {r with _measurement: "grid_consumption", _field: "power_output", _value: 70}
},
)
|> to(org: "vadimUS", bucket: "Project Test")
array.from(rows: seedRow)
|> map(
fn: (r) => {
return {r with _measurement: "building_consumption", _field: "power_output", _value: 80}
},
)
|> to(org: "vadimUS", bucket: "Project Test")
Is it because of the “from seed.row”?
Also another weird occurence is when I want to look at data in the ui right here:
For some reason last time I loaded data in there (1 time) it added 49 queries to the query count
Lastly, is there a way I can look at the query count without having to wait an hour between each update in the ui ? probably like a command I can run in the CLI?
Thanks a lot for your help, we really enjoy working with influx db.