Do you want to monitor your Docker Contianer on your VM/Server? You can use this method.
- Prometheus
- Grafana
- Docker
- Create
daemon.json
touch /etc/docker/daemon.json
nano /etc/docker/daemon.json
- Fill with this
{
"metrics-addr" : "0.0.0.0:9323",
"experimental" : true
}
nano /etc/prometheus/prometheus.yml
- job_name: 'docker'
scrape_interval: 5s
metrics_path: /metrics
static_configs:
- targets: ['XXX.XXX.XXX.XXX:9323']
You can use docker.json
like the template below.