giantswarm/prometheus

is grafana dashboard UI on localhost:3000?

ramdhakne opened this issue · 8 comments

is grafana dashboard UI on localhost:3000?

No UI on localhost:3000, what I am missing here?

Rams-MacBook-Pro:k8smonitoring ram.dhakne$ sudo kubectl get pods --namespace=monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-64fd9d59f9-vsv9g 1/1 Running 1 40m
grafana-core-5cf6b555cc-x27p9 1/1 Running 1 40m
kube-state-metrics-568457dff4-49blf 1/1 Running 1 40m
kube-state-metrics-568457dff4-dq65c 1/1 Running 1 40m
node-directory-size-metrics-s7zv6 2/2 Running 2 40m
prometheus-core-79648bf5cc-kp4t9 1/1 Running 1 40m
prometheus-node-exporter-9xwm2 1/1 Running 1 40m

...
...
Normal SuccessfulMountVolume 5m kubelet, minikube MountVolume.SetUp succeeded for volume "grafana-persistent-storage"
Normal SuccessfulMountVolume 5m kubelet, minikube MountVolume.SetUp succeeded for volume "default-token-2w6fv"
Normal SandboxChanged 5m kubelet, minikube Pod sandbox changed, it will be killed and re-created.
Normal Pulled 5m kubelet, minikube Container image "grafana/grafana:4.2.0" already present on machine
Normal Created 4m kubelet, minikube Created container
Normal Started 4m kubelet, minikube Started container

No UI on localhost:3000, what I am missing here?

If you are running it in minkube you have to expose the grafana service (Nodeport type) or run a kubectl proxy

i had run kubectl proxy
when i visit http://localhost:8001/api/v1/namespaces/monitoring/services/grafana:3000
i get result

{
	"kind": "Status",
	"apiVersion": "v1",
	"metadata": {},
	"status": "Failure",
	"message": "services \"grafana:3000\" not found",
	"reason": "NotFound",
	"details": {
		"name": "grafana:3000",
		"kind": "services"
	},
	"code": 404
}

how can i visit grafana dashboard UI ?

@jerrwy you should use this URL for proxy after the run of kubectl proxy

http://127.0.0.1:8001/api/v1/namespaces/monitoring/services/http:grafana:/proxy

In that way you are calling service http:grafana and you are asking a proxy on it

If you still have problems another approach is to go directly to pod without proxy

Run
kubectl port-forward $(kubectl get pods --selector=app=grafana -n monitoring --output=jsonpath="{.items..metadata.name}") -n monitoring 9200:3000

and then go to

http://localhost:9200

thx! it worked!

how can i visit prometheus targets in kubectl proxy?
i have try http://127.0.0.1:8001/api/v1/namespaces/monitoring/services/http:prometheus:/proxy
but return result

{
	"kind": "Status",
	"apiVersion": "v1",
	"metadata": {},
	"status": "Failure",
	"message": "no endpoints available for service \"http:prometheus:\"",
	"reason": "ServiceUnavailable",
	"code": 503
}

thx~ i am use kubectl port-forward command visit prometheus targets now

Yeah, port forward should be the way in case you don't expose it through an ingress resource. Adding this info in the readme