Managed prometheus port forward | C2C Community
Solved

Managed prometheus port forward


Userlevel 1

Dear Team,

I’ve installed the managed prometheus setup and trying to setup the promethus and grafana but while executing the port forwarding command to 3000 getting the port is already in use which is cloud shell service is running on that. How do I moved the cloud shell service on different port.

icon

Best answer by yuval 7 July 2022, 23:55

View original

11 replies

Userlevel 7
Badge +58

I thought that Cloud Shell is on port 8080 and not 3000.

Can you tell us more about your setup? Like is it CE, GKE… your config

Userlevel 4
Badge +3

Hello @rishi1101 . 

 

When you set up managed Prometheus it sends the data to Google Cloud Monitoring and you can view the metrics there.

 

If you want to use the Grafana from your GKE cluster, try using the following command:

kubectl port-forward service/grafana :3000

kubectl will choose a free port on your local machine.

Userlevel 7
Badge +15

Thanks for getting that, @yuval

@rishi1101, does @yuval’s answer help you? :) 

Userlevel 1

Thanks @dimitra_k and @yuval for your response.

In my project web VS is already bind on port 3000. So I’m getting the error while apply the grafana.yaml file then I edit the grafana.yaml file and put the port no 3400 and after execute the port forward command I got the attached error. Could you please help me to resolve the error.

 

Userlevel 4
Badge +3

@rishi1101 can you please share the grafana service and deployments yaml files?

Userlevel 1

Hi @yuval,

PFA attached grafana.yaml, frontend.yaml and error snap.

frontend.yaml grafana.yaml

Userlevel 1

@yuval 

In my project the cloud shell web VS already configured with port 3000 so I’m unable to use the same port for grafana service.

 

Userlevel 1

@yuval 

The issue got resolved now after I forward the localhost 8080 port to 3000 port using below command.

Thanks for your suuport

kubectl -n gmp-test port-forward svc/grafana 8080:3000

Userlevel 7
Badge +15

Glad to know you solved the problem @rishi1101 and thanks for sharing the solution as well! 

 

@yuval thank you also for jumping in! 

Userlevel 1

Thanks @yuval and @Dimitris Petrakis for your support as well. ✌🏼🙃

Userlevel 7
Badge +15

@rishi1101 pleasure! Please also do not forget to introduce yourself in the C2C Lounge using this template! It would be great for all of us to get to know you better :)

 

Good morning from Greece! 😎

Reply