prometheus extraction script
This commit is contained in:
parent
989378fd27
commit
c22627946a
1 changed files with 10 additions and 0 deletions
10
technikzeugs/scripts/prometheus_extract.sh
Normal file
10
technikzeugs/scripts/prometheus_extract.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# script um aus dem prometheus daten zu holen
|
||||||
|
# korrekte url zu prometheus eintragen
|
||||||
|
# start und end an das momentane jahrhundert anpassen
|
||||||
|
# step ist in sekunden
|
||||||
|
curl --data-urlencode 'query=rate(node_network_transmit_bytes_total{job="router", device="ifb0", instance="192.168.123.0:9100"}[5m])' \
|
||||||
|
--data-urlencode 'start=2021-05-01T00:00:00Z' \
|
||||||
|
--data-urlencode 'end=2021-06-01T0:00:00Z' \
|
||||||
|
--data-urlencode 'step=300' \
|
||||||
|
http://localhost:9999/api/v1/query_range | jq '.data.result[0].values[] | @csv' -r
|
Loading…
Reference in a new issue