0
0
Microservicessystem_design~20 mins

Dashboards (Grafana) in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Grafana Dashboard Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the output of this Grafana query?
Given a Prometheus query in Grafana:
sum(rate(http_requests_total[5m])) by (service)
What does this query show on the dashboard?
AThe current number of active HTTP connections per service.
BThe total count of HTTP requests for all services since the server started.
CThe error rate of HTTP requests per service over the last 5 minutes.
DThe total number of HTTP requests per service over the last 5 minutes, averaged per second.
Attempts:
2 left
💡 Hint
Think about what 'rate' and 'sum by' do in Prometheus queries.
Configuration
intermediate
2:00remaining
Which Grafana configuration snippet correctly sets up a Prometheus data source?
Select the correct YAML snippet to configure a Prometheus data source in Grafana's provisioning files.
A
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://prometheus:9090
    isDefault: true
B
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://prometheus:8080
    isDefault: true
C
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://localhost:8080
    isDefault: true
D
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: direct
    url: https://prometheus:9090
    isDefault: false
Attempts:
2 left
💡 Hint
Check the apiVersion, URL port, and access mode for Prometheus defaults.
🔀 Workflow
advanced
2:00remaining
Order the steps to create a new Grafana dashboard for microservices metrics
Arrange these steps in the correct order to create a new Grafana dashboard displaying microservices metrics.
A1,2,3,4
B3,2,1,4
C1,3,2,4
D2,1,3,4
Attempts:
2 left
💡 Hint
Think about the natural flow from login to saving the dashboard.
Troubleshoot
advanced
2:00remaining
Why does this Grafana panel show 'No data' for a valid Prometheus query?
A Grafana panel with a Prometheus query returns 'No data' even though the query works in Prometheus UI. What is the most likely cause?
AThe Grafana user does not have permission to view the dashboard.
BThe query syntax is invalid in Grafana but valid in Prometheus UI.
CThe Prometheus data source URL in Grafana is incorrect or unreachable.
DThe panel refresh interval is set to a very high value.
Attempts:
2 left
💡 Hint
Check connectivity between Grafana and Prometheus.
Best Practice
expert
2:00remaining
Which practice improves Grafana dashboard performance for microservices monitoring?
Choose the best practice to optimize Grafana dashboards that monitor many microservices with high metric volume.
AIncrease dashboard refresh rate to update data every second.
BUse templating variables to filter services and reduce displayed data.
CAdd many panels with detailed queries for each microservice.
DDisable caching to always show the latest data.
Attempts:
2 left
💡 Hint
Think about reducing data load and improving usability.