mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #3079 from vishh/fix_monitoring
Improve monitoring e2e test.
This commit is contained in:
commit
6aa57e1573
@ -68,10 +68,12 @@ function cleanup {
|
||||
}
|
||||
|
||||
function influx-data-exists {
|
||||
local max_retries=10
|
||||
local retry_delay=30 #seconds
|
||||
local influx_ip=$("${KUBECTL}" get -o json pods influx-grafana | grep hostIP | awk '{print $2}' | sed 's/["|,]//g')
|
||||
local influx_url="http://$influx_ip:8086/db/k8s/series?u=root&p=root"
|
||||
if ! curl -G $influx_url --data-urlencode "q=select * from stats limit 1" \
|
||||
|| ! curl -G $influx_url --data-urlencode "q=select * from machine limit 1"; then
|
||||
if ! curl --retry $max_retries --retry-delay $retry_delay -G $influx_url --data-urlencode "q=select * from stats limit 1" \
|
||||
|| ! curl --retry $max_retries --retry-delay $retry_delay -G $influx_url --data-urlencode "q=select * from machine limit 1"; then
|
||||
echo "failed to retrieve stats from Infludb. monitoring test failed"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user