
Monitoring & Prometheus
Metrics collection, PromQL, exporters, Alertmanager, Grafana integration, troubleshooting missing metrics
1What is a Counter metric type in Prometheus?
What is a Counter metric type in Prometheus?
답변
A Counter is a metric that can only increase or be reset to zero on restart. It is ideal for counting cumulative events like HTTP requests, errors, or processed messages. To calculate a rate of change, use the PromQL rate() or irate() function which automatically handles resets.
2What is the default metric collection model used by Prometheus?
What is the default metric collection model used by Prometheus?
답변
Prometheus uses a pull model where the server actively scrapes metrics from targets at defined regular intervals. This model centralizes configuration, easily detects down targets, and prevents applications from overloading the server. The push gateway exists for ephemeral jobs but represents an exceptional pattern, not the norm.
3What is an exporter in the Prometheus ecosystem?
What is an exporter in the Prometheus ecosystem?
답변
An exporter is a component that exposes metrics from third-party systems in Prometheus format. It translates native metrics from applications like MySQL, Redis, or NGINX into compatible metrics accessible via HTTP. Official exporters follow strict naming conventions and are maintained by the Prometheus community.
What is the main difference between a Gauge and a Counter?
What is the /metrics endpoint used for in an instrumented application?
+19 면접 질문