Skip to main content

Metrics

Sig also has a metric server to monitor activity.

Setup

requirements:

  • docker compose
  • Either MacOS or Linux supported

modify /etc/hosts to include the following line:

127.0.0.1 prometheus

Running

  • Mac: docker compose -f compose-mac.yaml up -d
  • Linux: docker compose -f compose-linux.yaml up -d

  • Grafana will be accessable on localhost:3000
  • Prometheus will be accessable on localhost:9090
  • Sig metrics will be published to localhost:12345 (if you change this on the sig cli, you will need to also modify the prometheus target to point to the different port).

Shutting down

  • mac: docker compose -f compose-mac.yaml down
  • linux: docker compose -f compose-linux.yaml down

Structure

.
├── compose-linux.yaml
├── compose-mac.yaml
├── grafana
│   └── dashboards/ -- this is where the sig dashboard lives (will need to copy .json export of dashboard from running container and push through git for any dashboard changes)
│   └── datasources/ -- this points to prometheus docker
├── prometheus
│   └── prometheus.yml
└── README.md

compose.yaml

services:
prometheus:
image: prom/prometheus
...
ports:
- 9090:9090
grafana:
image: grafana/grafana
...
ports:
- 3000:3000

The compose file defines a stack with two services prometheus and grafana.

Make sure the ports 9090 and 3000 on the host are not already in use.