1
0
mirror of https://github.com/metrico/qryn.git synced 2025-03-15 19:18:09 +00:00
2022-06-12 11:20:32 +00:00

16 lines
641 B
Bash
Executable File

#!/bin/bash
## Test Metrics for Loki/Qryn
DOMAINS=("up" "down" "left" "right")
for i in `seq 1 10`;
do
TIME=$(date --utc +%FT%T.%3NZ)
RANDOM=$$$(date +%s)
NAME=${DOMAINS[$RANDOM % ${#DOMAINS[@]}]}
echo "$NAME, $TIME"
curl --header "Content-Type: application/json" --request POST \
--data '{"streams": [{"labels": "{foo=\"bar\",name=\"'"$NAME"'\"}","entries": [{"ts": "'"$TIME"'", "line": "level=info string='"$RANDOM"'" }]}]}' \
'http://127.0.0.1:3100/loki/api/v1/push' &
done