Skip to content

Commit 39d8f4c

Browse files
committed
w.i.p
1 parent 4ff1556 commit 39d8f4c

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Monitoring Best Practices
2+
3+
> "You can't improve what you don't measure, but you can definitely overwhelm yourself by measuring everything."
4+
5+
## Table of Contents
6+
7+
- [Monitoring Best Practices](#monitoring-best-practices)
8+
- [Table of Contents](#table-of-contents)
9+
- [1. Common Mistakes](#1-common-mistakes)
10+
- [1.1. Monitoring Everything, Not What Matters](#11-monitoring-everything-not-what-matters)
11+
- [1.2. High Cardinality Metrics](#12-high-cardinality-metrics)
12+
- [1.3. Alerting on Everything (Alert Fatigue)](#13-alerting-on-everything-alert-fatigue)
13+
- [1.4. Not Testing Alerts](#14-not-testing-alerts)
14+
- [1.5. Over-engineering the Monitoring System](#15-over-engineering-the-monitoring-system)
15+
- [1.6. Forgetting about the Human Element](#16-forgetting-about-the-human-element)
16+
- [1.7. Forget To Monitor The Monitoring System](#17-forget-to-monitor-the-monitoring-system)
17+
- [2. Best practices](#2-best-practices)
18+
- [2.1. What to be monitored?](#21-what-to-be-monitored)
19+
20+
> [!Important]
21+
>
22+
> "The best monitoring is invisible until you need it, and invaluable when you do."
23+
24+
After years in the trenches of monitoring, I've learned that great observability is less about fancy dashboards and more about asking the right questions. Here are the most valuable lessons, mistakes, and creative best practices I've picked up—often the hard way.
25+
26+
## 1. Common Mistakes
27+
28+
### 1.1. Monitoring Everything, Not What Matters
29+
30+
_What should you monitor?_ The rookie answer: **everything**. The reality: you'll drown in data and never look at most of it.
31+
32+
![Too many metrics meme](https://giphy.com/embed/fxZ7cC3zYIVXi)
33+
34+
More metrics ≠ better monitoring. Focus on signals that actually reflect user experience or system health. Ask yourself:
35+
36+
- Can I explain why this metric matters in one sentence?
37+
- Do I use this metric in a dashboard, alert, or decision? If not, delete it.
38+
39+
### 1.2. High Cardinality Metrics
40+
41+
High cardinality (think: a label for every user, container, or request) is the silent killer of monitoring systems. Prometheus TSDB will groan, queries will crawl, and you'll be troubleshooting your monitoring stack instead of your app.
42+
43+
**Creative fixes:**
44+
45+
- **Ditch high-cardinality labels** like `user_id` or `session_id` unless you truly need them.
46+
- **Aggregate early:** If you always aggregate in queries, aggregate at the source and store only what you need.
47+
- **Keep label combos minimal:** Too many labels = exponential time series growth.
48+
- **Monitor your monitoring:** Track cardinality itself to catch issues before they snowball.
49+
50+
### 1.3. Alerting on Everything (Alert Fatigue)
51+
52+
[Alert fatigue](https://en.wikipedia.org/wiki/Alarm_fatigue) is real. Once, ~~my boss~~ someone requires to set up alerts for every minor metric. The result? Thousands of notifications, most ignored. When a real incident hit, it was lost in the noise.
53+
54+
**How to stay sane:**
55+
56+
- Only alert on _actionable_ issues that need a human.
57+
- Only wake people for _critical_ incidents. If you can go back to sleep after an alert, it probably shouldn't have woken you up.
58+
59+
### 1.4. Not Testing Alerts
60+
61+
Alert rules are rarely perfect on the first try. That's normal! But if you never test or tune them, you'll miss real problems or get woken up for nothing.
62+
63+
**Pro tip:** Regularly simulate incidents and review alert performance. Tweak thresholds and logic as your system evolves.
64+
65+
### 1.5. Over-engineering the Monitoring System
66+
67+
I've been there: building a distributed, multi-cluster, self-healing monitoring monster... for a tiny app. Start simple. Build for your current scale, not your dream scale. You can always upgrade later.
68+
69+
### 1.6. Forgetting about the Human Element
70+
71+
A monitoring system is only as effective as the people behind it. If your team can't interpret the data or respond to alerts, even the best setup is useless.
72+
73+
**Creative solutions:**
74+
75+
- Invest in _clear, living documentation_ and _regular hands-on training_.
76+
- Make sure everyone knows how to use the tools, read dashboards, and follow runbooks.
77+
- Celebrate learning from incidents—blameless postmortems help everyone grow.
78+
79+
### 1.7. Forget To Monitor The Monitoring System
80+
81+
It's easy to assume your monitoring stack is always up and running—until the day you need it and discover it's been down for hours. Ironically, one of the most common blind spots is not monitoring the health of your own monitoring system.
82+
83+
**Why it matters:**
84+
85+
- If Prometheus, Grafana, or your alerting pipeline goes down, you lose visibility just when you need it most.
86+
- Silent failures in your monitoring stack can lead to missed incidents, delayed responses, and a false sense of security.
87+
88+
**How to avoid this trap:**
89+
90+
- Set up external probes (blackbox monitoring) to check the availability of your monitoring endpoints and dashboards.
91+
- Monitor the resource usage (CPU, memory, disk) and error logs of your monitoring components.
92+
- Create meta-alerts: alert if no data is received from critical exporters, or if alert volume drops to zero unexpectedly.
93+
- Regularly test your monitoring and alerting pipeline end-to-end—simulate failures and ensure alerts are delivered.
94+
95+
> "Trust, but verify—even your monitoring tools."
96+
97+
**If your monitoring system breaks, you won't know your application is broken either.**
98+
99+
## 2. Best practices
100+
101+
### 2.1. What to be monitored?
102+
103+
**Monitor your actual pain points, not theoretical ones**. You should focus on the most common failure issues.
104+
105+
If you don't have any failure, good for you (but usually it's impossible). You may want to check this
106+
107+
> WIPPPPPP

0 commit comments

Comments
 (0)