-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dot/babe) implement block production time metric (#1648)
* metric: gossamer_proposer_block_constructed * chore: improve metrics instance and add tests * chore: add peer check and peerstore metrics * chore: fix pacakge name and interface to gauge struct * chore: change to const * chore: adjust babe metrics * chore: removing duplicated net metrics * chore: improve babe time to build block test * chore: fix CI tests failures * exec go mod tidy * chore: go mod * change docker-compose instructions to docs/ folder
- Loading branch information
1 parent
51cfcd7
commit 23007f0
Showing
13 changed files
with
382 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3.7' | ||
|
||
services: | ||
prometheus: | ||
image: prom/prometheus | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.path=/prometheus' | ||
- '--web.console.libraries=/usr/share/prometheus/console_libraries' | ||
- '--web.console.templates=/usr/share/prometheus/consoles' | ||
ports: | ||
- 9090:9090 | ||
restart: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
layout: default | ||
title: Using Prometheus | ||
permalink: /integrate/using-prometheus/ | ||
--- | ||
|
||
# Using Prometheus Locally | ||
|
||
To get started with Prometheus locally make sure you have installed [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/). | ||
|
||
The docker-compose.yml file has, currently, the Prometheus to collect metrics, so to start that service you can execute (in the project root folder): | ||
|
||
``` | ||
docker-compose up (-d to disatach the terminal) | ||
or | ||
docker-compose up prometheus (-d to disatach the terminal) | ||
``` | ||
|
||
the above command will starts the Prometheus service on `0.0.0.0:9090`. | ||
|
||
### Prometheus | ||
|
||
Actually the Prometheus service reads a file `prometheus.yml` placed in the root level project folder, this file contains the definitions that Prometheus needs to collect the metrics. | ||
|
||
Linux: In the **job_name == gossamer** the **targets** property should be `[localhost:9876]` | ||
|
||
To publish metrics from the node use the flag **--publish-metrics**; i.e, `./bin/gossamer --chain {chain} --key {key} --publish-metrics` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.