mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 00:05:19 -07:00
* prometheus: cleanup README * prometheus: use new disk folder to make upgrading seamless * undo whitespace change * prometheus: add back docker.rules
36 lines
893 B
Markdown
36 lines
893 B
Markdown
# Prometheus configuration
|
|
|
|
This directory contains configuration for the [Prometheus](https://prometheus.io/) metrics deployment.
|
|
|
|
This directory is mounted into the `prometheus` container. After making your changes to this directory,
|
|
simply `docker restart prometheus` for your changes to take effect (depending on your change, Prometheus
|
|
may respond to it as soon as you save the file).
|
|
|
|
You can add `_rules.yml` and `_targets.yml` files to this directory and they will be picked up automatically.
|
|
|
|
### Docker metrics scraping
|
|
|
|
To scrape Docker itself for metrics, add the following file depending on your host machine OS:
|
|
|
|
#### Linux
|
|
|
|
Create `prometheus/docker_targets.yml`:
|
|
|
|
```yaml
|
|
- labels:
|
|
job: docker
|
|
targets:
|
|
- localhost:9323
|
|
```
|
|
|
|
#### Mac & Windows
|
|
|
|
Create `prometheus/docker_targets.yml`:
|
|
|
|
```yaml
|
|
- labels:
|
|
job: docker
|
|
targets:
|
|
- host.docker.internal:9323
|
|
```
|