Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ Once started, you will see the following applications:
* Grafana - http://localhost:3000 - default creds can be see in `./config/grafana/grafana.ini`
* Service discovery - http://localhost:8000

After 5-10 minutes you should see targets discovered in prometheus on the [targets page](http://localhost:9090/targets?search=). Initially, they might apear in red and if you keep monitoring they should
slowly start getting blue, which means that the targets are successfuly scraped.
After 5-10 minutes you should see targets discovered in victoria on the [targets page](http://localhost:8428/targets).
Initially, they might apear in red and if you keep monitoring they should
slowly start getting green, which means that the targets are successfuly scraped.

You should also see some data incoming in the grafana [sample dashboard for the
node exporter](http://localhost:3000/d/1/node-exporter?orgId=1&from=now-3h&to=now&timezone=utc&var-datasource=prometheus&var-instance=$__all&var-diskdevice=%5Ba-z%5D%2B%7Cnvme%5B0-9%5D%2Bn%5B0-9%5D%2B%7Cmmcblk%5B0-9%5D%2B).
Expand All @@ -138,12 +139,12 @@ the other ones that contain `severity: warning` with `severity: critical`.

To access the stack remotely you can do the following:
```bash
ssh -L 3000:localhost:3000 -L 9090:localhost:9090 -L 8000:localhost:8000 <machine-with-obs-stack>
ssh -L 3000:localhost:3000 -L 8428:localhost:8428 -L 8000:localhost:8000 <machine-with-obs-stack>
```

Example command with all parameters:
```bash
ssh -L 3000:localhost:3000 -L 9090:localhost:9090 -i ~/.ssh/priv_key.pem myuser@192.168.15.15
ssh -L 3000:localhost:3000 -L 8428:localhost:8428 -i ~/.ssh/priv_key.pem myuser@192.168.15.15
```

## Extending
Expand Down Expand Up @@ -202,11 +203,11 @@ curl http://localhost:8000/prom/targets?node_provider_id=<node-provider-id>&dc_i
*NOTE*: The initial sync of service discovery may take up to 15 minutes! Syncing
will be clearly logged in the multiservice discovery.

### Prometheus
### Victoria

#### No targets visible in targets view

If you don't see anything in the [prometheus targets view](http://localhost:9090/targets?search=),
If you don't see anything in the [prometheus targets view](http://localhost:8428/targets?search=),
that means that prometheus failed to receive targets from the service discovery.

To check the logs run:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ datasources:
uid: prometheus
type: prometheus
access: proxy
url: http://$PROM_HOST:9090
url: http://$PROM_HOST:8428
jsonData:
httpMethod: POST
1 change: 0 additions & 1 deletion docker/config/prometheus/config-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ anchors:
http_configs: &http_configs
http_sd_configs:
- url: http://multiservice-discovery:8000/prom/targets
refresh_interval: 15s

global:
# Change this to control how frequently prometheus
Expand Down
14 changes: 7 additions & 7 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ services:
volumes:
- ./volumes/msd:/msd

prometheus:
image: quay.io/prometheus/prometheus:v2.51.1
victoria:
image: victoriametrics/victoria-metrics:v1.129.1
network_mode: host
volumes:
- ./config/prometheus:/config
- ./volumes/prometheus/:/prometheus
- ./volumes/victoria/:/victoria
command:
- --config.file
- /config/config.yaml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=6m
- --promscrape.config=/config/config.yaml
- --storageDataPath=/victoria
- --retentionPeriod=6
- --enableTCP6
user: "${UID}:${GID}"
deploy:
resources:
Expand Down
File renamed without changes.