Skip to content

Commit

Permalink
Complete VM stack
Browse files Browse the repository at this point in the history
  • Loading branch information
faraonc committed May 11, 2023
1 parent 093085c commit 94a32e7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# vmc-monitor
Scrape basic metrics from a VM and containers running in it for monitoring

## Update the following if you are using VictoriaMetrics
### `docker-compose.yaml
```yaml
- "--remoteWrite.url=<DEFINE_ME>"
- '--remoteWrite.basicAuth.password="<DEFINE_ME>"'
- '--remoteWrite.basicAuth.username="<DEFINE_ME"'
```
### `vmagent.yaml
```yaml
external_labels: # add labels e.g.
machine_origin: my-machine
foo: bar
```
21 changes: 8 additions & 13 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
version: '3.8'

networks:
monitoring:
driver: bridge

services:
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.0
container_name: cadvisor
restart: unless-stopped
ports:
- 8080:8080
- "8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
Expand Down Expand Up @@ -38,13 +34,12 @@ services:
image: victoriametrics/vmagent:v1.90.0
restart: always
ports:
- 8429:8429
- "8429:8429"
volumes:
- <DEFINE_ME>:/vmagentdata
- ./vmagent.yaml.yml:/etc/prometheus/vmagent.yml
- ./vmagentdata:/vmagentdata
- ./vmagent.yaml:/etc/prometheus/vmagent.yaml
command:
- "--promscrape.config=/etc/prometheus/vmagent.yml"
- "--remoteWrite.url=<DEFINE ME>"



- "--promscrape.config=/etc/prometheus/vmagent.yaml"
- "--remoteWrite.url=<DEFINE_ME>"
- '--remoteWrite.basicAuth.password="<DEFINE_ME>"'
- '--remoteWrite.basicAuth.username="<DEFINE_ME>"'
5 changes: 2 additions & 3 deletions vmagent.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
global:
scrape_interval: 10s

scrape_interval: 15s
scrape_configs:
- job_name: 'vmagent'
static_configs:
- targets: ['vmagent:8429']
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8880']
- targets: ['cadvisor:8080']
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']

0 comments on commit 94a32e7

Please sign in to comment.