prysm-pulse/shared/prometheus
Preston Van Loon 5eb5f6afa9
Faucet enhancements + cluster private key management system (#1679)
* second pass at faucet, no rate limiting yet

* Add authentication support, step 1. This stuff needs to be refactored and tested

* move deposit input to keystore pkg, add proof of possession and withdrawal addr

* checkpoint on progress with cluster private key manager

* checkpoint w/ bootnode config

* checkpoint

* resolve todo

* encrypt the secrets

* add note about querying testnet

* workspace

* checkpoitn

* remove limits

* update

* checkpoint

* checkpoint

* remove jwt stuff

* fix build

* lint

* lint

* remove init

* remove jwt

* update

* checkpoint
2019-03-07 11:14:57 -05:00
..
BUILD.bazel Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
logrus_collector_test.go Health check endpoints for services (#1183) 2018-12-30 16:20:43 -05:00
logrus_collector.go Added Prometheus Client and p2p Metrics (#673) 2018-11-15 07:54:45 -05:00
README.md Added Prometheus Client and p2p Metrics (#673) 2018-11-15 07:54:45 -05:00
service_test.go Health check for Prometheus service (#1320) 2019-01-23 17:26:25 -08:00
service.go Health check for Prometheus service (#1320) 2019-01-23 17:26:25 -08:00
simple_server.go Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00

How to monitor with prometheus

Prerequisites:

Start scrapping services

To start scrapping with prometheus you must create or edit the prometheus config file and add all the services you want to scrap, like these:

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
    monitor: 'codelab-monitor'

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s

    static_configs:
      - targets: ['localhost:9090']
+  - job_name: 'beacon-chain'
+    static_configs:
+      - targets: ['localhost:8080']

After creating/updating the prometheus file run it:

$ prometheus --config.file=your-prometheus-file.yml

Now, you can add the prometheus server as a data source on grafana and start building your dashboards.

How to add additional metrics

The prometheus service export the metrics from the DefaultRegisterer so just need to register your metrics with the prometheus or promauto libraries. To know more Go application guide