0
0
Prompt Engineering / GenAIml~10 mins

Monitoring and observability in Prompt Engineering / GenAI - Interactive Code Practice

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

Complete the code to start Prometheus server using Docker.

Prompt Engineering / GenAI
docker run -d -p 9090:9090 [1] prometheus
Drag options to blanks, or click blank then click option'
A--name
B--rm
C-v
D-it
Attempts:
3 left
💡 Hint
Common Mistakes
Using -it which is for interactive mode, not needed here.
Using --rm which removes the container after exit, not suitable for a server.
2fill in blank
medium

Complete the command to check the status of a systemd service named 'node_exporter'.

Prompt Engineering / GenAI
systemctl [1] node_exporter
Drag options to blanks, or click blank then click option'
Astart
Bstop
Cstatus
Denable
Attempts:
3 left
💡 Hint
Common Mistakes
Using start or stop which change the service state instead of showing status.
Using enable which sets the service to start on boot.
3fill in blank
hard

Fix the error in the Prometheus scrape config to monitor a target on port 9100.

Prompt Engineering / GenAI
scrape_configs:
  - job_name: 'node'
    static_configs:
      - targets: ['localhost[1]9100']
Drag options to blanks, or click blank then click option'
A;
B:
C,
D.
Attempts:
3 left
💡 Hint
Common Mistakes
Using comma or semicolon which are invalid separators here.
Using dot which is for domain names, not ports.
4fill in blank
hard

Fill both blanks to create a Grafana dashboard query filtering CPU usage above 80%.

Prompt Engineering / GenAI
cpu_usage > [1] and instance = '[2]'
Drag options to blanks, or click blank then click option'
A80
Binstance1
C75
Dnode_exporter
Attempts:
3 left
💡 Hint
Common Mistakes
Using 75 instead of 80 for the threshold.
Using 'node_exporter' instead of the instance name.
5fill in blank
hard

Fill all three blanks to define an alert rule for high memory usage in Prometheus.

Prompt Engineering / GenAI
alert: HighMemoryUsage
expr: memory_usage_bytes [1] [2]
for: [3]m
Drag options to blanks, or click blank then click option'
A>
B8000000000
C5
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using less than operator which triggers alert incorrectly.
Using too short or too long duration for 'for' field.