First commit

This commit is contained in:
2024-07-12 17:37:06 +02:00
commit 03b2a0eaef
12 changed files with 132520 additions and 0 deletions
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/bash
curl -i -X POST "http://192.168.1.68:8086/api/v2/query?bucket=tcp_metrics&orgID=f32d493484526abc" \
--header "Authorization: Token $1" \
--header "Accept: application/csv" \
--header "Content-Type: application/vnd.flux" \
--data 'from(bucket: "tcp_metrics")
|> range(start: -5m)
|> filter(fn: (r) => r["_measurement"] == "tcp_reset")
|> filter(fn: (r) => r["host"] == "127.0.0.1")
|> filter(fn: (r) => r["_field"] == "value")
|> yield(name: "mean")'
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/bash
curl -i -X POST "http://localhost:8086/api/v2/write?bucket=tcp_metrics&orgID=392fcb79fc296d8e" \
--header "Authorization: Token $1" \
--data "cpu_load_short,host=server01, value=1"