dcounter

command
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 16 Imported by: 0

README

Example - dCounter

Prerequisite

  • go 1.18+
  • prometheus
  • grafana

Instructions

git clone https://github.com/singyiu/go-libp2p-dmetric.git
cd go-libp2p-dmetric/examples/dcounter

start libp2p node that would publish a counter metric

go run main.go

start libp2p node that would collect metrics and publish to prometheus (localhost:2112)

go run main.go -role=collector

edit prometheus.yml and add the following to the scrap_configs:

   - job_name: 'go-libp2p-dmetric-examples-dcounter'
     static_configs:
       - targets: ['localhost:2112']

run Prometheus and visualize the metrics in Grafana grafana_screenshot_01

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL