Skip to content

Example using Gin Framework, Prometheus, Grafana, and Google Cloud Platform.

License

Notifications You must be signed in to change notification settings

leozz37/iot-monitoring-gcp-grafana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitoring IoT devices data with Golang, Google Cloud Platform and Grafana

cover

This repository is a complement to my medium article. If you wanna follow step by step, check my writing.

Architecture

This is how our infrastructure works:

architecture

Golang

Running:

$ go run pubsub.go

Running Dockerfile:

$ docker build . -t metrics-exporter

$ docker run -p 2112:2112 metrics-exporter

Deploying to Google Cloud Run:

$ gcloud builds submit --tag gcr.io/$PROJECT_ID/metrics-exporter

$ gcloud run deploy metrics-exporter --image gcr.io/$PROJECT_ID/metrics-exporter --region $REGION --platform managed --allow-unauthenticated --port 2112

Prometheus

Running Dockerfile:

$ docker build . -t prometheus

$ docker run -p 9090:9090 prometheus

Deploying to Google Cloud Run:

$ gcloud builds submit --tag gcr.io/$PROJECT_ID/prometheus

$ gcloud run deploy prometheus --image gcr.io/$PROJECT_ID/prometheus --region $REGION --platform managed --allow-unauthenticated --port 9090

Grafana

Running Dockerfile:

$ docker build . -t grafana

$ docker run -p 3000:3000 grafana

Deploying to Google Cloud Run:

$ gcloud builds submit --tag gcr.io/$PROJECT_ID/grafana

$ gcloud run deploy grafana --image gcr.io/$PROJECT_ID/grafana --region $REGION --platform managed --allow-unauthenticated --port 3000

About

Example using Gin Framework, Prometheus, Grafana, and Google Cloud Platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published