Giter Club home page Giter Club logo

go-grpc-prometheus-demo's Introduction

go-grpc-prometheus-demo

This repository contains the demo of using go-grpc-prometheus.
The Client of gRPC and also the server outputs metrics, and monitoring metrics by using the Grahana.

How to start demo

The demo are built up by Docker Compose, so that you have to install the Docker Compose.

Step 1

Containers is begin, after using the following make command.

$ make start

Begin to run containers are:

  • Prometheus localhost:9090
  • Server of gRPC localhost:8080
  • Client of gRPC localhost:8081
  • Grafana localhost:3000

Step 2

After starting containers, you are able to access following url and to send request to server from client of gRPC.

$ curl -XGET 'http://localhost:8081/echo?m=message'
Response: echo message%

The gRPC connection of demo is simple unary RPCs.

Step 3

After sending any requests, you are able to monitoring of metrics at dashboard of Prometheus.

Navigate to http://localhost:9090/graph and From insert metric at cursor menu, choose grpc_client_msg_sent_total and grpc_server_msg_sent_total and so on after will see metrics of gRPC.

Step 4

Step 4 is setup Grafana.

Navigate to http://localhost:3000/login and login with admin user.

  • User: admin
  • Password: admin

From the Grafana menu, choose Data Sources and click Add data source, then input by using the following values.

  • Name: prometheus
  • Type: prometheus
  • Url: http://localhost:9090
  • Access: direct

At last you can import the dashboard templates from the grafana directory from this repository. From the Grafana menu, choose Dashboards and click on Import.

Other

If you want to stop containers, you can use following make command.

$ make stop

go-grpc-prometheus-demo's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.