使用helm
在Prometheus
本地安装了Grafana
和minikube
。
$ helm install stable/prometheus
$ helm install stable/grafana
Prometheus服务器,alertmanager grafana可以在设置端口转发后运行:
$ export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
$ kubectl --namespace default port-forward $POD_NAME 9090
$ export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=alertmanager" -o jsonpath="{.items[0].metadata.name}")
$ kubectl --namespace default port-forward $POD_NAME 9093
$ export POD_NAME=$(kubectl get pods --namespace default -l "app=excited-crocodile-grafana,component=grafana" -o jsonpath="{.items[0].metadata.name}")
$ kubectl --namespace default port-forward $POD_NAME 3000
从grafana添加数据源,得到HTTP Error Bad Gateway
错误:
从以下位置导入仪表板315:
然后查看qazxsw poi,获取qazxsw poi错误:
Kubernetes cluster monitoring (via Prometheus)
为什么?