0
0
Dockerdevops~10 mins

Grafana dashboards for containers in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to start a Grafana container with the default port exposed.

Docker
docker run -d -p [1]:3000 grafana/grafana
Drag options to blanks, or click blank then click option'
A9090
B8080
C5000
D3000
Attempts:
3 left
💡 Hint
Common Mistakes
Using a port other than 3000 without mapping correctly.
Forgetting to expose the port with -p.
2fill in blank
medium

Complete the command to start Prometheus container for monitoring Docker containers.

Docker
docker run -d -p 9090:[1] prom/prometheus
Drag options to blanks, or click blank then click option'
A8080
B3000
C9090
D9100
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong port number for Prometheus.
Confusing Prometheus port with Grafana port.
3fill in blank
hard

Fix the error in the command to run Grafana with a volume for persistent data.

Docker
docker run -d -p 3000:3000 -v [1]:/var/lib/grafana grafana/grafana
Drag options to blanks, or click blank then click option'
A/home/user/grafana_data
B/var/lib/grafana
C/grafana/data
D/etc/grafana
Attempts:
3 left
💡 Hint
Common Mistakes
Using container paths as host paths.
Using non-existent host directories.
4fill in blank
hard

Fill both blanks to create a Docker network and run Grafana attached to it.

Docker
docker network [1] my-net && docker run -d --network [2] -p 3000:3000 grafana/grafana
Drag options to blanks, or click blank then click option'
Acreate
Bconnect
Cmy-net
Dbridge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'connect' instead of 'create' to make the network.
Mismatching network names.
5fill in blank
hard

Fill all three blanks to run Prometheus with a config file and attach it to a network.

Docker
docker run -d --name prometheus --network [1] -p 9090:9090 -v [2]:/etc/prometheus/prometheus.yml prom/prometheus --config.file=[3]
Drag options to blanks, or click blank then click option'
Amonitor-net
B/home/user/prometheus.yml
C/etc/prometheus/prometheus.yml
D/var/lib/prometheus
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong network names.
Mounting directories instead of the config file.
Incorrect config file path in the command.