| name | cloud-monitoring |
| description | Comprehensive observability and monitoring practices for cloud infrastructure and applications |
| category | cloud-computing |
Cloud Monitoring
What I Do
I provide comprehensive visibility into cloud infrastructure and applications through metrics collection, log aggregation, distributed tracing, and alerting. I enable teams to understand system behavior, detect anomalies, and maintain service reliability.
When to Use Me
- Monitoring production systems and infrastructure
- Troubleshooting application issues
- Setting up alerting and on-call procedures
- Implementing SLOs and SLIs
- Analyzing system performance
- Distributed systems observability
- Compliance and audit requirements
Core Concepts
- Metrics: Quantitative measurements (CPU, latency, error rates)
- Logs: Textual records of events and errors
- Traces: End-to-end request tracking across services
- Service Level Indicators (SLIs): Metrics measuring service behavior
- Service Level Objectives (SLOs): Target reliability thresholds
- Error Budgets: Allowed unreliability before action required
- Dashboards: Visual representation of metrics and status
- Alerting: Notifications when thresholds are breached
- Synthetic Monitoring: Proactive testing from external locations
- Distributed Tracing: Tracking requests across service boundaries
Code Examples
Prometheus Configuration (YAML):
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: ['alertmanager:9093']
rule_files:
- '/etc/prometheus/rules/*.yml'
scrape_configs:
- job_name: 'kubernetes-nodes'
kubernetes_sd_configs:
- role: node
relabel_configs:
- source_labels: [__address__]
regex: '(.*):10250'
target_label: __address__
replacement: '${1}:9100'
- job_name: 'kubernetes-services'
kubernetes_sd_configs:
- role: service
metrics_path: /metrics
relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
action: keep
regex: true
---
Grafana Dashboard (JSON):
{
"dashboard": {
"title": "Application Performance Overview",
"panels": [
{
"title": "Request Rate",
"type": "graph",
"targets": [
{
"expr": "sum(rate(http_requests_total{service=~\"$service\"}[5m])) by (method)",
"legendFormat": "{{ method }}"
}
],
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}
},
{
"title"
OpenTelemetry Collector (YAML):
receivers:
otlp:
protocols:
grpc:
http:
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['0.0.0.0:8888']
processors:
batch:
timeout: 1s
send_batch_size: 1024
memory_limiter:
check_interval: 1s
limit_mib: 1000
spike_limit_mib: 200
resource:
attributes:
- key: deployment.environment
value: production
action: upsert
exporters:
prometheusremotewrite:
endpoint: "https://prometheus-remote-write.example.com/api/v1/write"
tls:
insecure: false
otlp:
endpoint: "jaeger-collector:4317"
tls:
insecure: false
logging:
[]
[, , ]
[, ]
[, ]
[, ]
[, ]
[]
[]
[]
Best Practices
- Define SLIs and SLOs early - Measure what matters for your users
- Use structured logging - JSON format with consistent fields
- Implement distributed tracing - Essential for microservices
- Create runbooks for alerts - Don't page without action plans
- Avoid alert fatigue - Tune thresholds, consolidate similar alerts
- Use Golden Signals - Latency, traffic, errors, saturation
- Monitor from multiple angles - Synthetic + real user monitoring
- Retain data appropriately - Hot, warm, cold storage tiers
- Test alerting regularly - Don't discover failures during incidents
- Automate remediation - Self-healing for known failure modes