local dashboard_url="http://$(${kubectl} get -o json pod influx-grafana | grep hostIP | awk'{print $2}' | sed's/[,|\"]//g')"
echo"waiting for monitoring pods to be scheduled."
echo
for i in`seq 1 10`;do
echo"Grafana dashboard will be available at $dashboard_url. Wait for the monitoring dashboard to be online."
grafana_host=$("${kubectl}" get pods -lname=influxGrafana -o template -t{{range.items}}{{.currentState.hostIP}}:{{end}})
echo"Use the master user name and password for the dashboard."
if[[$grafana_host!=*"<"*]];then
echo
break
fi
sleep 10
done
if[[$grafana_host!=*"<"*]];then
echo
echo-e"${color_green}Grafana dashboard will be available at ${color_yellow}http://$grafana_host${color_green}. Wait for the monitoring dashboard to be online.${color_norm}"
echo
else
echo-e"${color_red}monitoring pods failed to be scheduled.${color_norm}"
fi
else
else
echo"Failed to Setup Monitoring"
echo-e"${color_red}Failed to Setup Monitoring ${color_norm}"
teardown-monitoring
teardown-monitoring
fi
fi
fi
fi
...
@@ -776,9 +778,10 @@ function teardown-monitoring {
...
@@ -776,9 +778,10 @@ function teardown-monitoring {