hello there! A query question. Do you know if it is possible to sum the total sum of two independent measurements in a single query? For instance, for query
select sum(value) from metric_1_traffic_in,metric_2_traffic_in where time > now() - 1h ; the following is returned:
name: metric_1_traffic_in time sum ---- --- 1573034400000000000 308346.88 name: metric_2_traffic_in time sum ---- --- 1573034400000000000 150405.12000000002
Is there a way to have 308346.88 + 150405.12000000002 in a single result row?
Hello All ! I’d like to understand what would be the efficient query to filter a large number of tag values while performing a group by . Here’s an example
Let’s assume we have 5000 hosts which have telegraf running and all of them send their metrics to an influxdb located elsewhere . Lets take the “CPU” telegraf metric for example . Now I’d like to fetch the average CPU consumed for a list of hosts which can be say around 300 . Now “host” is a tag for each metric which is unique for each host.
What would be the most efficient way to query influx to just get the average cpu for the last 1 day for 300 specific hosts?
Lets say the tag values for host are host1,host2,host3 etc
I currently know of only 2 methods
1) Just chain the OR statements
select mean(usage_system) from cpu where time > now() - 1d where host=‘host1’ or host=‘host2’ or … (for 300 hosts) group by host
select mean(usage_system) from cpu where time > now() - 1d where host ~= /host1|host2|host3|…(300hosts)/ group by host
I find both of them highly inefficient . Is there a better way to do this?
client.WriteAPItakes org, bucket but not sure, doesn't seem necessary?
Hi, I've restarted influxdb and the port has changed from 8086 to 8086. This is my code in influxdb.conf `[http]
enabled = true
flux-enabled = true
bind-address = ":8086"
realm = "InfluxDB"
How can I use again the port 8086? I cannot use it now (it is not accepted as data source in Grafana ("Bad gateway")
I have a terraform 0.11 Project
In that I use the influxdb Provider and I'm able to download and install the provider through it
Currently I'm upgrading my project to terraform 1.0 when I do terraform init the influxdb provider is not found in the hashicorp registry
I check online on registry.hashicorp.io I wasn't able to find the influxdb verfied provider.
Newly started using Flux and am prototyping queries using curl and the /api/v2
It was fast work to adapt the examples in the docs to compose useful queries, however I want to perform string manipulation (which is why I stated with Flux) now and need to import functions (as shown int he docs but with no context AFAICS).
Could some please pass me the syntax for this as I have searched and not been able to find where a working example is 🤷♂️