revision
This commit is contained in:
17
influxdb/get_nginx_hosts.flux
Normal file
17
influxdb/get_nginx_hosts.flux
Normal file
@@ -0,0 +1,17 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
v = {
|
||||
"timeRangeStart": 2023-06-15T14:44:00Z,
|
||||
"timeRangeStop": 2023-06-18T14:44:00Z
|
||||
}
|
||||
httpHosts = ["git.limbosolutions.com"]
|
||||
bucket = "telegraf"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
measurement = "nginx_access-logv3"
|
||||
from(bucket: "${bucket}")
|
||||
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
||||
|> filter(fn: (r) => r["_measurement"] == measurement and r["_field"] == "nginx_host")
|
||||
|> keep(columns: ["_value"])
|
||||
|> distinct()
|
||||
|
||||
Reference in New Issue
Block a user