diff --git a/redirects.mjs b/redirects.mjs
index 0a4b629b..acf2b886 100644
--- a/redirects.mjs
+++ b/redirects.mjs
@@ -56,8 +56,9 @@ export const redirects = {
'/llm-observability/ai-trace-observability': '/ai-observability/agent-traces/',
'/llm-observability/what-is-openllmetry':
'/guides/ai-observability/instrument-python-app-with-openllmetry/',
- '/logs-list-panel': '/visualize-data/dashboards/adding-a-panel/logs-list-panel/',
+ '/logs-list-panel': '/visualize-data/dashboards/adding-a-panel/table-panel/',
'/logs-management': '/kloudmate-agent/log-monitoring/',
+ '/logs/log-explorer/syntax-for-log-querying': '/visualize-data/kmql/',
'/managing-dashboards': '/visualize-data/dashboards/managing-dashboards/',
'/managing-kloudmate-agents': '/kloudmate-agent/management/',
'/managing-panels': '/visualize-data/dashboards/managing-panels/',
@@ -71,5 +72,9 @@ export const redirects = {
'/tcp-monitor-test-tcp-port-connectivity': '/synthetic/monitors/tcp-monitor/',
'/udp-monitor-monitor-udp-port-availability': '/synthetic/monitors/udp-monitor/',
'/usage': '/kloudmate-assistant/usage/',
+ '/visualize-data/dashboards/adding-a-panel/logs-list-panel':
+ '/visualize-data/dashboards/adding-a-panel/table-panel/',
+ '/visualize-data/dashboards/adding-a-panel/spans-list-panel':
+ '/visualize-data/dashboards/adding-a-panel/table-panel/',
'/websocket-monitor-monitor-websocket-connections': '/synthetic/monitors/websocket-monitor/',
};
diff --git a/scripts/gen-aggregation-diagrams.py b/scripts/gen-aggregation-diagrams.py
new file mode 100644
index 00000000..46830a40
--- /dev/null
+++ b/scripts/gen-aggregation-diagrams.py
@@ -0,0 +1,255 @@
+"""Generate the aggregation diagrams on the Metrics Aggregations page.
+
+Run: python3 scripts/gen-aggregation-diagrams.py
+Writes one SVG per diagram into the page's images/ folder.
+"""
+import os, sys
+from html import escape
+
+OUT = sys.argv[1] if len(sys.argv) > 1 else os.path.join(os.path.dirname(__file__), "..", "src/content/docs/docs/visualize-data/explore/metrics-aggregations/images")
+FONT_MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace"
+FONT_SANS = "ui-sans-serif, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"
+INK, MUTED, LINE, HEAD_BG, CARD = "#1f2937", "#6b7280", "#e5e7eb", "#f3f4f6", "#ffffff"
+FAINT = "#b6bcc6"
+ACCENT, ACCENT_TINT, ACCENT_DARK = "#f45b26", "#fde7dd", "#c2410c"
+C = {"blue": ("#2563eb", "#e8f0fe"), "green": ("#15803d", "#e6f4ea"),
+ "purple": ("#7c3aed", "#f1ebfe"), "amber": ("#b45309", "#fdf3e1"),
+ "sky": ("#0891b2", "#e0f5fa"), "lime": ("#4d7c0f", "#eef6e0")}
+BUCKETS = ["10:00", "10:05", "10:10", "10:15"]
+
+# active_connections{service, region}: a raw point every minute, 5 per 5-minute interval
+SERIES = [ # (service, region, color, dashed, raw points per interval)
+ ("checkout", "us-east", "blue", False, [[6, 7, 7, 8, 7], [7, 8, 9, 8, 8], [8, 9, 8, 7, 8]]),
+ ("checkout", "eu-west", "blue", True, [[3, 4, 5, 4, 4], [4, 5, 6, 5, 5], [5, 6, 7, 6, 6]]),
+ ("payments", "us-east", "green", False, [[1, 2, 3, 2, 2], [2, 3, 4, 3, 3], [3, 2, 1, 2, 2]]),
+ ("payments", "eu-west", "green", True, [[1, 1, 2, 1, 0], [0, 1, 1, 2, 1], [0, 0, 0, 0, 0]]),
+]
+AVG = [[sum(b) // len(b) for b in r] for *_, r in SERIES]
+for (*_, r), a in zip(SERIES, AVG):
+ assert all(sum(b) == len(b) * v for b, v in zip(r, a))
+TOTAL = [sum(a[i] for a in AVG) for i in range(3)]
+BY_SERVICE = {svc: [sum(a[i] for (sv, *_), a in zip(SERIES, AVG) if sv == svc) for i in range(3)]
+ for svc in ("checkout", "payments")}
+
+def t(x, y, s, size=12, fill=INK, anchor="start", weight="400", font=FONT_SANS, extra=""):
+ return (f'{escape(str(s))} ')
+
+def label(x, y, text):
+ return t(x, y, text.upper(), 11, MUTED, weight="600", extra='letter-spacing="0.06em"')
+
+def chip(cx, cy, name, detail=None):
+ w = max(len(name) * 7.4, len(detail) * 6.3 if detail else 0) + 24
+ h = 44 if detail else 28
+ s = [f' ',
+ t(cx, cy + 4 - (8 if detail else 0), name, 12.5, ACCENT_DARK, "middle", "700")]
+ if detail:
+ s.append(t(cx, cy + 13, detail, 10.5, "#9a3412", "middle", font=FONT_MONO))
+ return "\n".join(s), w
+
+def harrow(x, cy, w, name, detail=None):
+ c, cw = chip(x + w / 2, cy, name, detail)
+ return "\n".join([
+ f' ',
+ f' ', c])
+
+def varrow(cx, y, h, name, detail=None, note=None, note_x=None):
+ c, cw = chip(cx, y + h / 2, name, detail)
+ s = [f' ',
+ f' ', c]
+ if note:
+ nx = note_x if note_x is not None else cx + cw / 2 + 16
+ for i, line in enumerate(note):
+ s.append(t(nx, y + h / 2 - 2 + i * 15 - (len(note) - 1) * 7, line, 12, MUTED))
+ return "\n".join(s)
+
+def card(W, H, title, body, caption=None):
+ s = [f'',
+ f' ',
+ t(24, 36, title, 14, INK, weight="700"), body]
+ if caption:
+ s.append(t(24, H - 20, caption, 12, MUTED))
+ s.append(" ")
+ return "\n".join(s)
+
+def save(name, svg):
+ with open(os.path.join(OUT, name), "w") as f:
+ f.write(svg)
+ print(name)
+
+# ---------------------------------------------------------------- chart
+def chart(x, y, w, h, ymax, ticks, series, raw=None, ghost=None, hl_bucket=None,
+ value_labels=False, end_labels=True):
+ """series: list of (name, color, [v per interval], dashed)."""
+ PL, PB = 30, 22
+ px, pw, ph = x + PL, w - PL - (62 if end_labels else 22), h - PB
+ bw = pw / 3
+ sy = lambda v: y + ph - v / ymax * ph
+ s = []
+ for i in range(3):
+ fill = ACCENT_TINT if hl_bucket == i else (HEAD_BG if i % 2 == 0 else CARD)
+ s.append(f' ')
+ for v in ticks:
+ yy = sy(v)
+ s.append(f' ')
+ s.append(t(px - 6, yy + 4, v, 10.5, MUTED, "end", font=FONT_MONO))
+ for i, b in enumerate(BUCKETS):
+ s.append(f' ')
+ s.append(t(px + i * bw, y + ph + 16, b, 10.5, MUTED, "middle", font=FONT_MONO))
+ def pts_raw(vals):
+ return [(px + bi * bw + (j + 0.5) / len(b) * bw, sy(v)) for bi, b in enumerate(vals) for j, v in enumerate(b)]
+ for vals in (ghost or []):
+ for (cx, cy) in pts_raw(vals):
+ s.append(f' ')
+ for col, vals in (raw or []):
+ P = pts_raw(vals)
+ s.append(f' ')
+ for (cx, cy) in P:
+ s.append(f' ')
+ for name, col, vals, dashed in series:
+ solid = ACCENT if col == "accent" else C[col][0]
+ P = [(px + (i + 0.5) * bw, sy(v)) for i, v in enumerate(vals)]
+ dash = ' stroke-dasharray="6 4"' if dashed else ""
+ s.append(f' ')
+ for i, (cx, cy) in enumerate(P):
+ s.append(f' ')
+ if value_labels or hl_bucket == i:
+ s.append(t(cx, cy - 9, vals[i], 11, solid, "middle", "700", FONT_MONO, extra='stroke="#fafafa" stroke-width="3" paint-order="stroke"'))
+ if end_labels:
+ s.append(t(px + pw + 6, P[-1][1] + 4, name, 11, solid, weight="600", font=FONT_MONO))
+ return "\n".join(s)
+
+def legend(x, y, items, colw=158):
+ """items: (text, color, dashed); laid out two per row."""
+ s = []
+ for i, (text, col, dashed) in enumerate(items):
+ lx, ly = x + (i % 2) * colw, y + (i // 2) * 17
+ dash = ' stroke-dasharray="5 3"' if dashed else ""
+ s.append(f' ')
+ s.append(t(lx + 22, ly, text, 11, MUTED, font=FONT_MONO))
+ return "\n".join(s)
+
+SERIES_LEGEND = [(f"{sv}, {rg}", col, d) for sv, rg, col, d, _ in SERIES]
+
+# ---------------------------------------------------------------- 1. overview grid
+def grid(x, y, labcols, rows, cols, cellw, labws, hl=None, hl_col=None, raw=False, outline=None):
+ """labcols: header for each label column. rows: (labels tuple, color, cells)."""
+ RH = 30
+ labw = sum(labws)
+ w, h = labw + cellw * len(cols), RH * (len(rows) + 1)
+ s = [f'',
+ f' ',
+ f' ']
+ for ri in range(len(rows)):
+ for ci in range(len(cols)):
+ if (hl and hl == (ri, ci)) or hl_col == ci:
+ s.append(f' ')
+ if outline:
+ ri, ci = outline
+ s.append(f' ')
+ for ri in range(1, len(rows) + 1):
+ s.append(f' ')
+ xs, acc = [], 0
+ for lw in labws:
+ xs.append(acc); acc += lw
+ for i in range(1, len(labws)):
+ s.append(f' ')
+ for ci in range(len(cols)):
+ s.append(f' ')
+ for i, lc in enumerate(labcols):
+ s.append(t(xs[i] + 10, RH / 2 + 4, lc, 11.5, MUTED, "start", "600", FONT_MONO))
+ for ci, c in enumerate(cols):
+ s.append(t(labw + ci * cellw + cellw / 2, RH / 2 + 4, c, 11.5, MUTED, "middle", "600", FONT_MONO))
+ for ri, (labs, col, cells) in enumerate(rows):
+ cy = RH * (ri + 1) + RH / 2 + 4
+ if col:
+ s.append(f' ')
+ for i, lab in enumerate(labs):
+ s.append(t(xs[i] + (22 if i == 0 and col else 10), cy, lab, 12, INK, weight="600", font=FONT_MONO))
+ for ci, v in enumerate(cells):
+ cx = labw + ci * cellw + cellw / 2
+ if raw:
+ s.append(t(cx, cy, " ".join(map(str, v)), 11.5, INK, "middle", font=FONT_MONO))
+ else:
+ s.append(t(cx, cy, v, 12.5, INK, "middle", "700", FONT_MONO))
+ s.append(" ")
+ return "\n".join(s), w, h
+
+def overview():
+ W = 740
+ labws, cellw = [100, 84], 112
+ gw = sum(labws) + cellw * 3
+ gx = (W - gw) / 2
+ cols = ["10:00", "10:05", "10:10"]
+ body, y = [], 64
+ body.append(label(gx, y, "Raw points every minute · active_connections"))
+ g, _, gh = grid(gx, y + 10, ["service", "region"], [((sv, rg), col, r) for sv, rg, col, _, r in SERIES],
+ cols, cellw, labws, outline=(0, 0), raw=True)
+ body.append(g); y += 10 + gh
+ body.append(varrow(gx + sum(labws) + cellw / 2, y + 4, 76, "Within series", "Avg · Interval 5m",
+ note=["Combines the points in one series", "and one interval into one value."],
+ note_x=gx + sum(labws) + cellw + 56))
+ y += 84
+ body.append(label(gx, y + 12, "Four series · one value per interval"))
+ g, _, gh = grid(gx, y + 22, ["service", "region"], [((sv, rg), col, a) for (sv, rg, col, _, _), a in zip(SERIES, AVG)],
+ cols, cellw, labws, hl_col=1, outline=(0, 0))
+ body.append(g); y += 22 + gh
+ body.append(varrow(gx + sum(labws) + cellw * 1.5, y + 4, 76, "Across series", "Sum by service",
+ note=["Adds up the series that share", "a service, in each interval."],
+ note_x=gx + sum(labws) + cellw * 2 + 40))
+ y += 84
+ body.append(label(gx, y + 12, "Two series · one per service"))
+ g, _, gh = grid(gx, y + 22, ["service"], [((svc,), col, BY_SERVICE[svc]) for svc, col in (("checkout", "blue"), ("payments", "green"))],
+ cols, cellw, [sum(labws)], hl_col=1)
+ body.append(g); y += 22 + gh
+ H = int(y + 56)
+ save("aggregation-overview.svg", card(W, H, "Aggregation within series, then across series", "\n".join(body),
+ caption="Grouping by service drops region, so the four series become two."))
+
+# ---------------------------------------------------------------- 2. within series
+def within():
+ W, cw, ch, aw = 740, 262, 190, 172
+ x0, y0 = 24, 74
+ sv, rg, col, _, raw = SERIES[0]
+ body = [label(x0, y0 - 10, f"Input · {sv}, {rg}")]
+ body.append(chart(x0, y0, cw, ch, 10, [0, 5, 10], [], raw=[(col, raw)], end_labels=False, hl_bucket=0))
+ body.append(harrow(x0 + cw + 4, y0 + ch / 2 - 10, aw, "Within series", "Avg · Interval 5m"))
+ ox = x0 + cw + aw + 10
+ body.append(label(ox, y0 - 10, "Output · one point per interval"))
+ body.append(chart(ox, y0, cw, ch, 10, [0, 5, 10], [(sv, col, AVG[0], False)],
+ ghost=[raw], value_labels=True, end_labels=False, hl_bucket=0))
+ H = y0 + ch + 52
+ a = raw[0]
+ save("aggregation-within-series.svg", card(W, H, "Aggregation within series (temporal)", "\n".join(body),
+ caption=f"A point every minute. The five points from 10:00 to 10:05 add up to {sum(a)}, so Avg gives {AVG[0][0]}."))
+
+# ---------------------------------------------------------------- 3 & 4. across series
+def across(fname, title, detail, outputs, ymax, ticks, out_label, caption):
+ W, cw, ch, aw = 740, 262, 190, 172
+ x0, y0 = 24, 74
+ body = [label(x0, y0 - 10, "Input · four series")]
+ body.append(chart(x0, y0, cw, ch, 10, [0, 5, 10],
+ [(f"{sv}, {rg}", col, a, d) for (sv, rg, col, d, _), a in zip(SERIES, AVG)],
+ hl_bucket=1, end_labels=False))
+ body.append(legend(x0 + 4, y0 + ch + 18, SERIES_LEGEND))
+ body.append(harrow(x0 + cw + 4, y0 + ch / 2 - 10, aw, "Across series", detail))
+ ox = x0 + cw + aw + 10
+ body.append(label(ox, y0 - 10, out_label))
+ body.append(chart(ox, y0, cw, ch, ymax, ticks, outputs, hl_bucket=1, value_labels=True))
+ H = y0 + ch + 82
+ save(fname, card(W, H, title, "\n".join(body), caption=caption))
+
+def across_all():
+ a = [v[1] for v in AVG]
+ across("aggregation-across-series.svg", "Aggregation across series (spatial)", "Sum",
+ [("total", "accent", TOTAL, False)], 20, [0, 10, 20], "Output · one series",
+ f"No Group by, so every series is added together. At 10:05: {' + '.join(map(str, a))} = {TOTAL[1]}.")
+
+def across_by_service():
+ c, p = [AVG[i][1] for i in (0, 1)], [AVG[i][1] for i in (2, 3)]
+ across("aggregation-group-by.svg", "Across series with Group by", "Sum by service",
+ [("checkout", "blue", BY_SERVICE["checkout"], False), ("payments", "green", BY_SERVICE["payments"], False)],
+ 15, [0, 5, 10, 15], "Output · one series per service",
+ f"Group by service drops region. At 10:05, checkout is {c[0]} + {c[1]} = {sum(c)} and payments is {p[0]} + {p[1]} = {sum(p)}.")
+
+overview(); within(); across_all(); across_by_service()
diff --git a/scripts/gen-transform-diagrams.py b/scripts/gen-transform-diagrams.py
new file mode 100644
index 00000000..ad9ee8b3
--- /dev/null
+++ b/scripts/gen-transform-diagrams.py
@@ -0,0 +1,286 @@
+"""Generate the input -> output diagrams on the dashboard Transformations page.
+
+Run: python3 scripts/gen-transform-diagrams.py
+Writes one SVG per transformation into the page's images/ folder.
+"""
+import os, sys
+from html import escape
+
+OUT = sys.argv[1] if len(sys.argv) > 1 else os.path.join(os.path.dirname(__file__), "..", "src/content/docs/docs/visualize-data/dashboards/panel-options/images")
+CW = 7.25 # mono char width at 12px
+ROW_H = 26
+PAD_X = 10
+FONT_MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace"
+FONT_SANS = "ui-sans-serif, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"
+
+INK, MUTED, LINE, HEAD_BG, CARD = "#1f2937", "#6b7280", "#e5e7eb", "#f3f4f6", "#ffffff"
+ACCENT = "#f45b26"
+# series colors: (solid, tint)
+C = {
+ "blue": ("#2563eb", "#e8f0fe"),
+ "green": ("#15803d", "#e6f4ea"),
+ "purple": ("#7c3aed", "#f1ebfe"),
+ "amber": ("#b45309", "#fdf3e1"),
+}
+
+def is_num(s):
+ try:
+ float(str(s).replace(",", "").replace("%", "").replace(" MiB", "")); return True
+ except ValueError:
+ return False
+
+def table(x, y, cols, rows, col_color=None, row_color=None, dropped=(), hl_col=None, dropped_cols=()):
+ """Return (svg, w, h). col_color: {col_idx: color}, row_color: {row_idx: color}."""
+ col_color, row_color = col_color or {}, row_color or {}
+ widths = []
+ for i, c in enumerate(cols):
+ n = max([len(c)] + [len(str(r[i])) for r in rows])
+ extra = 14 if i in col_color else 0 # room for the dot
+ widths.append(round(n * CW + 2 * PAD_X + extra))
+ w, h = sum(widths), ROW_H * (len(rows) + 1)
+ s = [f'']
+ s.append(f' ')
+ s.append(f' ')
+ # cell tints
+ for ri, r in enumerate(rows):
+ cy = ROW_H * (ri + 1)
+ cx = 0
+ for ci, wd in enumerate(widths):
+ tint = None
+ if ri in dropped: tint = None
+ elif ri in row_color: tint = C[row_color[ri]][1]
+ elif ci in col_color: tint = C[col_color[ci]][1]
+ if hl_col == ci and ri not in dropped: tint = "#fde7dd"
+ if ci in dropped_cols: tint = None
+ if tint:
+ last = ri == len(rows) - 1
+ if last and (ci == 0 or ci == len(widths) - 1):
+ # keep rounded bottom corners clean
+ s.append(f' ')
+ s.append(f' ')
+ s.append(f' ')
+ else:
+ s.append(f' ')
+ cx += wd
+ # grid
+ for ri in range(1, len(rows) + 1):
+ s.append(f' ')
+ cx = 0
+ for wd in widths[:-1]:
+ cx += wd
+ s.append(f' ')
+ s.append(f' ')
+ # text
+ def cell(ci, cx, cy, text, header=False, faded=False):
+ wd = widths[ci]
+ color = MUTED if header else INK
+ if faded or ci in dropped_cols: color = "#b6bcc6"
+ weight = "600" if header else "400"
+ num = not header and is_num(text)
+ tx = cx + PAD_X
+ out = []
+ if header and ci in col_color:
+ out.append(f' ')
+ tx += 14
+ if header and hl_col == ci:
+ color = ACCENT
+ anchor = "start"
+ if num:
+ tx, anchor = cx + wd - PAD_X, "end"
+ out.append(f'{escape(str(text))} ')
+ if faded:
+ tl = len(str(text)) * CW
+ x1 = tx - tl if anchor == "end" else tx
+ out.append(f' ')
+ return out
+ cx = 0
+ for ci, c in enumerate(cols):
+ s += cell(ci, cx, 0, c, header=True); cx += widths[ci]
+ for ri, r in enumerate(rows):
+ cx = 0
+ for ci, v in enumerate(r):
+ s += cell(ci, cx, ROW_H * (ri + 1), v, faded=ri in dropped); cx += widths[ci]
+ # row dots for row-colored rows
+ s.append(' ')
+ return "\n".join(s), w, h
+
+def label(x, y, text, color=MUTED, chip=None):
+ out = []
+ tx = x
+ if chip:
+ out.append(f' ')
+ tx += 13
+ out.append(f'{escape(text.upper())} ')
+ return "\n".join(out)
+
+def arrow(x, cy, w, name, detail):
+ s = []
+ s.append(f' ')
+ s.append(f' ')
+ cw = max(len(name) * 7.4, len(detail) * 6.3 if detail else 0) + 24
+ bx = x + (w - cw) / 2
+ bh = 44 if detail else 28
+ s.append(f' ')
+ ny = cy + 4 - (8 if detail else 0)
+ s.append(f'{escape(name)} ')
+ if detail:
+ s.append(f'{escape(detail)} ')
+ return "\n".join(s), cw
+
+def render(fname, title, inputs, output, step, detail=None, caption=None):
+ """inputs: list of (label, chip, table_kwargs); output: table_kwargs."""
+ M, GAP_LABEL, STACK_GAP = 24, 20, 22
+ # measure
+ ins = []
+ for lab, chip, kw in inputs:
+ _, w, h = table(0, 0, **kw); ins.append((lab, chip, kw, w, h))
+ _, ow, oh = table(0, 0, **output)
+ in_w = max(i[3] for i in ins)
+ in_h = sum(GAP_LABEL + i[4] for i in ins) + STACK_GAP * (len(ins) - 1)
+ out_h = GAP_LABEL + oh
+ _, chip_w = arrow(0, 0, 10, step, detail)
+ arrow_w = max(170, chip_w + 72)
+ top = M + 30
+ body_h = max(in_h, out_h)
+ W = round(M + in_w + arrow_w + ow + M)
+ H = round(top + body_h + M + (22 if caption else 0))
+ s = [f'']
+ s.append(f' ')
+ s.append(f'{escape(title)} ')
+ # inputs
+ y = top + (body_h - in_h) / 2
+ for lab, chip, kw, w, h in ins:
+ s.append(label(M, y + 12, lab, chip=chip))
+ t, _, _ = table(M, y + GAP_LABEL, **kw); s.append(t)
+ y += GAP_LABEL + h + STACK_GAP
+ # arrow
+ ax = M + in_w
+ a, _ = arrow(ax, top + body_h / 2 + GAP_LABEL / 2, arrow_w, step, detail); s.append(a)
+ # output
+ ox = ax + arrow_w
+ oy = top + (body_h - out_h) / 2
+ s.append(label(ox, oy + 12, "Output"))
+ t, _, _ = table(ox, oy + GAP_LABEL, **output); s.append(t)
+ if caption:
+ s.append(f'{escape(caption)} ')
+ s.append(' ')
+ with open(os.path.join(OUT, "transform-" + fname), "w") as f:
+ f.write("\n".join(s))
+ print(fname, W, H)
+
+# ---------- Reduce ----------
+render("reduce.svg", "Reduce",
+ [("Input · CPU % per host", None, dict(
+ cols=["time", "web-1", "web-2", "db-1"],
+ rows=[["10:00", 42, 61, 77], ["10:01", 48, 83, 79], ["10:02", 45, 92, 81], ["10:03", 51, 74, 86]],
+ col_color={1: "blue", 2: "green", 3: "purple"}))],
+ dict(cols=["host", "Last", "Max", "Mean"],
+ rows=[["web-1", 51, 51, 46.5], ["web-2", 74, 92, 77.5], ["db-1", 86, 86, 80.8]],
+ row_color={0: "blue", 1: "green", 2: "purple"}),
+ "Reduce", "Last · Max · Mean",
+ caption="Each series over time becomes one row, with a column per calculation.")
+
+# ---------- Filter rows ----------
+render("filter-rows.svg", "Filter rows",
+ [("Input", None, dict(
+ cols=["host", "Last", "Max", "Mean"],
+ rows=[["web-1", 51, 51, 46.5], ["web-2", 74, 92, 77.5], ["db-1", 86, 86, 80.8], ["db-2", 60, 64, 58.2]],
+ dropped={0, 3}, hl_col=2))],
+ dict(cols=["host", "Last", "Max", "Mean"],
+ rows=[["web-2", 74, 92, 77.5], ["db-1", 86, 86, 80.8]], hl_col=2),
+ "Filter rows", "Max greater than 80",
+ caption="Rows that fail the condition are removed.")
+
+# ---------- Group by ----------
+render("group-by.svg", "Group by",
+ [("Input", None, dict(
+ cols=["k8s.namespace.name", "k8s.pod.name", "memory"],
+ rows=[["checkout", "checkout-7f9c", "412 MiB"], ["checkout", "checkout-b21d", "388 MiB"],
+ ["payments", "payments-4k2p", "256 MiB"], ["payments", "payments-9xq1", "301 MiB"],
+ ["search", "search-0", "1024 MiB"]],
+ row_color={0: "blue", 1: "blue", 2: "green", 3: "green", 4: "purple"}, dropped_cols={1}))],
+ dict(cols=["k8s.namespace.name", "memory (Total)"],
+ rows=[["checkout", "800 MiB"], ["payments", "557 MiB"], ["search", "1024 MiB"]],
+ row_color={0: "blue", 1: "green", 2: "purple"}),
+ "Group by", "namespace · Total",
+ caption="Rows with the same namespace collapse into one. k8s.pod.name isn't grouped, so it's dropped.")
+
+# ---------- Join by field ----------
+render("join-by-field.svg", "Join by field",
+ [("Query A · requests", "blue", dict(
+ cols=["service", "requests"],
+ rows=[["checkout", "1,240"], ["payments", "860"], ["search", "3,410"]],
+ col_color={1: "blue"})),
+ ("Query B · errors", "purple", dict(
+ cols=["service", "errors"],
+ rows=[["checkout", 12], ["payments", 31], ["search", 4]],
+ col_color={1: "purple"}))],
+ dict(cols=["service", "requests", "errors"],
+ rows=[["checkout", "1,240", 12], ["payments", "860", 31], ["search", "3,410", 4]],
+ col_color={1: "blue", 2: "purple"}),
+ "Join by field", None,
+ caption="Rows from each query are matched on service, with one column per query.")
+
+# ---------- Series to rows ----------
+render("series-to-rows.svg", "Series to rows",
+ [("Input · a column per host", None, dict(
+ cols=["time", "web-1", "web-2"],
+ rows=[["10:00", 42, 61], ["10:01", 48, 83]],
+ col_color={1: "blue", 2: "green"}))],
+ dict(cols=["time", "host", "cpu"],
+ rows=[["10:00", "web-1", 42], ["10:00", "web-2", 61], ["10:01", "web-1", 48], ["10:01", "web-2", 83]],
+ row_color={0: "blue", 1: "green", 2: "blue", 3: "green"}),
+ "Series to rows", None,
+ caption="Each series becomes rows, with its label in a host column beside one value column.")
+
+# ---------- Organize fields ----------
+render("organize-fields.svg", "Organize fields",
+ [("Input", None, dict(
+ cols=["service.namespace", "host.name", "cpu"],
+ rows=[["shop", "web-1", 51], ["shop", "web-2", 74], ["shop", "db-1", 86]],
+ dropped_cols={0}, col_color={1: "blue"}))],
+ dict(cols=["Host", "cpu"],
+ rows=[["web-1", 51], ["web-2", 74], ["db-1", 86]],
+ col_color={0: "blue"}),
+ "Organize fields", "move · hide · rename",
+ caption="host.name moves first and is renamed to Host. service.namespace is hidden.")
+
+# ---------- Sort by ----------
+render("sort-by.svg", "Sort by",
+ [("Input", None, dict(
+ cols=["host", "Max"],
+ rows=[["web-1", 51], ["web-2", 92], ["db-1", 86], ["db-2", 64]],
+ hl_col=1, row_color={1: "blue"}))],
+ dict(cols=["host", "Max"],
+ rows=[["web-2", 92], ["db-1", 86], ["db-2", 64], ["web-1", 51]],
+ hl_col=1, row_color={0: "blue"}),
+ "Sort by", "Max · Descending",
+ caption="Rows are reordered by one column. The busiest host comes first.")
+
+# ---------- Extract fields ----------
+render("extract-fields.svg", "Extract fields",
+ [("Input", None, dict(
+ cols=["time", "attributes"],
+ rows=[["10:00", '{"method":"GET","status":200}'], ["10:01", '{"method":"POST","status":502}']],
+ col_color={1: "purple"}))],
+ dict(cols=["time", "method", "status"],
+ rows=[["10:00", "GET", 200], ["10:01", "POST", 502]],
+ col_color={1: "purple", 2: "purple"}),
+ "Extract fields", "Column: attributes",
+ caption="Each key in the JSON column becomes its own column.")
+
+# ---------- Filter by query ----------
+render("filter-by-query.svg", "Filter by query",
+ [("Query A · requests", "blue", dict(
+ cols=["time", "requests"],
+ rows=[["10:00", "1,240"], ["10:01", "1,310"]],
+ col_color={1: "blue"})),
+ ("Query B · helper", "purple", dict(
+ cols=["time", "total"],
+ rows=[["10:00", "5,510"], ["10:01", "5,620"]],
+ dropped_cols={0, 1}))],
+ dict(cols=["time", "requests"],
+ rows=[["10:00", "1,240"], ["10:01", "1,310"]],
+ col_color={1: "blue"}),
+ "Filter by query", "Draw everything else · B",
+ caption="Query B still runs, so an expression can use it, but the panel doesn't draw it.")
diff --git a/src/content/docs/docs/alerts/create-alerts.mdx b/src/content/docs/docs/alerts/create-alerts.mdx
index c7885c9b..b7c2ba32 100644
--- a/src/content/docs/docs/alerts/create-alerts.mdx
+++ b/src/content/docs/docs/alerts/create-alerts.mdx
@@ -79,7 +79,7 @@ Select **From Scratch** in the **Create Alert** dialog and click **Create Alert*
- **Simple mode** builds the rule from one query and one condition, on a single page. It's the only mode with the **Detection method** toggle for Anomaly and Forecast alerts. See [Build an alert in Simple mode](#build-an-alert-in-simple-mode).
- **Advanced mode** lets you add more queries and combine them with math, reduce, and condition expressions. It's also the only mode with custom annotations. See [Build an alert in Advanced mode](#build-an-alert-in-advanced-mode).
-To switch, click **Advanced mode**. You can't switch back to Simple mode afterward. Editing or duplicating an existing rule always opens it in Advanced mode.
+To switch, click **Advanced mode**. You can't switch back to Simple mode afterward. Editing or duplicating an existing rule always opens it in Advanced mode, and so does an alert you [create from a dashboard panel](#create-an-alert-from-a-dashboard-panel).
## Build an alert in Simple mode
@@ -124,31 +124,43 @@ Advanced mode is for rules that need more than one query, or expressions that tr
### 1. Setup query conditions and expressions
-Create more queries and expressions with the **Add Query** and **Add Expression** buttons. KloudMate assigns each one a letter, such as **A**, **B**, or **C**, and you can duplicate any block with its copy icon.
+Create more queries and expressions with the **Add Query** and **Add Expression** buttons. Each one gets an ID, such as **A**, **B**, or **C**, which you can rename. See [Nodes](../expressions/#nodes). Duplicate a block with its copy icon.
-#### Setting up query conditions for OpenTelemetry / KloudMate
+To remove a block, click its delete icon. If other steps read that block, you're asked to confirm first, and the rule can't be saved until those steps read a different one.
-
+#### Choose a data source
-- **Data Set:** select the dataset you want to retrieve from your data source.
-- **Metric to Aggregate:** select the metric you want to monitor from that dataset.
-- **Aggregation:** choose the function applied to the metric, such as `Avg` or `Rate`. Click **Customize aggregation** for temporal and spatial aggregation controls. See [Metrics Aggregations](../../visualize-data/explore/metrics-aggregations/).
-- **Group By:** enter the attributes used to group the data points.
-- **Filters:** add filters to narrow the retrieved data points.
-- **Ranking:** control how the series are ordered.
+Each query starts with a data source picker, the same one the panel editor and Explore use. Pick **KloudMate** for the telemetry your workspace collects, or an AWS account, listed by its account name, to query CloudWatch. **Add a data source**, at the bottom of the list, opens **Settings → Connections** in a new tab. An alert rule reads from **KloudMate** or an AWS account (CloudWatch) only. HTTP endpoint connections aren't offered, and the **Logs** and **Traces** data sets have the **Builder** tab only, with no **Records**. For the query fields, see [Queries and data sources](../../visualize-data/dashboards/adding-a-panel/queries-and-data-sources/).
-OpenTelemetry users can also use **Prometheus query language** to retrieve data and configure alerts.
+Next to the picker, set how far back the query reads with the **Time Range** dropdown, or enter a custom value in seconds.
-#### Setting up query conditions for AWS (CloudWatch)
+#### KloudMate queries
+
+
+
+- **Data Set:** select **Metrics**, **Logs**, or **Traces**.
+- **Metric:** select the metric you want to monitor.
+- **Filter:** add filter chips to narrow the data. An **OR group** matches when any one of its conditions matches. See [KMQL](../../visualize-data/kmql/) for every operator.
+- **Aggregate:** choose the statistic applied to the metric, such as **Avg** or **Rate**. Click **customize** to set **Within series** and **Across series** separately. To keep every series apart, choose **Each series** under **Group by**. See [Metrics Aggregations](../../visualize-data/explore/metrics-aggregations/).
+- **Where value:** keep only the values that match a condition, such as `= 2`.
+- **Group by:** pick the labels used to split the result into series.
+- **Rank:** keep only the top or bottom K series.
+- **Then:** combine the grouped results again, by fewer labels.
+
+See [Queries and data sources](../../visualize-data/dashboards/adding-a-panel/queries-and-data-sources/#build-the-query-step-by-step) for each step. To move a query between alert rules, dashboards, and Explore as text, use **Copy as KMQL** and **Paste KMQL** in the query's menu.
+
+To write the query in Prometheus query language instead, select the **Metrics** data set and open the **PromQL** tab. In an alert rule, a PromQL query always runs as a range query. A query that uses `or vector(N)` can't be switched to the **Builder** tab in an alert rule, because alert rules have no no-data value. Use **Alert state if No data** to decide what happens when the query returns nothing.
+
+#### CloudWatch queries

-- **Time Range:** set how far back to fetch data with the dropdown, or enter a custom value in seconds.
- **Region:** select the AWS region of the service you want to monitor.
- **Namespace:** select the AWS service namespace you want to alert on.
-- **Metric:** select the metric from that namespace.
-- **Statistic:** select the statistical function to apply when calculating data points.
-- **Dimensions:** optionally scope the alert to grouped resources within the namespace. For EC2, for example, you can filter by autoscaling group name, image ID, instance type, and more.
+- **Select metric:** select the metric from that namespace.
+- **Statistic:** select **Maximum**, **Minimum**, **Average**, or **Sum**. It starts on **Average**.
+- **Dimensions:** optionally scope the alert to resources within the namespace. Click **Add dimension**, pick a key, then pick one or more values, or **All** to match every value. For EC2, for example, you can filter by autoscaling group name, image ID, instance type, and more.
+- **Legend Format:** optionally set how each series is named in the chart.
Click **Run Query** to fetch data.
@@ -242,6 +254,26 @@ If you're migrating a rule that used notification tags, it keeps working; routin
Click **Save** to save the alert, or **Save & Close** to save it and return to the **Rules** tab.
+If a field is missing or invalid, its message appears on the field, and the first one scrolls into view. Each message clears as soon as you fix the field. Problems with the rule as a whole, such as a rule with no condition expression or a step that reads a step that doesn't exist, appear as a toast.
+
+## Create an alert from a dashboard panel
+
+You can start an alert from a panel on a saved dashboard, with the panel's query already filled in. You need permission to create alerts.
+
+- From the panel menu (⋯), click **Create alert**. This works on any panel type.
+- On a TimeSeries panel, click a point to pin the tooltip, then click **Create alert at this value**.
+
+The alert editor opens in Advanced mode with:
+
+- Query **A**: the panel's first query.
+- Condition expression **B**: the `last` value of **A** **IS ABOVE** a threshold. From the tooltip, the threshold is the value you clicked. From the panel menu, it's empty, so enter one before you save.
+- **Alert name**: the panel title. From the tooltip, the series name is added, for example `CPU utilization: web-1`.
+- **Dashboard** and **Panel** in **Responder context**: the dashboard and panel you started from.
+
+Because the alert is linked to the panel, it appears on that panel's chart while it's firing. See [Annotations](../../visualize-data/dashboards/annotations/).
+
+The pre-filled values aren't kept if you reload the editor before saving.
+
## Viewing an alert
To open an alert, select its name on the **Rules** tab. The detail page has these tabs:
@@ -256,3 +288,5 @@ To open an alert, select its name on the **Rules** tab. The detail page has thes
To see which resources the firing alerts affect, and what else is alerting around them, open their [alert group](../alert-groups/#affected-resources).
The instance tables on **Overview** and **Instances** also show each instance's last evaluated value and when it was **Last seen**.
+
+The condition's threshold and each instance's value are shown in the unit of the query result, for example `14.13GB > 13B`. When the query result has no single unit, such as when its series use different units, the raw number is shown.
diff --git a/src/content/docs/docs/alerts/expressions.mdx b/src/content/docs/docs/alerts/expressions.mdx
index 8ed9a827..bf21ff69 100644
--- a/src/content/docs/docs/alerts/expressions.mdx
+++ b/src/content/docs/docs/alerts/expressions.mdx
@@ -130,18 +130,18 @@ Add more conditions with the **Add condition** button, and choose how they combi
## Nodes
-Nodes represent the individual queries or expressions used to build alerts and dashboards. KloudMate assigns each node a letter by default (for example, A, B, or C), based on the order it was created.
+Nodes represent the individual queries or expressions used to build alerts and dashboards. A node's ID is its name. KloudMate names nodes with a letter by default (for example, A, B, or C), based on the order they were created.

-You reference a node by its letter in other queries and expressions.
+You reference a node by its name in other queries and expressions.

-KloudMate names nodes alphabetically by default, but you can rename them for clarity.
+To rename a node, edit its name in the node header. A name can contain letters, numbers, underscores, and spaces, and it must be unique within the alert or panel. Renaming a node updates every reference to it, including math expressions, the **Input** of a Reduce, the **OF** of a condition, and the alert condition.

-If a custom node name includes spaces, enclose it in **${}**. For example: `${CPU usage}`
+If a node name includes spaces, enclose it in **${}** when you reference it. For example: `${CPU usage}`

diff --git a/src/content/docs/docs/apm-and-tracing/trace-explorer.mdx b/src/content/docs/docs/apm-and-tracing/trace-explorer.mdx
index b9fd991c..f39006a6 100644
--- a/src/content/docs/docs/apm-and-tracing/trace-explorer.mdx
+++ b/src/content/docs/docs/apm-and-tracing/trace-explorer.mdx
@@ -7,7 +7,7 @@ sidebar:
Click **Traces** in the left navigation menu to open the section. It opens on the **Trace Summary** view by default.
-At the top of the page, the **span volume graph** visualizes trace activity over the selected time range. This gives you a quick pulse check on traffic patterns before you inspect individual traces.
+To see trace activity over the selected time range, click the chart icon next to the time picker. The **Span count** chart stacks spans with errors and all other spans in each interval.

@@ -19,13 +19,13 @@ At the top of the page, the **span volume graph** visualizes trace activity over
### Search Bar
-Search across traces using span attributes. Click the search bar to see the list of available attributes.
+Search across traces using span attributes. Click the search bar or start typing, pick an attribute, then an operator and a value. If the attribute or value you want isn't listed, type it. Each condition appears as a chip in the bar, and a trace must match every chip. To remove a condition, click the **×** on its chip.

-Click the filter icon on the right to open the full attribute picker. Active filters appear as tags in the search bar and can be removed individually.
+The operators are the ones [KMQL](../../visualize-data/kmql/) uses. The `in` and `not in` operators take several values, which you can type separated by commas. On string attributes, `matches` and `not matches` compare the value against a regular expression that must match the whole value.
-
+The search is kept in the address as KMQL in the `q` parameter, so a copied address opens the same search. A search that doesn't parse shows the reason with **Clear filters**, runs nothing, and can't be saved. The group drawer keeps its search in `group_q`.
### Sidebar Filters
@@ -44,7 +44,9 @@ Each filter section includes a search box for quick lookup. When filters are act
## Saved Queries
-Click **Saved Queries** to view and apply previously saved searches. To save a new query, click the dropdown arrow next to **Saved Queries** and select **Add New**.
+Open the **Saved** menu next to the search bar. Select **Save this query** to save the current search, pick a query under **Recent** to run it, or select **All saved queries** to browse every saved query.
+
+When you edit a saved search that has OR groups or free text, they appear in a read-only **Other filters** field and stay in the search when you save it.

@@ -76,7 +78,7 @@ Filter the groups from the left panel by **entry operation**, **service**, and *
Click a group row to open its **drill-down drawer**. The drawer shows the group's metrics across the top, then the list of traces that belong to it. From here you can:
-- **Filter the group's traces** by span attributes using the drawer's search bar.
+- **Filter the group's traces** by span attributes using the drawer's search bar, which works the same way as the [search bar](#search-bar) on the main page.
- **Scroll the list** — it pages automatically as you reach the bottom.
- **Open any trace** — click a row to open its full [Trace Detail](../trace-detail/) stacked on top of the drawer. Closing it returns you to the group; closing the group returns you to the list.
diff --git a/src/content/docs/docs/issues/images/issue-comments.png b/src/content/docs/docs/issues/images/issue-comments.png
new file mode 100644
index 00000000..2a6f4525
Binary files /dev/null and b/src/content/docs/docs/issues/images/issue-comments.png differ
diff --git a/src/content/docs/docs/issues/index.mdx b/src/content/docs/docs/issues/index.mdx
index 482873bb..b5476218 100644
--- a/src/content/docs/docs/issues/index.mdx
+++ b/src/content/docs/docs/issues/index.mdx
@@ -105,7 +105,15 @@ The event list holds up to 100 of the latest events: from the last 14 days for a
- **Ignore** stops notifications for the issue and moves it to **Ignored**, out of the unresolved list. Click it again to stop ignoring the issue.
- **Ask Assistant** opens the [KloudMate Assistant](../kloudmate-assistant/) with a prompt about the issue already written. Nothing is sent until you send it.
- **Create in Jira** needs a [Jira integration](../platform/settings/notification-channels/#jira).
-- Team members are notified when you assign an issue to them. Everyone who comments on an issue is notified of later comments, and you can mention other users in a comment.
+- Team members are notified when you assign an issue to them.
+
+## Comment on an issue
+
+Click **Comments** on an issue to discuss it with your team. Comments support Markdown, and you can type `@` to mention another user. Everyone who comments on an issue is notified of later comments.
+
+
+
+You can edit and delete only your own comments. If you delete a comment that has replies, the replies stay in the thread.
## How long issues are kept
diff --git a/src/content/docs/docs/logs/index.mdx b/src/content/docs/docs/logs/index.mdx
index 0d14f404..43e08dc6 100644
--- a/src/content/docs/docs/logs/index.mdx
+++ b/src/content/docs/docs/logs/index.mdx
@@ -17,7 +17,7 @@ KloudMate centralizes logs from your applications, infrastructure, and cloud ser
## Explore Logs
- [Log Explorer](./log-explorer/)
-- [Log Query Syntax](./log-explorer/syntax-for-log-querying/)
+- [KMQL query language](../visualize-data/kmql/)
## Ingest Logs
diff --git a/src/content/docs/docs/logs/log-explorer/index.mdx b/src/content/docs/docs/logs/log-explorer/index.mdx
index 1da7faff..aa08ed8e 100644
--- a/src/content/docs/docs/logs/log-explorer/index.mdx
+++ b/src/content/docs/docs/logs/log-explorer/index.mdx
@@ -11,23 +11,39 @@ Log Explorer indexes logs from all connected services and applications. Use it t
## Log Explorer Walkthrough
-The main view combines a log volume graph with a result list. Each row in the list represents a single log entry and shows the most useful attributes for quick triage.
-
-The graph shows log volume over time. The x-axis represents time and the y-axis represents the number of ingested log entries.
+The main view lists log entries in a table. Each row represents a single log entry and shows the most useful attributes for quick triage.

+To see log volume over time, click the chart icon next to **Saved**. The **Log volume** chart stacks errors, warnings, and all other logs in each interval.
+
Select any log entry to inspect its full payload, labels, and metadata.
## Search and Filter Logs
### Search
-Use the search bar at the top of Log Explorer to find matching log entries across your environment.
+The search bar at the top of Log Explorer shows your search as chips. Each chip is one condition, and a log entry must match every chip to appear.

-Refine results further by adjusting the selected time range from the time scale menu.
+To search for text anywhere in a log entry, type it in the bar and press Enter. The text becomes a free-text chip that searches every string field, so `timeout` finds entries with that word in the message or in any text attribute.
+
+To filter on a field, click the bar and pick a field, then an operator, then a value. For example, pick `severity`, then `=`, then `ERROR`. If the field or value you want isn't listed, type it.
+
+The `in` and `not in` operators take several values. Select them from the list, or type them separated by commas, such as `ERROR, WARN`, and press Enter.
+
+On string fields, `matches` and `not matches` compare the value against a regular expression. The expression must match the whole value, so `http.route matches "/api/v[0-9]+/.*"` matches `/api/v2/users` but not `/internal/api/v2/users`.
+
+To remove a condition, click the **×** on its chip.
+
+### Edit the search as KMQL
+
+Click the `>` icon at the end of the search bar to see and edit the search as [KMQL](../../visualize-data/kmql/) text. In the text view, put free text in double quotes. For example, `severity = ERROR "timeout"` finds error logs that contain the word `timeout`. Press Enter to run the search, and click `>` again to go back to chips.
+
+Use the text view to build an OR group, such as `(k8s.namespace.name = default or service.name = checkout)`. An OR group shows as a single chip, and you can only change it in the text view. A search that can't be shown as chips stays in the text view.
+
+If the text doesn't parse, Log Explorer shows the reason and doesn't run the search until you fix it. The search is kept in the address as KMQL in the `q` parameter. Links that use the old `filter` or `query` parameters aren't read, so they open Log Explorer with no search applied. Rewrite the search as KMQL in `q`.
### Filter
@@ -35,16 +51,24 @@ Use the sidebar filters to narrow the result set by relevant dimensions. Combine

+You can also filter from a log entry. In the log detail panel, click **Filter by value** (the filter icon) next to a field to add that field and value to the search. A filter added from the sidebar or the detail panel is combined with the current search using AND.
+
+Refine results further by adjusting the selected time range from the time picker.
+
## Saved Queries
-To save a query, click the dropdown arrow next to **Saved Queries** in the top-right area of Log Explorer. Enter a query name, description, and folder, then click **Save**.
+Save, reuse, and browse queries from the **Saved** menu next to the search bar:
-
+- **Save this query** saves the current search. Enter a name, description, and folder, then click **Save**.
+- **Recent** lists the most recently saved queries. Click one to run it.
+- **All saved queries** opens every saved query, organized in folders.
-Saved queries remain available from the **Saved Queries** section for quick reuse.
+
Use folders to keep saved queries organized by service, team, or use case.
+When you edit a saved query, you write its **Filters** as KMQL text. If a saved query's filters can't be written as KMQL, Log Explorer shows the reason and doesn't run the query. Edit the query and rewrite its filters in KMQL to use it again.
+
## Inspect Log Entries
Select any log entry to view detailed information and analysis.
@@ -57,6 +81,12 @@ Select any log entry to view detailed information and analysis.
Refer to the [KloudMate Assistant](../../kloudmate-assistant/) documentation for more details.
+### Open one log from a link
+
+A link with `?logId=&ts=` opens that log's detail panel. Log Explorer looks for the log within 5 seconds of `ts`, or across the page's time range when there's no usable `ts`. If no log matches, Log Explorer says the log wasn't found. Closing the panel removes both parameters from the address.
+
+The **View log** link on a logs **Records** table builds this link for you. See [Data links](../../visualize-data/dashboards/panel-options/data-links/).
+
## Stream Logs
Use **Stream** to watch logs as they are ingested into KloudMate.
@@ -71,5 +101,5 @@ See [Rehydrate archived logs](../../platform/settings/cold-storage/rehydrate-log
## Related Resources
-- [Log Query Syntax](./syntax-for-log-querying/)
+- [KMQL](../../visualize-data/kmql/)
- [Collect File Logs with KloudMate Agent](../collect-file-logs/)
diff --git a/src/content/docs/docs/logs/log-explorer/syntax-for-log-querying.mdx b/src/content/docs/docs/logs/log-explorer/syntax-for-log-querying.mdx
deleted file mode 100644
index 06457701..00000000
--- a/src/content/docs/docs/logs/log-explorer/syntax-for-log-querying.mdx
+++ /dev/null
@@ -1,82 +0,0 @@
----
-title: "Log Query Syntax"
-description: "Reference for the filter syntax used in KloudMate Log Explorer."
-sidebar:
- label: "Query Syntax"
- order: 2
----
-Use filter expressions in Log Explorer to narrow large log sets quickly and consistently.
-
-## The Basics
-
-Each filter expression has three parts: a **field** , an **operator** , and a **value**.
-
-> `?filter=`
-
-For example, to find all logs with an `active` status:
-
-> `/logs?filter=status=active`
-
-### Combining Multiple Filters
-
-To combine multiple conditions, add another `filter` parameter. All filters are joined with a logical **AND**, meaning every condition must match for a log entry to be included.
-
-## Operators Reference
-
-The table below lists the supported operators.
-
-| Operator | Name | Description | Example (User-Typed) |
-| ----------------------------- | ------------------------ | ---------------------------------------------------------------------------- | ------------------------------------- |
-| **Equality & Set Operations** | | | |
-| `=` | Equals | Finds items where the field is an exact match for a single value. | `level=error` |
-| `=` | In | Finds items where the field matches **any** value in a comma-separated list. | `http.status=404,500,503` |
-| `!=` | Not Equals | Finds items where the field does not match a single value. | `env!=local` |
-| `!=` | Not In | Finds items where the field does not match **any** value in a list. | `k8s.namespace!=kube-system,default` |
-| **Numeric Comparisons** | | | |
-| `>` | Greater Than | Finds items where the field's numeric value is greater than the given value. | `latency_ms>500` |
-| `<` | Less Than | Finds items where the field's numeric value is less than the given value. | `cpu.usage<0.5` |
-| `>=` | Greater Than or Equal To | Finds items where the field's value is greater than or equal to the value. | `retries>=3` |
-| `<=` | Less Than or Equal To | Finds items where the field's value is less than or equal to the value. | `stock_count<=10` |
-| **String Matching** | | | |
-| `~` | Contains | Finds items where the field contains the given substring (case-insensitive). | `message~database connection` |
-| `!~` | Does Not Contain | Finds items where the field does not contain the given substring. | `path!~healthcheck` |
-| `^` | Starts With | Finds items where the field starts with the given string. | `user.name^alex` |
-| **Existence Checks** | | | |
-| `+` | Field Exists | Finds items where the specified field exists (is not null). | `+error.code` |
-| `-` | Field Does Not Exist | Finds items where the specified field does not exist (is null). | `-http.user_agent` |
-
-## Example Queries
-
-**Example 1: Debugging Production Errors**
-
-**Goal:** Find all `error` or `critical` logs from the `production` environment for `auth-service` where `error.code` is present.
-
-> `/logs?filter=env=production&filter=service=auth-service&filter=level=error,critical&filter=+error.code`
-
-**Example 2: Monitoring API Performance**
-
-**Goal:** Find slow API requests greater than `1000ms` that resulted in a server error, excluding routine health checks from the monitoring system.
-
-> `/logs?filter=latency_ms>1000&filter=http.status>=500&filter=source!~monitoring-bot`
-
-**Example 3: Auditing User Activity**
-
-**Goal:** Find all login attempts for users whose email does not start with `test` and who were logging in from a country other than `US` or `CA`.
-
-> `/logs?filter=action=user_login&filter=user.email!^test&filter=geo.country!=US,CA`
-
-## Quick Reference
-
-| Syntax | Action |
-| ------------------ | ----------------------------------- |
-| `field=value` | Field is equal to `value`. |
-| `field=val1,val2` | Field is IN (`val1` OR `val2`). |
-| `field!=value` | Field is not equal to `value`. |
-| `field!=val1,val2` | Field is NOT IN (`val1` OR `val2`). |
-| `field>500` | Field is greater than `500`. |
-| `field~text` | Field contains `text`. |
-| `field!~text` | Field does not contain `text`. |
-| `field^prefix` | Field starts with `prefix`. |
-| `+field` | `field` must exist. |
-| `-field` | `field` must not exist. |
-| `...&filter=...` | Combine filters with AND. |
diff --git a/src/content/docs/docs/network-monitoring/discover-devices.mdx b/src/content/docs/docs/network-monitoring/discover-devices.mdx
index 978492a8..a8971c7f 100644
--- a/src/content/docs/docs/network-monitoring/discover-devices.mdx
+++ b/src/content/docs/docs/network-monitoring/discover-devices.mdx
@@ -31,7 +31,7 @@ Communities and v3 passwords are sent to the agent as plain text and used only f
You can add several scans on one agent, each with different ranges, ports, or credentials, and the agent runs each on its own interval and combines the results.
-
+
## Exclude addresses
diff --git a/src/content/docs/docs/network-monitoring/flow-monitoring.mdx b/src/content/docs/docs/network-monitoring/flow-monitoring.mdx
index c2a57189..42f9bae8 100644
--- a/src/content/docs/docs/network-monitoring/flow-monitoring.mdx
+++ b/src/content/docs/docs/network-monitoring/flow-monitoring.mdx
@@ -23,7 +23,7 @@ Add one listener per protocol your devices export. NetFlow and sFlow can run at
Then configure each device to send flow records to `agent-ip:port`. The form shows an **Exporter setup** snippet for Cisco, Juniper, MikroTik, and Fortinet, filled in with the listener's port.
-
+
:::caution
Flow volume can be high, so turn on sampling at the sending device rather than exporting every flow. Applications are identified by well-known port, not by deep packet inspection. All traffic on port 443 is labeled `https`, so an app on a non-standard port shows up as `other`.
diff --git a/src/content/docs/docs/network-monitoring/images/add-reachability-check.png b/src/content/docs/docs/network-monitoring/images/add-reachability-check.png
index 9a27aa23..75d59d13 100644
Binary files a/src/content/docs/docs/network-monitoring/images/add-reachability-check.png and b/src/content/docs/docs/network-monitoring/images/add-reachability-check.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/all-devices.png b/src/content/docs/docs/network-monitoring/images/all-devices.png
index 562e96c9..54d2601a 100644
Binary files a/src/content/docs/docs/network-monitoring/images/all-devices.png and b/src/content/docs/docs/network-monitoring/images/all-devices.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/configure-integrations.png b/src/content/docs/docs/network-monitoring/images/configure-integrations.png
index 470fc65c..6138bf5f 100644
Binary files a/src/content/docs/docs/network-monitoring/images/configure-integrations.png and b/src/content/docs/docs/network-monitoring/images/configure-integrations.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/device-drawer-overview.png b/src/content/docs/docs/network-monitoring/images/device-drawer-overview.png
index 7108f481..fff3860b 100644
Binary files a/src/content/docs/docs/network-monitoring/images/device-drawer-overview.png and b/src/content/docs/docs/network-monitoring/images/device-drawer-overview.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/discover-add-scan.png b/src/content/docs/docs/network-monitoring/images/discover-add-scan.png
index 2f81d6b7..01f9efe6 100644
Binary files a/src/content/docs/docs/network-monitoring/images/discover-add-scan.png and b/src/content/docs/docs/network-monitoring/images/discover-add-scan.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/flow-monitoring-drawer.png b/src/content/docs/docs/network-monitoring/images/flow-monitoring-drawer.png
index 49320382..ea5b69fb 100644
Binary files a/src/content/docs/docs/network-monitoring/images/flow-monitoring-drawer.png and b/src/content/docs/docs/network-monitoring/images/flow-monitoring-drawer.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/network-overview.png b/src/content/docs/docs/network-monitoring/images/network-overview.png
index 52d1628d..24ddbdfc 100644
Binary files a/src/content/docs/docs/network-monitoring/images/network-overview.png and b/src/content/docs/docs/network-monitoring/images/network-overview.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/snmp-wizard-collector-agent.png b/src/content/docs/docs/network-monitoring/images/snmp-wizard-collector-agent.png
index 736344d0..a090062b 100644
Binary files a/src/content/docs/docs/network-monitoring/images/snmp-wizard-collector-agent.png and b/src/content/docs/docs/network-monitoring/images/snmp-wizard-collector-agent.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/snmp-wizard-credentials.png b/src/content/docs/docs/network-monitoring/images/snmp-wizard-credentials.png
index 9e9d79be..d29e61ff 100644
Binary files a/src/content/docs/docs/network-monitoring/images/snmp-wizard-credentials.png and b/src/content/docs/docs/network-monitoring/images/snmp-wizard-credentials.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/snmp-wizard-profile.png b/src/content/docs/docs/network-monitoring/images/snmp-wizard-profile.png
index 86fc5168..287be895 100644
Binary files a/src/content/docs/docs/network-monitoring/images/snmp-wizard-profile.png and b/src/content/docs/docs/network-monitoring/images/snmp-wizard-profile.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/traffic-tab.png b/src/content/docs/docs/network-monitoring/images/traffic-tab.png
index 9523bdfc..7db44bd8 100644
Binary files a/src/content/docs/docs/network-monitoring/images/traffic-tab.png and b/src/content/docs/docs/network-monitoring/images/traffic-tab.png differ
diff --git a/src/content/docs/docs/network-monitoring/images/traps-syslog-add-receiver.png b/src/content/docs/docs/network-monitoring/images/traps-syslog-add-receiver.png
new file mode 100644
index 00000000..7a6774a0
Binary files /dev/null and b/src/content/docs/docs/network-monitoring/images/traps-syslog-add-receiver.png differ
diff --git a/src/content/docs/docs/network-monitoring/index.mdx b/src/content/docs/docs/network-monitoring/index.mdx
index b82d8858..253a6941 100644
--- a/src/content/docs/docs/network-monitoring/index.mdx
+++ b/src/content/docs/docs/network-monitoring/index.mdx
@@ -37,7 +37,7 @@ Open **Network Monitoring**. You land on the **Overview** tab.
For how to read each tab, see [Using Network Monitoring](/network-monitoring/network-page/).
-
+
## Set it up
diff --git a/src/content/docs/docs/network-monitoring/manage-troubleshoot.mdx b/src/content/docs/docs/network-monitoring/manage-troubleshoot.mdx
index 7f573384..70926c09 100644
--- a/src/content/docs/docs/network-monitoring/manage-troubleshoot.mdx
+++ b/src/content/docs/docs/network-monitoring/manage-troubleshoot.mdx
@@ -16,7 +16,7 @@ In **Network Monitoring**, select **Configure**. Pick a collector agent to see e
- **Edit** it to change credentials, targets, capabilities, polling intervals, ports, or scan ranges.
- **Remove** it.
-
+
Enabling and disabling take effect on their own. Any edit that changes what the agent collects, and any add or remove, briefly restarts data collection on that agent, so expect a short gap in that poller's telemetry. The exception is on agent 2.11.0 or later: a change that only affects SNMP devices is applied without a restart, unless it adds the agent's first SNMP device or removes its last one.
diff --git a/src/content/docs/docs/network-monitoring/monitoring-snmp.mdx b/src/content/docs/docs/network-monitoring/monitoring-snmp.mdx
index f0969366..9941f52d 100644
--- a/src/content/docs/docs/network-monitoring/monitoring-snmp.mdx
+++ b/src/content/docs/docs/network-monitoring/monitoring-snmp.mdx
@@ -59,7 +59,7 @@ A device profile decides which tables the agent walks and what metrics it emits.
- **Pick from catalog**: choose a specific profile by name.
- **Custom**: name a profile you've defined.
-
+
#### Polling interval
diff --git a/src/content/docs/docs/network-monitoring/network-page.mdx b/src/content/docs/docs/network-monitoring/network-page.mdx
index 936e496e..ab081fd9 100644
--- a/src/content/docs/docs/network-monitoring/network-page.mdx
+++ b/src/content/docs/docs/network-monitoring/network-page.mdx
@@ -14,7 +14,7 @@ The Overview leads with problems, not a wall of devices. It covers the time rang
The **health strip** across the top gives the overall state (**Healthy**, **Degraded**, or **Critical**), what's wrong in a few words, and fleet uptime over the range as a bar. Below it, counts summarize your devices by status, your ports by use, the active problems by severity, and the average traffic in and out.
-
+
The rest of the page shows:
@@ -56,7 +56,7 @@ That distinction drives the **poller-not-reporting banner**. If a collector agen
To find where a machine is plugged in, enter its MAC address in **Find a device by MAC address**. The search covers the MAC tables that switches reported in the last 7 days. An address seen on several ports is usually plugged into the port with the fewest devices, and that port is listed first.
-
+
## Reachability and Traffic tabs
@@ -99,7 +99,7 @@ Selecting a device opens its drawer. The header shows the device's status, and t
- **Traffic**: the flow this device exports, when flow monitoring is set up.
- **Events**: the [traps and syslog](/network-monitoring/traps-and-syslog/#the-events-tab) this device sent.
-
+

diff --git a/src/content/docs/docs/network-monitoring/reachability-checks.mdx b/src/content/docs/docs/network-monitoring/reachability-checks.mdx
index 170ebd3b..47e5decb 100644
--- a/src/content/docs/docs/network-monitoring/reachability-checks.mdx
+++ b/src/content/docs/docs/network-monitoring/reachability-checks.mdx
@@ -37,7 +37,7 @@ In **Network Monitoring**, open the **Add** menu and choose **Reachability check
The agent discovers and pings its own default gateway. Saving adds both probes and briefly restarts data collection on the agent.
-
+
## Where results show up
diff --git a/src/content/docs/docs/network-monitoring/traps-and-syslog.mdx b/src/content/docs/docs/network-monitoring/traps-and-syslog.mdx
index 11ce9ec2..edf11f63 100644
--- a/src/content/docs/docs/network-monitoring/traps-and-syslog.mdx
+++ b/src/content/docs/docs/network-monitoring/traps-and-syslog.mdx
@@ -23,6 +23,8 @@ In **Network Monitoring**, open the **Add** menu and choose **Traps and syslog**
Select **Add receiver**. The receiver starts within a minute. Then configure each device to send traps or syslog to the agent's address and the port you chose.
+
+
You can run several receivers on one agent, for example traps on `162`, syslog over UDP on `514`, and syslog over TCP on `1514` for devices that send RFC 5424. Each receiver needs its own port, and that includes [flow listeners](/network-monitoring/flow-monitoring/). If two listeners on an agent share a port, only one of them is set up.
To change or remove a receiver, open **Traps and syslog** again and pick the agent, or edit the **SNMP traps** or **Syslog** entry from **Configure**.
diff --git a/src/content/docs/docs/platform/data-retention.mdx b/src/content/docs/docs/platform/data-retention.mdx
index bcc1a8d7..ab4ee571 100644
--- a/src/content/docs/docs/platform/data-retention.mdx
+++ b/src/content/docs/docs/platform/data-retention.mdx
@@ -6,22 +6,24 @@ sidebar:
order: 2.5
---
-How long KloudMate keeps your data depends on what it is. Logs and traces are kept for the window your plan sets, metrics for a year, and several other kinds of data have their own window.
+How long KloudMate keeps your data depends on what it is. Logs, traces, real user monitoring (RUM) data and continuous profiling are kept for the window your plan sets, metrics for a year, and several other kinds of data have their own window.
This page lists every retention window, including the ones you can't see in the product.
## Plan retention
-Logs and traces are kept for the window your plan sets. This is the data you can query directly in the Log Explorer and the trace views.
+Logs, traces, RUM data and profiles are kept for the window your plan sets. This is the data you can query directly in the Log Explorer, the trace views, RUM and the profiling views.
| Data | Retention |
| --- | --- |
| Logs and traces | Free 7 days, Pro 14 days |
+| RUM sessions and replays | Same as traces, unless your plan sets RUM retention separately |
+| Continuous profiling | 7 days, unless your plan sets profiling retention separately |
| Metrics | 1 year |
Metrics are billed by sample count rather than by how long they're kept, so they're kept for a year on every plan.
-Logs and traces retention is set by your plan. See [Subscription & Billing](../settings/subscription-billing/).
+Logs, traces, RUM and profiling retention is set by your plan. See [Subscription & Billing](../settings/subscription-billing/).
## Metrics are tiered by resolution
@@ -33,8 +35,6 @@ These apply to everyone, regardless of plan.
| Data | Kept for | Notes |
| --- | --- | --- |
-| Session replay recordings | 7 days | The rrweb recordings behind a RUM session. Not archivable to Cold Storage. |
-| Continuous profiling | 7 days | |
| Anomaly forecast bands | 7 days | The predicted band a forecast alert compares against. |
| Issue occurrences | 30 days | |
| Metric cardinality analytics | 45 days | |
@@ -43,7 +43,7 @@ These apply to everyone, regardless of plan.
| RUM custom events | 400 days | An hourly rollup, so you can compare this quarter against last quarter. |
| RUM release health | 400 days | An hourly rollup, so you can compare a release against an earlier one after their raw sessions have aged out. |
-Raw RUM data follows your plan retention. That covers sessions, errors, journeys, raw events, route visits, and the raw custom events behind the 400-day rollup.
+Raw RUM data follows your plan retention. That covers sessions, session replay recordings, errors, journeys, raw events, route visits, and the raw custom events behind the 400-day rollup.
## Keeping logs longer
diff --git a/src/content/docs/docs/platform/images/search-actions.png b/src/content/docs/docs/platform/images/search-actions.png
new file mode 100644
index 00000000..a9a6b4bc
Binary files /dev/null and b/src/content/docs/docs/platform/images/search-actions.png differ
diff --git a/src/content/docs/docs/platform/images/search-recent-items.png b/src/content/docs/docs/platform/images/search-recent-items.png
new file mode 100644
index 00000000..c41e563d
Binary files /dev/null and b/src/content/docs/docs/platform/images/search-recent-items.png differ
diff --git a/src/content/docs/docs/platform/index.mdx b/src/content/docs/docs/platform/index.mdx
index 529f051c..81747273 100644
--- a/src/content/docs/docs/platform/index.mdx
+++ b/src/content/docs/docs/platform/index.mdx
@@ -10,6 +10,7 @@ Use the Platform section to understand the core KloudMate workspace experience,
## In This Section
- [Homepage](./homepage/)
+- [Search](./search/)
- [Settings](./settings/)
- [KloudMate Infinity](./infinity/)
diff --git a/src/content/docs/docs/platform/search.mdx b/src/content/docs/docs/platform/search.mdx
new file mode 100644
index 00000000..e4d5e29f
--- /dev/null
+++ b/src/content/docs/docs/platform/search.mdx
@@ -0,0 +1,99 @@
+---
+title: "Search"
+description: "Find dashboards, alerts, incidents, services, metrics, and settings in your workspace from the search box in the header, and jump to logs or traces for any text."
+sidebar:
+ label: "Search"
+ order: 2.2
+---
+
+Search finds things in your current workspace by name: the dashboards, alert rules, and incidents your team made, the services and hosts you monitor, your metric names, and the settings pages. Open it from the **Search** field in the header, or press ⌘ K on a Mac or Ctrl K on Windows and Linux.
+
+Use the arrow keys to move through the results and Enter to open one. To open a result in a new tab, hold ⌘ or Ctrl while you press Enter or click. If you're typing in an editor that has its own ⌘ K shortcut, such as a comment box, the editor keeps it.
+
+Search matches names, titles, and tags. It doesn't read the contents of your logs and traces. To search those, choose **Search logs for** or **Search traces for** at the bottom of the results, which opens the explorer with your text as a free-text filter.
+
+## What you can find
+
+| Type | Matches on |
+| --- | --- |
+| Dashboards | Name and tags. Folders aren't included. |
+| Alert rules | Name and tags. Folders aren't included. |
+| Alerts | Title, for open alerts only. |
+| Incidents | Title and number, for open and resolved incidents. |
+| Issues | The start of the error message and the error type. |
+| SLOs | Name. |
+| Synthetic monitors | Name. |
+| Workflows | Name and tags. |
+| Status pages | Name. |
+| Saved queries | Name and tags. A saved query opens in Logs or Traces with its filters applied. |
+| Reports | Name. |
+| On-call schedules, escalation policies, and incident services | Name. |
+
+You only see results from the modules your role lets you read. For example, if your role can't see incidents, incidents don't appear in your results.
+
+### Services, hosts, and other things you monitor
+
+Search also finds what your workspace monitors: services, hosts, Kubernetes namespaces and workloads, network devices, databases, and cloud resources. Pods, containers, network endpoints, storage mounts, security groups, and subnets aren't included, because they come and go or there are too many of them to be useful. Search for the workload or host instead.
+
+This list updates every hour, so a service you started sending data for a few minutes ago may not show up yet. The APM, Hosts, and Kubernetes pages show it right away.
+
+A network device is identified by its address. If several devices report the same address, they appear as a single result.
+
+### Metric names
+
+Search finds metrics that reported in the last seven days, by name and description. Choosing one opens it in the metric explorer.
+
+If the metric names take longer than half a second to load, search shows the rest of your results without them and tells you that metric names are missing. Search again to retry.
+
+### IDs you paste
+
+Paste an ID to go straight to what it names:
+
+- A trace ID, the 32-character hex ID, opens the trace if it's stored.
+- An incident number, such as `#42` or `42`, opens the incident.
+- An AWS ARN opens the resource in Cloud Inventory.
+
+### Pages, settings, and actions
+
+Search also lists the pages in the sidebar and the settings pages you can open, such as **Users**, **Workspaces**, **Data Sources**, **Ingest Keys**, **Notification Channels**, and **Connections**.
+
+When the search box is empty, it shows shortcuts to create a dashboard, alert rule, SLO, synthetic monitor, or workflow, and to start an investigation. You only see the ones your role lets you create.
+
+
+
+### Recent items
+
+When the search box is empty, it also shows the last five things you opened from search and the last five searches you ran in this workspace. They're stored in your browser, so they don't follow you to another browser or device. To remove one, hover over it and click the **×**.
+
+
+
+## How results are matched
+
+Results appear from the first character you type and narrow as you keep typing.
+
+Every word you type has to appear in the name, in any order. For example, `checkout latency` finds **Checkout p99 latency** but not **Checkout errors**. Search doesn't correct typos, so `chekout` finds nothing.
+
+Each group shows up to five results, best match first:
+
+1. A name that matches your text exactly, or the incident number, ARN, or trace ID you pasted.
+2. A name that starts with your text.
+3. A name with a word that starts with your text.
+4. A name that contains your text.
+5. An item whose tags match but whose name doesn't.
+
+Resolved incidents and closed issues come after the open ones, however well their names match.
+
+:::note
+An issue matches on the start of its raw error message. If the message is a JSON log, a search for a field name such as `level` can match it even though the title shows only the readable message.
+:::
+
+## What search doesn't cover
+
+These aren't searchable yet. Open them from their own pages:
+
+- Investigations and Assistant chats.
+- API endpoints, RUM applications, and RUM routes.
+- Alert sources, maintenance windows, and routing rules.
+- Workflow runs, variables, storage, and templates.
+- Individual users, roles, API keys, notification channels, connections, and data sources. Their settings pages are searchable.
+- Other workspaces in your organization. Search covers the workspace you're in.
diff --git a/src/content/docs/docs/platform/settings/api-keys.mdx b/src/content/docs/docs/platform/settings/api-keys.mdx
index 80e2f896..cea97d96 100644
--- a/src/content/docs/docs/platform/settings/api-keys.mdx
+++ b/src/content/docs/docs/platform/settings/api-keys.mdx
@@ -10,7 +10,7 @@ import { Steps } from '@astrojs/starlight/components';
KloudMate has two kinds of API key, each for a different job:
-- **Personal API Keys** authenticate *you*. Use one to read your data through the KloudMate API, or to connect a script or tool to the [MCP server](../../../kloudmate-assistant/mcp-server/). The key carries your own account's permissions.
+- **Personal API Keys** authenticate *you*. Use one to call the KloudMate REST API from a script, or to connect a tool to the [MCP server](../../../kloudmate-assistant/mcp-server/). The key carries your own account's permissions.
- **Ingest Keys** authenticate a *workspace's data pipeline*. Your OpenTelemetry collectors, SDKs, and the KloudMate agent use one to send logs, metrics, and traces into a single workspace.
## Personal API Keys
@@ -19,19 +19,15 @@ A personal key acts on your behalf. It's tied to **your** account and pinned to
Find your personal keys in the account menu (top-right) under **API keys**, on the **Personal API Keys** screen in your profile. Anyone can create one, whatever their [role](../roles/), because the key can only do what you can already do.
-Pass it as a bearer token:
-
-```http
-Authorization: Bearer YOUR_API_KEY
-```
-
-...or in the `x-api-key` header:
+For the REST API, send the key in the `x-api-key` header:
```http
x-api-key: YOUR_API_KEY
```
-Use it for any script or service that queries your observability data. It also connects the [KloudMate MCP server](../../../kloudmate-assistant/mcp-server/) to a client that can't sign in with OAuth. A client that supports OAuth, such as Claude, Cursor, or VS Code, can sign in to the MCP server instead, without a key. Because the key carries your access, treat it like a password. Anyone holding it can act as you.
+The REST API doesn't accept the key as `Authorization: Bearer`. A request sent that way fails with `401 Invalid token`. The [MCP server](../../../kloudmate-assistant/mcp-server/) is different: it takes the key as a bearer token.
+
+Use it for any script or service that queries your observability data. A key can also create, update, and delete dashboards and add annotations, within the permissions you have. See [Dashboard JSON and API](../../../visualize-data/dashboards/dashboard-json-and-api/). It also connects the [KloudMate MCP server](../../../kloudmate-assistant/mcp-server/) to a client that can't sign in with OAuth. A client that supports OAuth, such as Claude, Cursor, or VS Code, can sign in to the MCP server instead, without a key. Because the key carries your access, treat it like a password. Anyone holding it can act as you.
:::note
A personal key spans every workspace you can reach, so a tool that reads from **one** workspace at a time, like the MCP server, also needs the target workspace on each request. The [MCP server](../../../kloudmate-assistant/mcp-server/#connect-with-an-api-key) setup shows how to send it in the `x-workspace-id` header.
@@ -43,7 +39,7 @@ Ingest keys send telemetry into a single workspace. A key belongs to the workspa
There are two kinds.
-### Ingest Key — Backend
+### Ingest Key: Backend
A Backend ingest key is for server-side telemetry. Your OpenTelemetry collectors, SDKs, and the KloudMate agent use it to ship logs, metrics, and traces. It bypasses CORS and puts no restriction on where data comes from, so keep it on your servers — never ship it in a browser or mobile app.
@@ -57,7 +53,7 @@ exporters:
Authorization: "Bearer YOUR_API_KEY"
```
-### Ingest Key — Frontend
+### Ingest Key: Frontend
A Frontend ingest key is for telemetry sent straight from a browser or mobile app, such as [Real-User Monitoring](../../../rum/). Because the key ships in client code where anyone can read it, you must list the **allowed hosts** it can send from. Data from any other origin is rejected, which limits the damage if the key leaks.
@@ -97,7 +93,7 @@ Either way, the key is shown **once**, right after you create it:
> Please copy and save the API key below as it will not be shown again.
-Copy it then and store it somewhere safe — a secret manager, your client's config, or a CI secret. There's no way to retrieve it later; if you lose it, create a new one and delete the old.
+Copy it then and store it somewhere safe, such as a secret manager, your client's config, or a CI secret. There's no way to retrieve it later; if you lose it, create a new one and delete the old.
## Edit or delete a key
diff --git a/src/content/docs/docs/platform/settings/cold-storage/index.mdx b/src/content/docs/docs/platform/settings/cold-storage/index.mdx
index c051d152..62f9629e 100644
--- a/src/content/docs/docs/platform/settings/cold-storage/index.mdx
+++ b/src/content/docs/docs/platform/settings/cold-storage/index.mdx
@@ -45,7 +45,7 @@ An organization Owner is an Admin in every workspace. A [custom role](../roles/c
## Pricing
- **Archiving** has no KloudMate charge. AWS bills your account for storing the files in S3.
-- **Rehydration** costs $0.10 per GB, measured on the volume the workspace originally ingested for the hours you load, not on the compressed Parquet size. For example, loading a day in which the workspace ingested 50 GB of logs costs $5.00. The charge appears on your KloudMate bill as **Log Rehydration**.
+- **Rehydration** is charged per GB, measured on the volume the workspace originally ingested for the hours you load, not on the compressed Parquet size. The rate is on [kloudmate.com/pricing](https://www.kloudmate.com/pricing). The charge appears on your KloudMate bill as **Log Rehydration**.
- **Reading files out of S3** during a rehydration is billed by AWS as data transfer. The estimate shows the size that will be read from S3, but its charge covers only KloudMate's part, not AWS's.
## Next steps
diff --git a/src/content/docs/docs/platform/settings/cold-storage/rehydrate-logs.mdx b/src/content/docs/docs/platform/settings/cold-storage/rehydrate-logs.mdx
index 1fec4176..050266bf 100644
--- a/src/content/docs/docs/platform/settings/cold-storage/rehydrate-logs.mdx
+++ b/src/content/docs/docs/platform/settings/cold-storage/rehydrate-logs.mdx
@@ -116,7 +116,7 @@ Either way, the hours that already loaded are still charged.
## Pricing
-Rehydration costs $0.10 per GB, measured on the volume the workspace originally ingested for each hour that loads. Each hour is charged as it loads, so hours that fail to load aren't charged. The charge appears on your KloudMate bill as **Log Rehydration**.
+Rehydration is charged per GB, measured on the volume the workspace originally ingested for each hour that loads. The rate is on [kloudmate.com/pricing](https://www.kloudmate.com/pricing). Each hour is charged as it loads, so hours that fail to load aren't charged. The charge appears on your KloudMate bill as **Log Rehydration**.
AWS bills your account separately for the data read out of S3. That cost isn't part of the estimate's **Charge**, but the estimate shows the size read from S3, so you can work it out from AWS's data transfer pricing.
diff --git a/src/content/docs/docs/platform/settings/connections/connect-an-account.mdx b/src/content/docs/docs/platform/settings/connections/connect-an-account.mdx
index 506d93c2..f08fde24 100644
--- a/src/content/docs/docs/platform/settings/connections/connect-an-account.mdx
+++ b/src/content/docs/docs/platform/settings/connections/connect-an-account.mdx
@@ -10,7 +10,7 @@ You need the **Admin** role to connect an account. Open **Settings → Connectio
The picker lists only the providers your organization can connect. If a provider you expect is missing, see [Providers](../providers/#providers-in-your-plan).
-
+
Pick a provider and fill in the **Connection name**. How you finish depends on the provider.
diff --git a/src/content/docs/docs/platform/settings/connections/http-endpoint.mdx b/src/content/docs/docs/platform/settings/connections/http-endpoint.mdx
new file mode 100644
index 00000000..5dcbb4c3
--- /dev/null
+++ b/src/content/docs/docs/platform/settings/connections/http-endpoint.mdx
@@ -0,0 +1,211 @@
+---
+title: "HTTP Endpoint"
+description: "Connect a JSON, CSV, or TSV endpoint and query it from dashboard panels and Explore."
+sidebar:
+ order: 5.5
+---
+
+An **HTTP endpoint** connection lets a dashboard panel read data from any URL that returns JSON, CSV, or TSV: a REST API, a CSV file in a GitHub repository, or a Google Sheet. The connection holds the base URL, the credential, and the hosts it's allowed to reach. Each query holds only the path and how to turn the response into rows and columns, so you can point many panels at one connection and rotate its credential in one place.
+
+## Create the connection
+
+You need the **Admin** role to create a connection.
+
+1. Open **Settings → Connections** and click **Connect**.
+2. Choose **HTTP endpoint**.
+3. Enter a **Connection name**, for example `GitHub API`. This is the name you pick in a panel's data source picker.
+4. Under **Authentication**, choose how requests authenticate:
+ - **None** sends no credential.
+ - **Bearer token** sends the **Token** you enter as a bearer token.
+ - **Username and password** sends a **Username** and **Password** with basic authentication.
+ - **API key in a header** sends the **API key** in the header you name under **Header name**, such as `X-API-Key`. Only the key is encrypted. The header name isn't a secret, so other admins can see it.
+5. Enter the **Base URL**, for example `https://api.example.com/v1`. Queries store a path relative to it, so you can move to a new host later without editing every panel.
+6. Fill in **Allowed hosts**, **Requests outside the allowed hosts**, and **Additional methods** if you need them. The sections below explain each one.
+7. Click **Connect**.
+
+The connection can be used for **Data source** and appears in the data source picker in dashboard panels and Explore.
+
+### Allowed hosts
+
+Leave **Allowed hosts** empty to let queries reach only the base URL's host. To reach more than one host, list them, separated by commas. When you fill it in, the list replaces the default, so include the base URL's host as well if queries still use it.
+
+A wildcard matches subdomains. `*.example.com` matches one level, such as `api.example.com`. `**.example.com` matches any number of levels, such as `eu.api.example.com`.
+
+A connection that sends a credential must name the hosts it can reach, either in the base URL or in **Allowed hosts**. That stops a query from sending your credential to a host you didn't choose. Queries can never reach internal addresses.
+
+### Requests outside the allowed hosts
+
+This setting applies only to a connection with **Authentication** set to **None**. A connection that sends a credential always refuses a host it doesn't allow.
+
+- **Refuse (default)** blocks the query, and the panel shows an error.
+- **Run, and show a warning on the panel** runs the query and adds a warning icon to the panel header.
+- **Run silently** runs the query with no warning.
+
+With **Refuse**, the connection needs a base URL or at least one allowed host, or every query is refused.
+
+### Additional methods
+
+Queries can always use `GET`. To allow `POST`, `PUT`, `PATCH`, or `DELETE`, add them under **Additional methods**. Add them only when you mean to: any member who can run a query can then send that method with the connection's credential, and it can change data at the endpoint.
+
+### Verification
+
+When you save, KloudMate sends a `GET` request to the base URL. Any HTTP response counts as reachable, even an error status. If nothing answers, the connection is still saved but marked **Degraded**, and queries still run through it. Click **Edit** beside it to fix the base URL or the credential. A connection without a base URL has nothing to check, so it's saved as **Verified**.
+
+## Query the endpoint in a panel
+
+In the panel editor or Explore, pick the connection in the data source picker. See [Queries and Data Sources](../../../../visualize-data/dashboards/adding-a-panel/queries-and-data-sources/) for how the picker and the rest of the query editor work.
+
+### Method and URL
+
+Choose the **Method**: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`. `POST`, `PUT`, `PATCH`, and `DELETE` work only when the connection allows them under **Additional methods**.
+
+Enter the **URL** as a path, such as `/orgs/kloudmate/repos`. The path is added to the connection's base URL. A full URL also works, as long as its host is allowed on the connection.
+
+For any method other than `GET`, a **Request body** field appears. Enter the body the endpoint expects, for example `{ "query": "status:open" }`.
+
+### Format
+
+**Format** sets how the response is read and what the request asks for:
+
+| Format | Request header | How the response is read |
+|---|---|---|
+| **Auto** | `Accept: application/json` | As CSV or TSV when the response says it is, otherwise as JSON. |
+| **JSON** | `Accept: application/json` | As JSON. |
+| **CSV** | `Accept: text/csv` | As CSV. |
+| **TSV** | `Accept: text/tab-separated-values` | As TSV. |
+
+**Auto** suits most APIs. Some endpoints send CSV only when the request asks for CSV, so choose **CSV** or **TSV** for those.
+
+### Rows
+
+For a JSON response, **Rows** says which part of the response holds the rows, written as [JMESPath](https://jmespath.org/). Leave it empty to use the whole response: an array becomes the rows, and an object becomes one row. An array of plain values becomes a one-column table with a column named `value`.
+
+For example:
+
+- `data.results` reads the rows from the `results` array inside `data`.
+- `results[?active]` keeps only the rows where `active` is true.
+- `data."my-key"` reads a key that contains a dash. Put double quotes around any key that contains anything other than letters, digits, or underscores.
+
+**Rows** is shown only when **Format** is **Auto** or **JSON**.
+
+### Columns
+
+Leave **Columns** empty and every field in a row becomes a column. Add columns to choose which fields show, what they're called, and what type they are. Click **Add column**, then set:
+
+- **Selector**: the field to read, written as a dot path into the row. For example, `user.address.city`, `metrics[0].value`, or `attributes["service.name"]`. This is a plain path, not JMESPath.
+- **Column name**: the column's heading. It fills in from the last part of the selector, and each name must be unique. A column with no **Column name** yet is left out, so the query keeps running while you fill it in.
+- **Type**: **Text**, **Number**, **True or false**, or **Time**.
+
+For a **Time** column, choose how the value is written: **Detect**, **ISO 8601**, **Seconds**, **Milliseconds**, **Microseconds**, **Nanoseconds**, or a pattern you type, such as `YYYY-MM-DD HH:mm`. When the query has a **Time** column, rows are sorted by it, oldest first.
+
+Drag a column to change the order the columns appear in. To set a unit on a column, use an [override](../../../../visualize-data/dashboards/panel-options/overrides/).
+
+### Transform
+
+Use **Transform** when the rows need more than picking fields: one row per element of an array, arithmetic, an aggregation, a filter, or an order. Write it as a JSON array of stages in the [MongoDB aggregation syntax](https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages/). The stages run in order, after **Rows** selects the rows and before **Columns** reads them.
+
+The allowed stages are `$unwind`, `$project`, `$addFields`, `$match`, `$sort`, `$limit`, and `$group`, and a transform can have at most 12 of them. A response isn't a MongoDB collection, so rows don't carry an `_id` field and a stage can't read from another collection.
+
+For example, this transform counts open issues per label:
+
+```json
+[
+ { "$match": { "state": "open" } },
+ { "$unwind": "$labels" },
+ { "$group": { "_id": "$labels.name", "issues": { "$sum": 1 } } },
+ { "$sort": { "issues": -1 } }
+]
+```
+
+Besides the standard operators, you can hash or encode a value with `$sha256`, `$md5`, `$base64Encode`, and `$urlEncode`. A null input stays null. `$$NOW` gives the current time, and it's the same value for every row in the run. As you type, the editor suggests stages, operators, and the field names from the last result.
+
+If the transform has a mistake, the editor shows it under the field, and the query fails until you fix it. The panel and the save message name the same mistake, and the dashboard can't be saved until the transform parses. A transform with a mistake stays as you typed it, so reopening the panel shows it unchanged. A transform without one is saved as its stages, so reopening the panel shows it formatted, with one key on each line.
+
+A `$project` or `$group` stage returns its fields in alphabetical order, so the table shows them alphabetically until **Columns** sets an order. When the last stage's fields don't match your columns, click **Set columns from the pipeline** to fill **Columns** in the order the stage lists them. Fields that an `$addFields` stage adds after it come next.
+
+### Row and size limits
+
+When a query has a transform, it stops at 10,000 rows or 16 MB of rows after the transform, whichever comes first. The panel then shows the **Rows cut** badge and a warning in its header. Narrow the query, or project fewer fields, to see the rest. A query without a transform has no row limit.
+
+## Example: list GitHub releases in a table
+
+This example shows the 10 most recent stable releases of a public repository.
+
+1. Create an **HTTP endpoint** connection named `GitHub API` with the **Base URL** `https://api.github.com`. Set **Authentication** to **None**, or to **Bearer token** with a GitHub personal access token. GitHub rate-limits unauthenticated API requests heavily, so use a token for a dashboard that refreshes often.
+2. Add a panel to a dashboard and pick `GitHub API` in the data source picker.
+3. Set **Method** to `GET` and **URL** to `/repos/open-telemetry/opentelemetry-collector/releases?per_page=50`. Leave **Format** on **Auto** and **Rows** empty, because the response is an array of releases.
+4. In **Transform**, drop the pre-releases and keep the first 10:
+
+ ```json
+ [
+ { "$match": { "prerelease": false } },
+ { "$limit": 10 }
+ ]
+ ```
+
+5. Add these columns:
+
+ | Selector | Column name | Type |
+ |---|---|---|
+ | `tag_name` | `Release` | **Text** |
+ | `published_at` | `Published` | **Time**, **ISO 8601** |
+ | `author.login` | `Author` | **Text** |
+ | `html_url` | `Link` | **Text** |
+
+6. Choose the **Table** panel type and click **Run Query**.
+
+The table lists one release per row. Because `Published` is a **Time** column, the rows are sorted oldest first.
+
+## Paste a link from your browser
+
+You can paste the link you see in your browser for a file on GitHub, GitLab, or Google Sheets. KloudMate rewrites it to the link that serves the raw data:
+
+| You paste | The query reads |
+|---|---|
+| A GitHub file page: `https://github.com///blob//` | The raw file from `raw.githubusercontent.com` |
+| A Google Sheet: `https://docs.google.com/spreadsheets/d//edit#gid=` | The sheet's CSV export, for the tab in the link. With **Format** set to **TSV**, its TSV export. |
+| A GitLab file page: `https://gitlab.com//-/blob//` | The raw file from `gitlab.com` |
+
+For example, to read a Google Sheet that's shared with **Anyone with the link**, create a connection with the **Base URL** `https://docs.google.com` and **Authentication** set to **None**. In the query, paste the sheet's link into **URL** and set **Format** to **CSV**. Each row of the sheet becomes a row, with the first row as the column names.
+
+The raw data for GitHub and Google Sheets is served from a different host than the one you pasted. A connection with **Authentication** set to **None** is allowed to reach that host automatically. A connection that sends a credential isn't, so add `raw.githubusercontent.com` or `**.googleusercontent.com` to its **Allowed hosts**, or the query is refused.
+
+## Fix a query error
+
+When a query fails, the panel shows the error with the query's name. Click **Show details** for more, such as the exact parser error or the endpoint's full answer. The same errors are on the **Errors** tab of **Inspect**.
+
+| Message starts with | What to do |
+|---|---|
+| This connection cannot reach that host. | Add the host to **Allowed hosts** on the connection. |
+| That host resolves to an internal address. | Use a public address. Queries can't reach internal addresses. |
+| The endpoint redirected to a host that this connection cannot reach. | Add the host it redirects to under **Allowed hosts**. |
+| `` is not enabled on this connection. | Add the method under **Additional methods** on the connection. |
+| This connection sends a credential, so it must name the hosts it can reach. | Set a **Base URL** or **Allowed hosts** on the connection. |
+| This connection refuses requests outside its allowed hosts, but names no hosts. | Set a **Base URL** or **Allowed hosts**, or change **Requests outside the allowed hosts**. |
+| The credential on this connection could not be read. | Edit the connection and enter the credential again. |
+| No response from the endpoint. | Check the URL, and that the endpoint is running and reachable from the internet. |
+| No response from the endpoint in time. | Make the query smaller, for example with a narrower time range or fewer results per page. |
+| The response is larger than this connection allows. | Make the query smaller. |
+| ``: `` | The reason is the endpoint's own message, such as `403: API rate limit exceeded` or `401: Bad credentials`. Click **Show details** for the full response. A `401` or `403` usually means the credential is wrong or lacks access, a `404` that the URL is wrong, and a `429`, or a `403` that names a rate limit, that the endpoint wants fewer requests. |
+| Received status code ``. | The endpoint sent no message, so the status is named, such as `404 (Not Found)`, with a note when the response body was empty. Read the status as above. |
+| The connection `""` is switched off. | Click **Open connection** beside the error, and turn the connection on. |
+| The connection `""` has been revoked. | Click **Open connection** beside the error, and reconnect it. |
+| The connection `""` is private. | Share the connection with the workspace, or choose a shared connection for the query. A dashboard query can't use a private connection. |
+| The connection this query uses no longer exists. | Choose another connection for the query. |
+| A query can use only an http or https URL. | Start the URL with `http://` or `https://`, or enter a path. |
+| The query does not make a valid URL. | Check the URL for typos and characters that need encoding. |
+| This connection has no base URL, so the query needs a full URL that starts with http:// or https://. | Enter the full URL, or set a **Base URL** on the connection to use a path. |
+| The endpoint redirected too many times. | Use the final URL the endpoint redirects to. |
+| The response could not be read as rows. | Read the detail. An HTML page means the URL opens a web page, not the data behind it. Find the endpoint's raw-data or API URL instead. XML isn't supported. A `Nothing was found at` detail means **Rows** points at a key that isn't in the response. |
+| The row selector is not valid. | Put double quotes around keys that contain anything other than letters, digits, or underscores, as in `data."my-key"`. |
+| The transform could not run. | Read the detail after the message, and fix the stage it names. |
+| This query cannot run. | Fix what the rest of the message names, such as a transform stage that isn't allowed or a transform that isn't valid JSON. |
+
+The header warning **This connection does not enforce its host allowlist.** means the connection is set to **Run, and show a warning on the panel**. Add the host to **Allowed hosts**, or change the setting to **Refuse (default)**.
+
+## Related
+
+- [Queries and Data Sources](../../../../visualize-data/dashboards/adding-a-panel/queries-and-data-sources/)
+- [Connect an account](../connect-an-account/)
+- [Manage a connection](../manage-connections/)
+- [Providers](../providers/)
diff --git a/src/content/docs/docs/platform/settings/connections/images/connect-provider-picker.png b/src/content/docs/docs/platform/settings/connections/images/connect-provider-picker.png
index ad7a97ce..89f3a69b 100644
Binary files a/src/content/docs/docs/platform/settings/connections/images/connect-provider-picker.png and b/src/content/docs/docs/platform/settings/connections/images/connect-provider-picker.png differ
diff --git a/src/content/docs/docs/platform/settings/connections/images/connections-list.png b/src/content/docs/docs/platform/settings/connections/images/connections-list.png
index 3c7d666c..0ca45f48 100644
Binary files a/src/content/docs/docs/platform/settings/connections/images/connections-list.png and b/src/content/docs/docs/platform/settings/connections/images/connections-list.png differ
diff --git a/src/content/docs/docs/platform/settings/connections/index.mdx b/src/content/docs/docs/platform/settings/connections/index.mdx
index 1ff42c79..376f680f 100644
--- a/src/content/docs/docs/platform/settings/connections/index.mdx
+++ b/src/content/docs/docs/platform/settings/connections/index.mdx
@@ -54,7 +54,7 @@ When a connection isn't working, a banner at the top of the page says how many,
A row that needs attention has its fix beside its status: **Authorize** for an approval that never finished, **Reconnect** for a provider you approve at its own site, or **Edit** for one whose credential you type in.
-
+
## In this section
diff --git a/src/content/docs/docs/platform/settings/connections/providers.mdx b/src/content/docs/docs/platform/settings/connections/providers.mdx
index 33724429..d4fce170 100644
--- a/src/content/docs/docs/platform/settings/connections/providers.mdx
+++ b/src/content/docs/docs/platform/settings/connections/providers.mdx
@@ -52,6 +52,9 @@ Meetings hosted by a Basic Zoom account end after 40 minutes, so install the Zoo
|---|---|---|
| **Custom MCP Server** | A server URL, a transport of Streamable HTTP or SSE, and one **Authentication** option: **None**, **Bearer token**, **Basic auth** (a username and a password or API token), **API key** (sent in a header you choose), or **OAuth** (sign in on the server's own page). Extra headers can be sent alongside, for a server that wants a routing header as well as a credential. | Workflows, AI |
| **OAuth 2.0** | Your own authorize and token URLs, scopes, client id, and client secret, with either the client-credentials or the authorization-code grant. | Workflows |
+| **HTTP endpoint** | A base URL and one **Authentication** option: **None**, **Bearer token**, **Username and password**, or **API key in a header**. See [HTTP Endpoint](../http-endpoint/). | Data source |
+
+Use **HTTP endpoint** to query a JSON, CSV, or TSV endpoint from a dashboard panel.
Use **OAuth 2.0** to give an [HTTP Request](/workflows/actions/#http-request) step a credential that's refreshed for you and never stored in the workflow definition.
diff --git a/src/content/docs/docs/platform/settings/images/organization-profile.png b/src/content/docs/docs/platform/settings/images/organization-profile.png
index e677289d..71a08464 100644
Binary files a/src/content/docs/docs/platform/settings/images/organization-profile.png and b/src/content/docs/docs/platform/settings/images/organization-profile.png differ
diff --git a/src/content/docs/docs/platform/settings/organization.mdx b/src/content/docs/docs/platform/settings/organization.mdx
index 22595dd7..9ec64d81 100644
--- a/src/content/docs/docs/platform/settings/organization.mdx
+++ b/src/content/docs/docs/platform/settings/organization.mdx
@@ -1,6 +1,6 @@
---
title: "Organization"
-description: "Manage your organization's display name, default timezone, overage policy, and your own membership."
+description: "Manage your organization's display name, default timezone, overage policy, and your own membership, or create a new organization."
sidebar:
label: "Organization"
order: 1.5
@@ -14,7 +14,7 @@ Open **Settings → Organization** to view or edit these settings.
Only an organization owner can edit these settings. Other members see the page in read-only mode.
:::
-
+
## General
@@ -59,6 +59,16 @@ The **MFA** column in the **Users** list shows whether MFA is on for each member
Sessions that signed in with SSO are exempt at sign-in, when switching organizations, and when accepting an invite, whichever identity provider was used, because the identity provider handles the second factor.
:::
+## Create a New Organization
+
+Create a separate organization when you need its own members, workspaces, and billing. Any member can create one, whatever their role in the current organization.
+
+1. Open **Settings → Organization**.
+2. In the **Create new organization** card, click **Create organization**.
+3. Complete the setup wizard, the same as in [Setting up KloudMate](../../../getting-started/setting-up-kloudmate/).
+
+Nothing carries over from the current organization.
+
## Leave an Organization
Instead of asking an owner to remove you, you can leave an organization yourself — useful cleanup if you've accumulated memberships in organizations or workspaces you no longer use.
diff --git a/src/content/docs/docs/profiling/flame-graph.mdx b/src/content/docs/docs/profiling/flame-graph.mdx
index d836d1cb..ac883e45 100644
--- a/src/content/docs/docs/profiling/flame-graph.mdx
+++ b/src/content/docs/docs/profiling/flame-graph.mdx
@@ -10,7 +10,7 @@ sidebar:
## The toolbar
- **Profile type** — switch between CPU, heap, goroutines, or whatever else this service reports, without leaving the page.
-- **Filter by label** — add the same resource-attribute filters you'd set on [Labels](../labels/) directly here.
+- **Filter by label:** add the same resource-attribute filters you'd set on [Labels](../labels/) directly here. Pick a label, then an operator and a value, and each filter appears as a chip you can remove. The label filter doesn't offer regex operators.
- **Highlight frames** — type a function name and every matching frame gets an amber outline in the flame graph below, without changing what's rendered.
- **Split / Flamegraph / Table** — choose whether you see the table and flame graph side by side, or either one full-width.
diff --git a/src/content/docs/docs/rum/rum-interface.mdx b/src/content/docs/docs/rum/rum-interface.mdx
index 5ed8d504..065e22b5 100644
--- a/src/content/docs/docs/rum/rum-interface.mdx
+++ b/src/content/docs/docs/rum/rum-interface.mdx
@@ -231,6 +231,8 @@ Not every filter is applicable to every tab. For example, a route filter doesn't
When a filter can't be applied to the current tab, it is shown as struck through with an explanation. It is also excluded from the query rather than being silently ignored.
+The filters are kept in the address as [KMQL](../../visualize-data/kmql/) in the `q` parameter, so a copied address opens the same filtered view. Old links that carry `filters=` still open. If `q` doesn't parse, the page shows the reason with **Clear filters** and runs nothing.
+
### Filter on a payload attribute
You can filter events using any attribute included in the event payload. Numeric attributes support comparison operators such as `>`, `>=`, `<`, and `<=`. For example, `cart_size > 2` matches events where `cart_size` is greater than 2.
diff --git a/src/content/docs/docs/synthetic/index.mdx b/src/content/docs/docs/synthetic/index.mdx
index dbbf9c82..122850cc 100644
--- a/src/content/docs/docs/synthetic/index.mdx
+++ b/src/content/docs/docs/synthetic/index.mdx
@@ -34,11 +34,14 @@ If your endpoint or service is behind a firewall or blocks requests from public
| US | `100.57.144.150` |
| US | `54.166.225.155` |
+If you can't allowlist these IPs, or the target only accepts traffic from your own network (for example, a vendor API that allows only your subnet), run the monitor from a [private location](private-locations/) instead.
+
## Main Components
+
diff --git a/src/content/docs/docs/synthetic/private-locations.mdx b/src/content/docs/docs/synthetic/private-locations.mdx
new file mode 100644
index 00000000..23ed14be
--- /dev/null
+++ b/src/content/docs/docs/synthetic/private-locations.mdx
@@ -0,0 +1,125 @@
+---
+title: "Private Locations"
+description: "Run synthetic monitors from your own network with the KloudMate Agent, for targets that only accept your IP addresses or aren't reachable from the internet."
+sidebar:
+ label: "Private Locations"
+ order: 3
+---
+
+A private location runs your synthetic monitors from a host inside your own network instead of from KloudMate's public locations. Use one when a target can't be reached from the internet, or when it only accepts traffic from your IP addresses.
+
+The most common case: your application calls a third-party API, and that vendor only allows requests from your subnet or your NAT gateway's IP. A check from a KloudMate public location gets blocked. A check from a private location leaves through your network, from an IP the vendor already allows, so it behaves like your application's own request.
+
+Private locations also cover services that are only reachable inside your network, such as an internal API (`http://orders.internal:8080/health`), a database port, or a host on a private IP.
+
+## How it works
+
+The KloudMate Agent on a Linux or Windows machine can act as a private location. You turn the feature on in the agent's config, give the location a name, and restart the agent. The agent then:
+
+1. Opens one outbound WebSocket connection to the synthetics service (`wss://synthetics.kloudmate.com/ws`). It needs no inbound port.
+2. Registers the location in the workspace that owns the agent's API key. Only that workspace sees it.
+3. Runs the checks assigned to that location from the host it's installed on, and sends back the results.
+
+Each check's traffic starts on the agent's machine, so the target sees that machine's IP, or your NAT gateway's IP if the machine sits behind one. That's the address to give your vendor.
+
+## Before you start
+
+- **KloudMate Agent 2.12.0 or later** on a Linux or Windows machine (a VM or a physical server) that can reach your targets. To install it, see [Linux](../../kloudmate-agent/installation/linux-agent/) or [Windows](../../kloudmate-agent/installation/windows-agent/). The Docker and Kubernetes agents don't run private locations.
+- **Outbound HTTPS (port 443)** from that machine to `synthetics.kloudmate.com`, in addition to the hosts the agent already uses.
+- **The right egress IP.** If a vendor allowlists your IPs, make sure this machine's outbound traffic leaves through one of them. Running `curl -s https://ifconfig.me` on it shows the IP the vendor will see.
+
+:::caution
+If the machine only reaches the internet through an HTTP proxy, the agent's connection to KloudMate works, but HTTP checks don't use the proxy yet. They connect to the target directly, so the target has to be reachable from the machine without one.
+:::
+
+## Turn on a private location (Linux)
+
+1. Open the agent's config, `/etc/kmagent/agent.yaml`, and add these two lines. Replace `dc-mumbai-1` with the name you want to see in KloudMate:
+
+ ```yaml
+ synthetic-worker: true
+ synthetic-worker-location: dc-mumbai-1
+ ```
+
+2. Restart the agent:
+
+ ```bash
+ sudo systemctl restart kmagent
+ ```
+
+3. Check that the location is connected:
+
+ ```bash
+ kmagent status
+ ```
+
+ Look for the **Synthetics** line:
+
+ ```text
+ Synthetics: private location dc-mumbai-1, connected 12s ago → wss://synthetics.kloudmate.com/ws; 0 checks run (0 failed)
+ ```
+
+If the line says `connecting` for more than a minute, or `disconnected`, look under **Problems** at the end of the output. It gives the reason, such as a blocked outbound connection or a rejected API key.
+
+Agent upgrades keep `agent.yaml` as you left it, so the location survives them.
+
+## Turn on a private location (Windows)
+
+1. Open `C:\ProgramData\kmagent\agent.yaml` as an administrator and add the same two lines:
+
+ ```yaml
+ synthetic-worker: true
+ synthetic-worker-location: dc-mumbai-1
+ ```
+
+2. Restart the agent service from an administrator PowerShell:
+
+ ```powershell
+ Restart-Service kmagent
+ ```
+
+The location appears in the monitor form once it connects.
+
+## Settings
+
+Only `synthetic-worker` and `synthetic-worker-location` are required. Add any of the others to `agent.yaml` the same way, then restart the agent.
+
+| `agent.yaml` key | Default | What it does |
+| --- | --- | --- |
+| `synthetic-worker` | `false` | Turns the private location on. |
+| `synthetic-worker-location` | (none, required) | The location's name, as it appears in KloudMate. |
+| `synthetic-worker-key` | The agent's `api-key` | The API key the location connects with. The location belongs to that key's workspace. |
+| `synthetic-worker-concurrency` | `10` | How many checks run at once. The maximum is `100`. |
+| `synthetic-worker-allow-internal` | `true` | Set to `false` to refuse private, loopback and link-local targets on this location. |
+| `synthetic-worker-endpoint` | Your region's synthetics service | Only needed if KloudMate support asks you to change it. |
+
+:::note
+The location belongs to the workspace of the API key it connects with. To serve a different workspace from the same machine, set `synthetic-worker-key` to an API key from that workspace.
+:::
+
+## Run a monitor from the private location
+
+1. Go to **Synthetic Monitoring → Monitors** and click **Add new**, or open an existing monitor.
+2. Under **Monitoring Locations**, select your location. It's listed after the public locations and has a **Private** badge.
+3. Save the monitor.
+
+Within one check interval, results from the location appear on the monitor, and the check count in `kmagent status` goes up.
+
+A monitor that runs **only** on private locations can target internal addresses: private IPs, `localhost`, and hostnames only your network resolves. If it also runs on a public location, its target has to be reachable from the internet, because the public location runs the same check.
+
+## Run several hosts for one location
+
+Give two or more agents the same location name and they share that location's checks. If one host goes down, the others keep running them. Run at least two for anything you'd alert on.
+
+If no agent for a location is connected, the location shows as **Offline** in the location list and its checks don't run until an agent reconnects. A monitor that also runs from other locations keeps getting results from them.
+
+## Limitations
+
+- **Test** on the monitor form runs from public locations only. To see how a check behaves from your private location, save the monitor and watch its results.
+- Browser checks aren't supported on private locations yet.
+- Cloud instance metadata addresses (`169.254.169.254` and its equivalents) are always refused, whatever `synthetic-worker-allow-internal` is set to.
+- HTTP checks don't use an HTTP proxy configured on the host (see the caution under [Before you start](#before-you-start)).
+
+## Turn off a private location
+
+Remove the `synthetic-worker` lines from `agent.yaml` and restart the agent (`sudo systemctl restart kmagent` on Linux, `Restart-Service kmagent` on Windows). The location shows as **Offline**. Remove it from your monitors so they stop expecting results from it.
diff --git a/src/content/docs/docs/troubleshooting.mdx b/src/content/docs/docs/troubleshooting.mdx
index 1cea5ed2..dd69b1bd 100644
--- a/src/content/docs/docs/troubleshooting.mdx
+++ b/src/content/docs/docs/troubleshooting.mdx
@@ -92,16 +92,16 @@ No. You can start on the Free plan or begin a 14-day Pro trial without a credit
Create an account at app.kloudmate.com/signup, then send data using OpenTelemetry, CloudWatch, or one of our integrations. You will start seeing your logs, metrics, and traces within minutes.
## How does the billing work?
-KloudMate uses purely usage-based pricing. You are billed monthly for the volume of logs and traces you ingest (per GB) and metrics (per million samples), plus any extended data-retention you choose. The Pro plan starts at $99 / month.
+KloudMate uses purely usage-based pricing. You are billed monthly for what you use, such as logs and traces by volume, metrics by sample count, and RUM by session. See [kloudmate.com/pricing](https://www.kloudmate.com/pricing) for current plans and prices.
## Is pricing per user or per host?
No. Every plan includes unlimited users, with no per-host or per-agent fees. You pay only for the telemetry you send — logs and traces by volume, and metrics by sample count.
-## How does data-retention pricing work?
-Each plan includes a default retention window, and you can extend it. Longer retention for logs and traces raises their storage cost by the multiplier shown in the calculator, so you can trade off how long you keep data against cost. Metrics are billed by sample count, so their retention does not change the price.
+## Does retention change the price?
+No. Each plan has its own retention window, and retention doesn't change the price. To keep logs longer, archive them to your own S3 bucket with [Cold Storage](/platform/settings/cold-storage/).
## How do AI credits work?
-KloudMate Assistant runs on credits. A chat message costs 1 credit, a full investigation costs 5, and an [Ask KloudMate Assistant](/workflows/actions/#ask-kloudmate-assistant) step in a workflow costs 1. Every plan includes a monthly allowance (5 credits on Free and 20 on Pro), and you can buy prepaid credits any time you need more. Enterprise teams can bring their own AI provider key instead of using credits.
+KloudMate Assistant runs on credits. A chat message costs 1 credit, a full investigation costs 5, and an [Ask KloudMate Assistant](/workflows/actions/#ask-kloudmate-assistant) step in a workflow costs 1. Every plan includes a monthly allowance, listed on [kloudmate.com/pricing](https://www.kloudmate.com/pricing), and you can buy prepaid credits any time you need more. Enterprise teams can bring their own AI provider key instead of using credits.
## Do you offer annual billing?
Yes. Annual billing is available at a discount compared with paying monthly. Get in touch and we will set it up for you.
@@ -110,7 +110,7 @@ Yes. Annual billing is available at a discount compared with paying monthly. Get
We accept all major credit and debit cards. Enterprise customers can also pay by invoice — talk to us and we will set that up.
## Can I change plans at any time?
-Yes. You can upgrade, downgrade, or adjust retention whenever you need, and the change is reflected in your usage-based bill. There are no long-term lock-ins on the Free or Pro plans.
+Yes. You can upgrade or downgrade whenever you need, and the change is reflected in your usage-based bill. There are no long-term lock-ins on the Free or Pro plans.
## Can we run KloudMate in our own cloud?
Yes. KloudMate Infinity runs the full platform inside your own cloud account, deployed and operated by KloudMate, so your telemetry never leaves your network. It is available on Enterprise plans.
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/alert-list-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/alert-list-panel.mdx
index 73bd6fc2..9c00eeae 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/alert-list-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/alert-list-panel.mdx
@@ -1,23 +1,30 @@
---
title: "Alert List Panel"
-description: "Configure and use the Alert List panel in KloudMate dashboards."
+description: "Show a filtered list of alerts on a dashboard, next to the charts they relate to."
---
-The Alert List Panel displays a list of configured alert rules within the selected time range. The list can be filtered based on available attributes to focus on specific alerts relevant to your dashboard.
-When the panel type is set to Alerts List, the following settings are available under the **General** tab:
+An Alerts List panel shows a list of alerts for the selected time range, so the alerts for a service sit on the same dashboard as its charts. Filter the list to the alerts that matter for the dashboard, for example those of one service or environment.
+
+The panel always reads alerts. The query editor has no data set picker or aggregation builder: you filter and limit the records. The columns are fixed.
+
+The list is paged. The page size is the query's **Limit** (10 for a new panel), and numbered pages appear under the list when there are more alerts than fit on one page.

-### Panel
+The **Options** tab has the **Panel** and **Time range** sections. The panel has no **Overrides** or **Transform** tab.
+
+## Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-### Time Range
+## Time range
-Configure time range behavior for this panel independently from the dashboard.
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel's start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+## Related
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+- [Issues List Panel](../issues-list-panel/)
+- [Create alerts](../../../../alerts/create-alerts/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/bar-chart-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/bar-chart-panel.mdx
index c36226d3..f32d27a4 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/bar-chart-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/bar-chart-panel.mdx
@@ -1,51 +1,57 @@
---
title: "Bar Chart Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Compare values across time buckets or categories as vertical or horizontal bars."
---
-The Bar Chart Panel displays data in a bar format, allowing for easy comparison of values across categories. It includes a query box to define the data you want to visualize, and settings to customize orientation, stacking, axes, and legend.
-When the panel type is set to Bar Chart, the following settings are available under the **General** tab:
+A Bar Chart panel compares values as bars. The X axis can be time or a category, so you can draw request counts per minute, or one bar per service from a query that returns one value for each service.
-
+
-### Panel
+## Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-- **Links:** Click **Add link** to connect the panel to related resources, such as a runbook or an external dashboard.
-- **Repeat options:** Set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in this editor.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-
+
-### Display
+## Standard options
-Control how the bar chart is visually rendered.
+**Display name** renames a series. **Format** sets the unit and how values are written on the Y axis and in the tooltip. If you leave **Unit** on **Auto**, the panel uses the unit the metric declares. See [Format values and units](../../panel-options/format-and-units/).
-- **Orientation:** Choose between Vertical or Horizontal bar layout.
-- **Stacking:** Choose between Stacked (bars stacked on top of each other) or Grouped (bars placed side by side) to control how multiple series are displayed.
+## Display
-
+- **Orientation:** **Vertical** or **Horizontal** bars. Horizontal bars leave more room for long category labels.
+- **Stacking:** **Stacked** puts each series on top of the previous one. **Grouped** places them side by side.
-### Axes
+
-Configure how data is represented on each axis of the chart.
+## Axes
-- **X-Axis:** Use the Date Style dropdown to choose from various date formats for the horizontal axis of the chart.
-- **Y-Axis:** Use the Format dropdown to choose the unit of data displayed, such as Number, Percentage, or Duration. You can also set decimal places, multiply values by a number, and add a prefix or suffix.
+- **X-Axis:** **Date style** sets how times are written along the axis. **Auto** picks a format from the length of the time range.
+- **Y-Axis:** **Min** and **Max** pin the ends of the axis instead of fitting it to the data.
-### Legend
+## Legend
-Choose between Table or List mode to control how query results are displayed. Use the Values selector to pick aggregate functions to show alongside each legend entry.
+**Mode** shows the legend as a **Table** or a **List**, or turns it **Off**. **Values** adds summary values next to each series: **Min**, **Max**, **Mean**, **Total**, **First**, **Last**, or **Count**.
-Switching **Orientation** to Horizontal renders the bars sideways, useful when category labels are long or when you have many categories to compare.
+
-
+## Time range
-### Time Range
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
-Configure time range behavior for this panel independently from the dashboard.
+## Overrides
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel's start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+Use the **Overrides** tab to set **Display name** or **Format** for some series only. See [Overrides](../../panel-options/overrides/).
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [TimeSeries Panel](../timeseries-panel/)
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/gauge-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/gauge-panel.mdx
new file mode 100644
index 00000000..56c7b4ad
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/gauge-panel.mdx
@@ -0,0 +1,65 @@
+---
+title: "Gauge Panel"
+description: "Show each series' value on a dial, arc, or meter against a fixed range, colored by thresholds."
+---
+
+A Gauge panel reduces each series to one number and draws it against a range, as a dial, an arc, or a straight meter. Use it for values with known bounds, such as disk usage in percent or connection pool saturation, where the position on the scale matters as much as the number.
+
+## Panel
+
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
+
+## Standard options
+
+- **Display name** renames a gauge's label.
+- **Range** sets the **Min** and **Max** at the two ends of the gauge. For a percentage, set `0` and `100`. Leave it empty and the ends come from the values the series reported. Threshold colors and the end labels follow the same range.
+- **Format** sets the unit and how the number is written. If you leave **Unit** on **Auto**, the gauge uses the unit the metric declares.
+- **Color scheme** sets the gauge color: **Single color**, **From thresholds**, a palette that gives every gauge its own color, or a color ramp that colors each reading by where it sits on the gauge's range.
+
+See [Format values and units](../../panel-options/format-and-units/) and [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
+
+## Calculations
+
+**Choose a Calculation** sets how each series is reduced to one number: **Min**, **Max**, **Mean**, **Total**, **First**, **Last**, or **Count**. When you leave it empty, the gauge shows the last value. To use a different calculation for some series, set **Calculations** in an override.
+
+## Gauge
+
+- **Style:** **Dial** draws a three-quarter arc, **Half** a half circle, **Circle** a full ring that fills from the top, and **Meter** a straight bar.
+- **Thickness:** **Thin**, **Medium** (the default), or **Thick**.
+- **Segments** cuts the arc into blocks, from 0 (one continuous arc) to 20. It isn't available for **Meter**.
+- **Arrangement** sets how several gauges share the panel: **Grid**, **Stack**, or **Inline**. **Rings** draws all series in one gauge, one ring per series, on a shared range.
+- **Show** sets what's written on each gauge: **Auto**, **Value**, **Name**, or **Both**.
+- **Show threshold bands** marks the threshold steps beside the arc. It's on by default and isn't available for **Meter**.
+
+## Threshold
+
+Thresholds color the gauge when its value crosses a step, and with **Show threshold bands** on, the steps are also marked along the arc. Click **Add Threshold** for each step, and click **Set default color** to choose the color for values below every step. See [Thresholds](../../panel-options/thresholds/).
+
+## Data links & actions
+
+Clicking a gauge opens a menu of its data links. Add links to every gauge here, or to selected gauges with an override. See [Data links](../../panel-options/data-links/).
+
+## Value mappings
+
+Value mappings replace a gauge's value with text and a color. See [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
+
+## Time range
+
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+
+## Overrides
+
+Use the **Overrides** tab to change options for some gauges only. A rule picks series with **Applies to** and can set **Display name**, **Range**, **Calculations**, **Format**, **Color scheme**, **Threshold**, **Data links & actions**, and **Value mappings**. For example, give a memory gauge its own range in bytes while the CPU gauges on the same panel run from 0 to 100. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Stats Panel](../stats-panel/)
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/heatmap-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/heatmap-panel.mdx
new file mode 100644
index 00000000..992ab471
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/heatmap-panel.mdx
@@ -0,0 +1,80 @@
+---
+title: "Heatmap Panel"
+description: "Draw how a metric's values are distributed over time, with each cell colored by how many values fell into it."
+---
+
+A Heatmap panel draws how a metric's values are distributed over time. Time runs along the X axis, value buckets run up the Y axis, and each cell's color shows how many values fell into that bucket at that time. Use it to see how a latency distribution changes over time, for example a second cluster of slow requests appearing after a deployment, which a single percentile line would hide. It works the same way for a gauge, such as CPU usage across many containers.
+
+## Build the query
+
+The panel reads one **Metrics** query. Click **Metric** and pick any metric. On a Heatmap panel, histogram metrics are listed first, and every metric shows its type.
+
+- **A histogram metric** has its own buckets. When you pick one, the query is set up for you: **Sum** with **Increase**, grouped by `le`, the bucket boundary. You can change **Increase** to **Rate** to color cells by count per second.
+- **Any other metric**, such as a gauge or a counter, is read with **Group by** set to **Each series**, so every series adds one value per time step. The panel then puts those values into buckets itself. See [Value buckets](#value-buckets).
+
+Switching a panel to **Heatmap** sets up its query the same way, so a **TimeSeries** panel showing a percentile becomes a heatmap of the same metric. A query you've grouped by a label keeps its grouping, and each group adds one value per time step.
+
+With a histogram metric, you can also set **Returns** to **Distribution** and group by one attribute, such as the service name. The buckets then spread across that attribute's values instead of over time. A **Distribution** with no grouping is a single distribution for the whole time range, so draw it with a [Histogram panel](../histogram-panel/) instead.
+
+See [Queries and data sources](../queries-and-data-sources/) for the query editor.
+
+On a long time range, the query can return more time steps than the panel has pixels across. Adjacent steps are then summed into one column until the columns fit, and a caption above the grid shows how much time each cell covers. A heatmap grouped by an attribute isn't merged.
+
+## If the panel can't draw the query
+
+After you run the query, the panel says why in place of the grid.
+
+| Message | What to do |
+| --- | --- |
+| A heatmap needs values over time. This query returns none. | **Returns** is **Single value**. Set it to **Time series**. |
+| This query returns one set of buckets for the whole time range. | **Returns** is **Distribution** with no grouping. Set **Returns** to **Time series**, or switch to a [Histogram panel](../histogram-panel/). |
+| Each bucket is also split by service.name. Group by le only. | Remove the other **Group by** labels, or filter to one value of them. |
+| A heatmap spreads buckets over one attribute. This query groups by service.name and host.name. | With **Returns** set to **Distribution**, group by one attribute only. |
+
+## Panel
+
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
+
+## Standard options
+
+**Display name** renames the series. **Bucket format** sets how the bucket boundaries on the Y axis are written. The counts stay plain numbers.
+
+When the metric declares a unit, the bucket boundaries use it, for example `400 ms`. If they show plain numbers, set **Unit** yourself. For example, choose **Milliseconds** for a request duration histogram. The top bucket, labeled `+Inf`, holds every value above the highest boundary. See [Format values and units](../../panel-options/format-and-units/).
+
+## Display
+
+- **Color scheme:** **Blues** (the default), **Greens**, **Oranges**, **Purples**, **Reds**, **Viridis**, or **Magma**.
+- **Scale:** how counts map to colors: **Linear**, **Log** (the default), or **Sqrt**. Bucket counts are usually skewed, and on a linear scale most cells end up in nearly the same color. Switch to **Linear** when you want color to be proportional to the count.
+- **Color min** and **Color max** set the counts at the two ends of the color scale. Leave both blank to use the range of the data. Set the same values on two panels to compare them on one scale.
+- **Cell gap** sets the space between cells.
+- **Show color scale** shows the color legend. It's on by default.
+
+### Value buckets
+
+For a metric that isn't a histogram, the panel makes the value buckets itself, with round boundaries such as 10, 20, and 50.
+
+- **Value buckets:** **Auto** (the default) uses a log scale when the values span two orders of magnitude or more, as latencies and CPU usage across containers usually do, and a linear scale otherwise. **Log** spaces the boundaries 1, 2, 5, 10, 20, 50, and so on. **Linear** uses buckets of equal width.
+- **Bucket count** caps the number of linear buckets. It's 20 when left blank.
+
+A histogram metric always uses its own buckets, so these settings don't change it.
+
+## Time range
+
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+
+## Overrides
+
+Use the **Overrides** tab to set **Display name** or **Bucket format** for some fields only. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Histogram Panel](../histogram-panel/)
+- [Queries and data sources](../queries-and-data-sources/)
+- [Panel options](../../panel-options/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/histogram-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/histogram-panel.mdx
index f4f6ea1e..a144f0da 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/histogram-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/histogram-panel.mdx
@@ -1,40 +1,69 @@
---
title: "Histogram Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Show how values are distributed across buckets over the selected time range."
---
-The Histogram Panel shows how numerical data is distributed over the selected time range. It groups values into buckets and counts how many fall into each one — each bar is a bucket, its height is the count, and the x-axis is the bucket range.
-Use it to visualize request durations, error rates, or latency distributions, and switch time ranges to see how the distribution shifts after a deployment or a traffic spike.
+A Histogram panel shows how values are distributed over the selected time range. Each bar is a bucket, its height is the number of values that fell into it, and the X axis shows the bucket boundaries. Use it to see the shape of request durations or payload sizes, and switch time ranges to see how the distribution moved after a deployment or a traffic spike.
-When the panel type is set to Histogram, the following settings are available under the **General** tab:
+You can point the panel at either of these:
-
+- **A histogram metric** with **Returns** set to **Distribution**, which is the default for a new Histogram panel. The panel draws the metric's own buckets.
+- **A plain numeric series**, such as a latency series. The panel puts the values into buckets itself. It picks a bucket width of 1, 2, or 5 times a power of ten, so the boundaries are round numbers, and it keeps empty buckets so gaps in the distribution stay visible.
-### Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-- **Links:** Click **Add link** to connect the panel to related resources, such as a runbook or an external dashboard.
-- **Repeat options:** Set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in this editor.
+The last bucket, labeled `+Inf`, holds every value above the highest boundary. In a latency distribution, that bucket is often the slow tail.
-### Axes
-The Axes section provides controls to adjust how the distribution is visualized after data is fetched.
+
-- **Bucket Count (default: 30):** Controls how many buckets the data is grouped into. Reducing the bucket count gives a more aggregated view; increasing it reveals finer granularity.
-- **Bucket Offset:** Shifts all bucket ranges by a fixed value. For example, an offset of +10 transforms a bucket range of \[x, y] to \[x+10, y+10]. This is useful when you want to align bucket boundaries with a specific baseline.
-- **Min / Max:** Constrains the visible range by discarding buckets that fall outside the specified bounds. Use this to focus on the meaningful portion of the distribution and filter out extreme values or noise.
+## If the panel can't draw the query
-The Y-Axis controls the count scale: set Min and Max to fix the range instead of scaling automatically, and use Format, decimals, and a prefix or suffix to control how the numbers are displayed.
+The panel says why in place of the bars:
-
+- **A histogram shows one distribution for the whole time range. Set Returns to Distribution.** The query returns a value per time step. Set **Returns** to **Distribution**, or use a [Heatmap panel](../heatmap-panel/) to see the buckets over time.
+- **This query returns one distribution per group.** A histogram draws one distribution. Remove the grouping, or use a Heatmap panel to put the groups side by side.
-### Legend
-Choose between **Table** or **List** mode to control how the legend is displayed. Use the **Values** selector to choose which aggregate values (such as Min, Max, or Mean) appear alongside each series label. Leave Values empty to display labels only.
+## Panel
-### Time Range
-Configure time range behavior for this panel independently from the dashboard.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+## Standard options
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+**Display name** renames the series. **Bucket format** sets how the bucket boundaries on the X axis are written. The counts stay plain numbers.
+A histogram metric usually doesn't declare a unit for its bucket boundaries, so set **Unit** yourself. For example, choose **Milliseconds** for a request duration histogram. When the panel buckets a plain series, the boundaries use that series' unit. See [Format values and units](../../panel-options/format-and-units/).
+
+## Axes
+
+**X-Axis**:
+
+- **Buckets** sets how many bars the range is divided into. For a histogram metric, a smaller number merges neighboring buckets.
+- **Offset** moves the bucket boundaries along the axis. For example, an offset of `10` turns the bucket `[0, 50]` into `[10, 60]`.
+- **Min** and **Max** narrow the range, and the panel re-buckets within it. Narrowing a 0 to 100 chart to 0 to 20 gives you a closer look at that range with the full number of buckets, not a cropped chart with a few wide bars.
+
+**Y-Axis**: **Min** and **Max** pin the ends of the count axis, and **Decimals** sets the decimal places of its labels.
+
+
+
+## Legend
+
+**Mode** shows the legend as a **Table** or a **List**, or turns it **Off**. **Values** adds summary values next to each series, such as **Min**, **Max**, or **Mean**. Leave **Values** empty to show labels only.
+
+## Time range
+
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+
+## Overrides
+
+Use the **Overrides** tab to set **Display name** or **Bucket format** for some series only. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Heatmap Panel](../heatmap-panel/)
+- [Queries and data sources](../queries-and-data-sources/)
+- [Panel options](../../panel-options/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/logs-list-panel-1.jpeg b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/logs-list-panel-1.jpeg
deleted file mode 100644
index 9289980e..00000000
Binary files a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/logs-list-panel-1.jpeg and /dev/null differ
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/logs-list-panel-1.png b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/logs-list-panel-1.png
deleted file mode 100644
index 92584642..00000000
Binary files a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/logs-list-panel-1.png and /dev/null differ
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/spans-list-panel-1.jpeg b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/spans-list-panel-1.jpeg
deleted file mode 100644
index fcbc2e11..00000000
Binary files a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/images/spans-list-panel-1.jpeg and /dev/null differ
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/index.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/index.mdx
index c8a6a8ce..3cd12706 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/index.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/index.mdx
@@ -7,80 +7,76 @@ sidebar:
---
import { Image } from 'astro:assets';
-import panelTypeDropdown from './images/adding-a-panel-panel-type.png';
import overridesDropdown from './images/adding-a-panel-overrides.png';
import generalSettings from './images/adding-a-panel-general-settings.png';
-Panels are the individual widgets on a dashboard. Each panel visualizes a specific metric or query result. Adding panels lets you build up a complete view of the metrics you care about in one place.
+Panels are the individual widgets on a dashboard. Each panel draws the result of one or more queries, and a dashboard puts the metrics, logs, and traces you care about on one page.
-From your dashboard, click **Add** at the top right. A menu opens with three options: **Add panel**, **Add section**, and **Import**.
+From your dashboard, click **Add** at the top right and choose what to add:
- **Add panel** opens the panel editor so you can build a new panel from scratch.
- **Add section** groups panels under a collapsible heading.
-- **Import** reuses a panel from a template or an existing dashboard instead of building one from scratch.
+- **Import** reuses a panel from a template or an existing dashboard.
## Add a Panel
1. Click **Add panel**. The panel editor opens with a query editor at the bottom.
-
+ 
-2. Configure your query in the query editor. Queries define what data the panel displays.
+2. Build the query. Pick a data source, such as **KloudMate** or a connected AWS account, then choose the data set and metric, and add any grouping and filters. [Queries and Data Sources](./queries-and-data-sources/) covers each source's fields.
-- Select a Data Source, **OpenTelemetry** or **aws/demo** (available if an AWS account is connected).
+ 
-
+ Click **Add Query** to draw several queries on one panel, for example to compare two metrics.
-- For OpenTelemetry, select the dataset (**Traces**, **Metrics**, **Logs**, etc.) and configure the metric, aggregation, group by, filters, and legend format using the Query Builder tab. Switch to the **PromQL** tab to write [Prometheus queries](https://prometheus.io/docs/prometheus/latest/querying/basics/) directly.
-- Add multiple queries using **Add Query** when you want to compare or combine multiple metrics in the same panel.
+ 
-
+ Click **Add Expression** to calculate with the query results, for example to divide errors by requests. See [Expressions](../../../alerts/expressions/) for the syntax.
-- Add expressions using **Add Expression** to apply math, reduce, or condition logic across query results.
+ 
-
+3. Click **Run Query** to run the query and preview the result.
-For more on setting up queries, see [Creating Alerts](../../../alerts/create-alerts/). For expressions, see [Alert Expressions](../../../alerts/expressions/).
+ 
-3. Click **Run Query** to execute the query and preview the result in the visualization area. Running the query lets you verify the data looks correct before saving the panel.
+4. Select a **Panel Type** from the dropdown on the right. For example, use **TimeSeries** for trends over time or **Stats** for a single current value.
-
+ Each type in the list has a small preview and a line on what it shows, such as **Heatmap** · "How a metric's values are distributed over time." The available types are **TimeSeries**, **Stats**, **Gauge**, **Table**, **Pie Chart**, **Bar Chart**, **Histogram**, **Heatmap**, **Alerts List**, **Issues List**, and **Text**.
-4. Select a **Panel Type** from the dropdown on the right to control how the data is visualized.
+ Switching the panel type keeps your queries and the last result, so you don't need to run the query again. It also keeps the **Transform** steps, and the **Options** and **Overrides** settings that the new type has. Switching to **Alerts List** or **Issues List** replaces the queries with the list's own query. A query whose **Returns** is **Single value** is changed to **Time series** when you switch to **TimeSeries**, and runs again.
-Choosing the right type makes data easier to interpret, for example, use TimeSeries for trends over time or Stats for a single current value.
+ If the panel can't draw the result, it explains why in place of the chart, and the editor offers a button for each type that can, such as **Switch to table**. On a dashboard, the same panel names the types to try instead. When only some of the queries fit, the panel draws those and notes how many were left out.
-*Available types are:* **TimeSeries**, **Stats**, **Table**, **Pie Chart**, **Bar Chart**, **Histogram**, **Logs List**, **Spans List**, **Alerts List**, **Issues List**, and **Text**.
+5. Under **Options** > **Panel**, enter a **Name** and a **Description** so the panel is easy to identify on the dashboard. The description can run over several lines, and it appears behind the info icon in the panel header. Click **Add link** to link the panel to related resources. See [Adding Links to Dashboards](../adding-links-to-dashboards/).
-
+ Under **Repeat options**, set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in the editor.
-5. In the right-side settings panel under **General** > **Panel**, enter a Name and Description so the panel is easy to identify on the dashboard. You can also add Links using **Add link** to connect the panel to related resources.
+ 
-Under **Repeat options**, set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in the editor.
+6. Customize the panel with the tabs on the right:
-
+ - **Options** holds the panel's name, **Standard options** such as the unit and color scheme, and the settings for the panel type, such as axes, legend, and thresholds.
+ - **Transform** reshapes the query result before the panel draws it, for example to join two queries or sort rows.
+ - **Overrides** changes the display of specific fields only, matched by name, a regex, type, label, or query.
-6. Customize the panel appearance using the General and Overrides tabs on the right:
+ The **Transform** and **Overrides** tabs show how many steps or rules you've added, for example **Overrides (2)**. **Alerts List** and **Issues List** panels have the **Options** tab only. See [Panel Options](../panel-options/) for every setting.
-- **General:** Configure Panel name, Axes, Legend, Graph options, Tooltip, Standard options, Threshold, Data links & actions, and Time Range.
+
-
+
-- **Overrides:** Click **Add Field Override** to apply custom display settings to specific fields, by series name, a matching regex, or a query. Useful when different data series need different formatting.
+7. Toggle **Table View** at the top of the panel editor to switch between the chart and a table of the raw values. Use it to inspect exact data points.
-
-
-7. Toggle **Table View** at the top of the panel editor to switch between the visual chart and a raw data table showing timestamps and values. This is helpful for inspecting exact data points.
-
-
+ 
8. Use the time range picker at the top to set the time window for this panel.
-
+ 
-9. Click **Save & Close** to save the panel and return to the dashboard, or **Save** to save without exiting the editor.
+9. Click **Save & Close** to save the panel and return to the dashboard, or **Save** to save without leaving the editor.
-
+ 
***
@@ -96,7 +92,7 @@ A new section appears on the dashboard with an editable name. Add panels underne
## Import a Panel
-Select **Import** from the **Add** menu to add a pre-built panel to your dashboard without building it from scratch. The Import Panel dialog offers two tabs:
+Select **Import** from the **Add** menu to add a pre-built panel to your dashboard without building it from scratch. The **Import Panel** dialog has a tab for each place you can import from:
**Import from Templates:** Select a template from the dropdown to import a panel from a pre-built KloudMate template.
@@ -104,4 +100,10 @@ Select **Import** from the **Add** menu to add a pre-built panel to your dashboa

-Once imported, you can **edit**, **delete**, or **duplicate** the panel using the panel's more options menu.
+After you import a panel, you can **edit**, **delete**, or **duplicate** it from the panel's more options menu.
+
+## Related
+
+- [Queries and Data Sources](./queries-and-data-sources/)
+- [Panel Options](../panel-options/)
+- [Managing Panels](../managing-panels/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/issues-list-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/issues-list-panel.mdx
index 21d709ca..a4fe4974 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/issues-list-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/issues-list-panel.mdx
@@ -1,28 +1,30 @@
---
title: "Issues List Panel"
-description: "Display a filtered list of captured issues directly on your dashboard."
+description: "Show a filtered list of captured issues on a dashboard."
---
-The Issues List Panel displays a list of captured issues within the selected time range. The list can be filtered based on available attributes to surface relevant issues directly on your dashboard.
-When the panel type is set to Issues List, the following settings are available under the **General** tab:
+An Issues List panel shows the issues captured in the selected time range, so the errors for a service sit on the same dashboard as its charts. Filter the list to the issues that matter for the dashboard, for example those of one service.
-
+The panel always reads issues. The query editor has no data set picker or aggregation builder: use **Filters** to narrow the list, **Order by** to sort it, and **Limit** to set the page size. The columns are fixed.
-### Panel
+The list is paged. The page size is the query's **Limit** (10 for a new panel), and numbered pages appear under the list when there are more issues than fit on one page. On a publicly shared dashboard, the assignee names are left out.
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
+
-### Time Range
+The **Options** tab has the **Panel** and **Time range** sections. The panel has no **Overrides** or **Transform** tab.
-Configure time range behavior for this panel independently from the dashboard.
+## Panel
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+## Time range
-:::info
-At the query level, you can apply Filters to narrow down which issues are displayed, use Order by to sort results, and set a Limit to control how many issues appear in the panel.
-:::
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+## Related
+
+- [Alert List Panel](../alert-list-panel/)
+- [Queries and data sources](../queries-and-data-sources/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/logs-list-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/logs-list-panel.mdx
deleted file mode 100644
index 89fa9000..00000000
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/logs-list-panel.mdx
+++ /dev/null
@@ -1,38 +0,0 @@
----
-title: "Logs List Panel"
-description: "Display a customized and filtered list of logs within your dashboard."
----
-The Logs List Panel displays a list of logs generated for the selected time range. The list can be filtered based on available attributes, and you can choose which columns to display from your log data.
-
-
-
-When the panel type is set to Logs List, the following settings are available under the **General** tab:
-
-
-
-### Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-
-### Columns
-Configure the appearance and formatting of each column in the log table individually. Each column detected from your query result appears here and can be expanded to access its settings.
-
-- **Rename to:** Enter a custom display name for the column heading.
-- **Width:** Set a fixed width for the column or leave it as Auto to size automatically.
-
-Columns correspond to the fields selected in the query.
-
-### Time Range
-Configure time range behavior for this panel independently from the dashboard.
-
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
-
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
-
-:::info
-At the query level, you can select which Columns to display, filter results using Filters, remove duplicate entries using Distinct by, sort using Order by, and control how many rows appear using the Limit field.
-:::
-
-
-
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/pie-chart-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/pie-chart-panel.mdx
index a0d61f24..39a02890 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/pie-chart-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/pie-chart-panel.mdx
@@ -1,48 +1,58 @@
---
title: "Pie Chart Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Show how a total splits across series or values as a pie or donut chart."
---
-The Pie Chart Panel displays data as a pie or donut chart, making it easy to visualize the proportional breakdown of values across categories. It includes a query box to define the data you want to visualize, and a set of settings to customize how that data is presented.
-When the panel type is set to Pie Chart, the following settings are available under the **General** tab:
+A Pie Chart panel shows how a total splits into parts, as a pie or a donut. Use it for a share at a glance, such as the requests each service handled over the selected time range.
-
+
-### Panel
+## Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-- **Links:** Click **Add link** to connect the panel to related resources, such as a runbook or an external dashboard.
-- **Repeat options:** Set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in this editor.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-### Value Options
+## Standard options
-Configure how values from your query are calculated and represented in the chart.
+**Display name** renames a slice. **Format** sets the unit and how slice values are written. If you leave **Unit** on **Auto**, the panel uses the unit the metric declares. See [Format values and units](../../panel-options/format-and-units/).
-- **Reduce**: Aggregates all data points for each series into a single value using a Reduce Function (such as Min, Max, Mean, or Total). Use the Columns option to specify which columns are included in the calculation.
-- **All Values**: Displays every individual data point in the chart without aggregation.
+
-### Display
+## Value options
-Choose between **Pie** and **Donut** as the chart style. Use the **Labels** setting to control what is shown on the chart slices, including Value, Percentage, and Name.
+- **Reduce** turns each series into one slice. **Reduce Function** sets how: **Max**, **Min**, **Last**, **Total**, or **Mean**.
+- **All Values** draws one slice per data point. **Limit** caps the number of values each series contributes. Leave it blank to show every value.
-
+**Columns** sets which series appear: **All Columns**, **Numeric Columns**, or the series you pick by name.
-### Legend
+Slice shares are rounded for display. Slices take their colors from the same palette as the other charts on the dashboard. Each slice keeps its color by name, so a series keeps its color when the data changes, and no two slices share a color.
-Toggle the legend on or off using the **Show legend** option. When enabled, choose between **List** or **Table** mode, set the placement to **Right** or **Bottom** , and use the **Legend Values** dropdown to select what is shown alongside each legend entry, such as Percentage.
+## Display
-### Format
+Choose **Pie** or **Donut**. **Labels** sets what's written on each slice: **Value**, **Percentage**, or **Name**.
-Use the Format dropdown to choose how values are displayed. Available options include Number, Bytes (SI), Bytes (IEC), Percentage, Duration (Milliseconds), Duration (Nanoseconds), and Unformatted. You can also set the maximum number of decimal places, multiply values by a number, and add a prefix or suffix.
+
-
+## Legend
-### Time Range
+Turn on **Show legend** to add a legend. **Mode** shows it as a **List** or a **Table**, **Placement** puts it on the **Right** or at the **Bottom**, and **Legend Values** adds the **Value** or **Percentage** next to each entry.
-Configure time range behavior for this panel independently from the dashboard.
+## Time range
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+## Overrides
+
+Use the **Overrides** tab to set **Display name** or **Format** for some series only. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Bar Chart Panel](../bar-chart-panel/)
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/queries-and-data-sources.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/queries-and-data-sources.mdx
new file mode 100644
index 00000000..39e12c88
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/queries-and-data-sources.mdx
@@ -0,0 +1,211 @@
+---
+title: "Queries and Data Sources"
+description: "Choose a data source for each query, build KloudMate, CloudWatch, and HTTP endpoint queries, and read query errors on a panel."
+sidebar:
+ order: 2
+---
+
+A panel draws the result of one or more queries. You build them in the query editor under the panel preview, and each query reads from its own data source, so one panel can put a KloudMate metric next to a CloudWatch metric.
+
+The same query editor appears in [Explore](../../../explore/) and in [alert rules](../../../../alerts/create-alerts/), so everything on this page applies there too, except where a section says otherwise.
+
+## Choose a data source
+
+Open the data source picker at the top of a query. It lists:
+
+- **KloudMate**, for the metrics, logs, and traces your workspace sends to KloudMate.
+- Each connected AWS account, by account name, with **CloudWatch** under it. AWS accounts are connected under [Settings → Data Sources](../../../../platform/settings/data-sources/).
+- Each [HTTP endpoint](../../../../platform/settings/connections/http-endpoint/) connection, by connection name, with **HTTP endpoint** under it. A connection is listed when it can be used for **Data source**.
+
+In an alert rule, the picker lists only **KloudMate** and AWS accounts (CloudWatch). HTTP endpoint connections aren't offered.
+
+The picker shows only the sources your plan includes. To connect another one, click **Add a data source** at the bottom of the picker. Settings → Connections opens in a new tab.
+
+When a connection isn't healthy, its state replaces the source kind under its name:
+
+| State | Can you pick it? |
+|---|---|
+| **Access revoked** | No. The provider refused the credential. Edit or reconnect the connection first. |
+| **Disabled** | No. Someone switched the connection off. |
+| **Degraded** | Yes. The last check failed, but queries still run through it. |
+| **Not verified yet** | Yes. The connection hasn't been checked yet. |
+
+See [Connections](../../../../platform/settings/connections/) for what each state means and how to fix it.
+
+Switching a query to a different kind of source starts the query over with that source's fields. Switching between two AWS accounts keeps the query as it is.
+
+## Build a KloudMate query
+
+### Pick a data set
+
+Choose **Metrics**, **Traces**, or **Logs** in the data set picker. Each one has its own tabs:
+
+- **Metrics** has **Builder** and **PromQL**. See [Write PromQL](#write-promql).
+- **Logs** and **Traces** have **Builder** and **Records**. **Builder** computes values from the records, such as the count of error logs per service. **Records** returns the individual log records or spans as rows. Alert rules have no **Records** tab.
+
+To list logs or traces on a dashboard, use a [Table panel](../table-panel/) with the **Records** tab. Switching between **Builder** and **Records** starts the query over, and only the filters carry over.
+
+### Choose what the query returns
+
+**Returns** sets what the query computes:
+
+- **Time series:** a value for each time step. This is the default.
+- **Single value:** one number for the whole time range, for a Stats or Gauge panel, for example.
+- **Distribution:** bucket counts from a histogram metric. It's offered only for histogram metrics, and picking a metric that isn't a histogram switches the query back to **Time series**.
+
+On a TimeSeries panel and in alert rules, **Returns** isn't shown, because those always need a time series. A **Records** query has no **Returns** either.
+
+For a query that returns a time series, **Interval** sets the time between data points. It's shown on **Metrics** queries and on **Logs** and **Traces** **Builder** queries. Leave it on **Auto**, or set a longer interval to get fewer, coarser points.
+
+### Build the query step by step
+
+The builder lays out a query as a row of labeled steps that you read from left to right: **Metric** and **Filter** first, then **Aggregate**, **Where value**, **Group by**, **Rank**, and **Then**. A step appears only when it applies to the query, so a histogram metric has no **Where value**, and logs and traces have no **Metric** step.
+
+For example, to chart the request rate of each service in one cluster, pick `apm_span_metrics_requests` under **Metric**, add `k8s_cluster_name = prod-big` under **Filter**, choose **Rate** under **Aggregate**, and add `service_name` under **Group by**.
+
+### Pick a metric
+
+Click the **Metric** step and pick a metric from the list. Each metric shows its type, such as `gauge`, `counter`, or `histogram`, along with its series count and description. To browse the full catalog instead, click the book icon next to the step.
+
+Logs and traces don't have a metric. Their **Aggregate** step picks a statistic and the field it reads, such as **Avg** of `duration`.
+
+### Filter the data
+
+The **Filter** step narrows the query with chips, the same way the [Log Explorer](../../../../logs/log-explorer/) filter bar does. Click **filter**, then pick a label on a metric or a field on logs and traces, an operator, and a value. The query keeps only what matches every chip.
+
+To match any one of several conditions, click **OR group** and add the conditions inside it. For example, an OR group with `service_name = checkout` and `service_name = payments` matches either service. Logs and traces also take free text, which matches any string field in the record.
+
+For every operator and how a filter is written as text, see [KMQL](../../../kmql/).
+
+### Choose an aggregation
+
+**Aggregate** sets the statistic computed at each time step, such as **Avg**, **Sum**, or **Rate**. The list offers only what fits the metric's type. For example, **Rate** is offered for counters, and **Instant rate** only for cumulative counters.
+
+A metric query aggregates in two steps. To set each one yourself, click **customize** under **Aggregate**:
+
+- **Within series** combines the points of each series inside a time step.
+- **Across series** combines the series with each other.
+
+Click **collapse** to go back to a single list. A query that the single list can't show, such as **Max** within series and **Sum** across series on a gauge, always opens with both steps. See [Metrics Aggregations](../../../explore/metrics-aggregations/) for how the two steps work together.
+
+#### Single value
+
+When **Returns** is **Single value**, **Aggregate** is one statistic for the whole time range. **Count (series)** counts the series that match the query. If the query already uses **Where value** or **Then** when you switch it to **Single value**, the builder keeps them and shows **Within series** and **Across series** instead of a single statistic.
+
+#### Fields on logs and traces
+
+Each field offers only the statistics it can compute. A numeric field offers all of them. A text or boolean field offers **Count (series)**, **Count (datapoints)**, **Count (distinct)**, **Last**, **Any value**, **Min**, and **Max**. If you change the field and the current statistic doesn't apply to the new one, the query switches to one that does. For example, **Avg** becomes **Count (datapoints)** when you move from a numeric field to a text field. **Rate** and **Increase** aren't offered on logs and traces.
+
+#### Histogram metrics
+
+A histogram metric that doesn't return a distribution is read as percentiles, **P25** through **P99**, or as **Sum**. Choosing **Sum** also applies **Increase** (the default) or **Rate**.
+
+### Filter by value
+
+**Where value** keeps only the values that match a condition. Click **condition**, pick an operator (`=`, `!=`, `>`, `<`, `>=`, or `<=`), and enter a number. **Filter** matches attributes, while **Where value** matches the metric's value itself.
+
+The condition is checked against each series' value at every time step, after **Within series** and before **Across series**. For example, `k8s_pod_phase` with **Last** within series, **Count** across series, and **Where value** `= 2` counts the pods that are running right now.
+
+### Group and rank the results
+
+**Group by** splits the result into one series for each distinct value of the fields you pick. Click **label** on a metric, or **field** on logs and traces, and pick one or more fields, such as `host_name` or `service_name`. With no field picked, every matching series is combined into one.
+
+On a metric, the **Group by** list starts with **Each series**, which keeps every series apart with all of its labels and combines nothing. **Aggregate** then sets only the statistic within each series, and **Then** isn't available. Picking a label or removing **Each series** goes back to combining series.
+
+**Rank** keeps K series: **Top K** keeps the highest values, **Bottom K** the lowest, and **Limit K** the first K returned. It appears once **Group by** has a field or **Each series**, and ranks each series on its own with **Each series**.
+
+### Combine groups a second time
+
+**Then** aggregates the grouped results again, by fewer fields. For example, group CPU usage by `node` and `pod`, then use **Sum** by `node` to get the total for each node.
+
+1. Group by at least one field.
+2. Under **Then**, click **combine groups**.
+3. Pick the operation: **Sum**, **Avg**, **Min**, **Max**, **Count groups**, **Last**, or a percentile from **P25** to **P99**.
+4. Click **by** and pick the fields to keep. With no field picked, every group merges into one value.
+
+**Then** can only keep fields that are in the group-by, so removing a field from the group-by removes it from **Then** as well. While **Then** is set, **Rank** isn't available.
+
+**Where value** and **Then** are offered on **Metrics** queries that return a **Time series**, except on histogram metrics.
+
+### Name the series
+
+Click **display options** under the steps to set **Display**, the name each series shows on the chart. `{{label}}` inserts a label's value, so `{{namespace}}` names each series after its namespace.
+
+### Write PromQL
+
+On the **Metrics** data set, open the **PromQL** tab to write a [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/) query. The tabs aren't offered when **Returns** is **Distribution**.
+
+The PromQL tab has no data set picker, because PromQL reads metrics only, and no **Interval**, because the step follows the panel's time range. On a panel without a time axis, such as a Stats or Gauge panel, **Type** sets how the query runs: **Range** returns a value for each step, and **Instant** returns one value at the end of the time range. Until you pick one, a query whose **Returns** is **Single value** runs as **Instant**, and any other query runs as **Range**. On a TimeSeries panel and in alert rules, **Type** isn't shown and the query always runs as a range query.
+
+#### Switch between Builder and PromQL
+
+When you switch from **Builder** to **PromQL**, the builder query is written as PromQL. For example, `http_requests_total` with **Rate**, **Sum**, and a 5-minute interval becomes `sum(rate(http_requests_total[5m]))`. If you switch back without editing the text, the builder query comes back exactly as it was.
+
+When you switch edited or pasted PromQL to **Builder**, the builder imports whatever it can represent:
+
+- A range window such as `[5m]` becomes the query's **Interval**.
+- An expression that needs more than one query, such as `sum(rate(a[5m])) / sum(rate(b[5m])) * 100`, is split into one hidden query for each metric and a **Math expression** that combines them. On a panel that takes a single query, the switch is refused.
+- `or vector(0)` becomes the panel's **No-data value**. See [Panel Options](../../panel-options/). Alert rules have no no-data value, so in an alert rule a query that uses `or vector(N)` can't switch to **Builder**.
+
+If a query can't be converted, the switch is refused and the query stays on its current tab. The reason appears above the editor.
+
+### Copy and paste a query as KMQL
+
+[KMQL](../../../kmql/) writes a whole query as one line of text, such as `apm_span_metrics_requests k8s_cluster_name = prod-big | rate | sum by service_name`. Use it to move a query between panels, Explore, and alert rules, or to share it in a message.
+
+Open the query's menu (**⋮**) and choose one of these:
+
+- **Copy as KMQL** copies the query to the clipboard. It isn't available on the **PromQL** tab, so switch to **Builder** first.
+- **Paste KMQL** opens an editor. Paste the text and click **Apply**.
+
+Pasting replaces the query's metric, filters, and aggregation steps with what the text says. **Returns**, **Interval**, and the series display name stay as they were, and the metric keeps its type and unit. A pasted `sort` shows under **Order by**. If the text doesn't parse, the error appears under the editor and the query doesn't change.
+
+## Build a CloudWatch query
+
+Pick an AWS account in the data source picker, then fill in:
+
+- **Region**: the AWS region to read from. When the dashboard has variables, you can pick a region variable here. See [Dashboard variables](../../dashboard-variables/).
+- **Namespace**: for example, `AWS/EC2`.
+- **Select metric**: the metric in that namespace.
+- **Statistic**: **Maximum**, **Minimum**, **Average**, or **Sum**. It starts on **Average**.
+- **Dimensions**: click **Add dimension**, pick a key, and pick one or more values. **All** matches every value of the key.
+- **Legend Format**: how each series is named on the chart.
+
+The query runs once **Namespace** and the metric are set.
+
+## Query an HTTP endpoint
+
+Pick an HTTP endpoint connection to read JSON, CSV, or TSV from a URL: a REST API, a CSV file in a GitHub repository, or a Google Sheet. The query holds the method, the path, and how to turn the response into rows and columns. The base URL, credential, and allowed hosts live on the connection. An HTTP endpoint query has no data set, **Returns**, or **Interval**. See [HTTP Endpoint](../../../../platform/settings/connections/http-endpoint/) for the connection, every query field, and a worked example.
+
+## Add several queries
+
+Click **Add Query** to add another query to the panel, for example to compare request counts from two services on one chart. Each query gets a name, `A`, `B`, and so on. Adding a query collapses the others, and you can expand any of them again to edit it. The buttons on a query's header copy, hide, or delete it, and its menu copies or pastes the query as [KMQL](#copy-and-paste-a-query-as-kmql).
+
+A query's name is how expressions refer to it, as in `$A`. You can rename a query using letters, numbers, underscores, and spaces, and each name must be unique. When you rename a query, every expression that refers to it is updated to the new name. In an alert rule, so is the alert condition.
+
+Histogram, Heatmap, Alerts List, and Issues List panels take a single query, so **Add Query** and **Add Expression** aren't offered on them.
+
+## Combine queries with expressions
+
+Click **Add Expression** to compute a new result from your queries. Choose **Math expression** to calculate with the results, such as `$A / $B * 100`, **Reduce** to turn a time series into a single number, or **Condition expression** to compare values and return true or false. See [Expressions](../../../../alerts/expressions/) for the full syntax.
+
+## When a query fails
+
+A query that fails doesn't stop the others. Its error appears in a strip at the top of the panel, with the query's name and the message, and the other queries still draw. Click **Show details** for the full error, such as the parser output or the full response from an HTTP endpoint. The strip is amber when some queries still drew and red when none did. When the query's connection is switched off or revoked, the error names the connection, and **Open connection** opens it in **Settings > Connections**. The **Errors** tab of **Inspect** lists the same errors.
+
+A query can also succeed with an incomplete result. The panel header then shows a badge:
+
+| Badge | What happened | What to do |
+|---|---|---|
+| **Partial** | The query ran out of time and returned results only from a point in the range onward. Hover over the badge to see that point. | Narrow the time range to get the full result. |
+| **Query timed out** | The query ran out of time before it returned anything. | Narrow the time range. |
+| **Rows cut** | The result hit its row limit, so some rows are missing. | Narrow the query, for example with a filter. |
+
+On a dashboard, warnings from the data source appear as an icon in the panel header. Hover over it to read them. For example, an HTTP endpoint query that stopped at 10,000 rows shows a warning there.
+
+## Related
+
+- [Adding a Panel](../)
+- [Panel Options](../../panel-options/)
+- [HTTP Endpoint](../../../../platform/settings/connections/http-endpoint/)
+- [Expressions](../../../../alerts/expressions/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/spans-list-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/spans-list-panel.mdx
deleted file mode 100644
index a787fcb2..00000000
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/spans-list-panel.mdx
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: "Spans List Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
----
-The Spans List Panel displays a list of spans generated for the selected time range. The list can be filtered based on available attributes, and you can choose which columns to display from your span data.
-
-When the panel type is set to Spans List, the following settings are available under the **General** tab:
-
-
-
-### Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-
-### Columns
-Configure the appearance of each column in the spans table. Each column selected in the query can be expanded to set a custom display name using Rename to, and a Width with alignment options (Auto, Left, Center, or Right). For numeric columns such as duration, you can also set a Format, maximum number of decimal places, a multiplier, and a prefix or suffix. Columns correspond to the fields selected in the query, such as serviceName, spanId, duration, and status.code.
-
-### Time Range
-Configure time range behavior for this panel independently from the dashboard.
-
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
-
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
-
-***
-
-At the query level, you can select which Columns to display, filter results using Filters, sort using Order by, and control how many rows appear using the Limit field.
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/stats-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/stats-panel.mdx
index d02beb96..ad0c5426 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/stats-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/stats-panel.mdx
@@ -1,65 +1,85 @@
---
title: "Stats Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Show one headline number per series as a tile, colored by thresholds."
---
-The Stats Panel displays your data as a single prominent value. It includes a query box to define the data and a set of settings to control how that value is calculated and visually presented.
-When the panel type is set to Stats, the following settings are available under the **General tab**:
+A Stats panel reduces each series to one number and shows it as a tile. Use it for headline values such as the error count over the last hour or the current p95 latency of a service.
-
+
-### Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-- **Links:** Click **Add link** to connect the panel to related resources, such as a runbook or an external dashboard.
-- **Repeat options:** Set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in this editor.
+## Panel
-### Calculations
-Select the aggregate calculation you want the panel to display. Available options include Count, Mean, Max, Min, Total, and others. This determines the single value shown prominently in the panel.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-### Rename
-Click **Add** to rename a field for display, mapping its raw name to the label you want shown in the panel.
+## Standard options
-### Stat Config
-Control the formatting of the value displayed in the panel.
+- **Display name** renames a tile's label.
+- **Range** sets the **Min** and **Max** a value is measured against. You need it when a percentage threshold uses **The field's own range** (see [Stat options](#stat-options)).
+- **Format** sets the unit and how the number is written. If you leave **Unit** on **Auto**, the tile uses the unit the metric declares.
+- **Color scheme** sets the tile color: **Single color**, **From thresholds**, or a palette that gives every tile its own color. A **Single color** takes priority over thresholds.
+- **No-data value** sets what a tile shows when its query returns no value, for example `0` for a count that matched nothing. Without it, the tile shows **No Data**.
-- Use the Format dropdown to choose how the value is presented, such as Number, Percentage, or Duration.
-- Set the maximum number of decimal places to control precision.
-- Optionally multiply the value by a number, or add a prefix and suffix to the displayed value.
+See [Format values and units](../../panel-options/format-and-units/) and [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
-
+
-### Standard options
-Configure the visual presentation of the stat panel.
+## Calculations
-- **Display Mode:** Choose between Grid view, which presents multiple values in a grid layout, or Table view, which displays values in a sortable table format.
-- **Graph mode:** Show the value alone (None) or with a small area chart behind it (Area).
-- **Text mode:** Choose what information appears in the panel: the label only, the value only, or both together.
-- **Color mode:** Choose whether the color is applied to the value text only, or to the entire panel background.
-- **Color scheme:** Select a single color to apply uniformly to all values, or use threshold-based coloring so the color automatically changes when a value crosses a defined threshold.
+**Choose a Calculation** sets how each series is reduced to one number: **Min**, **Max**, **Mean**, **Total**, **First**, **Last**, or **Count**. When you leave it empty, the tile shows the last value.
-### Threshold
-Define threshold values to visually indicate when a stat crosses an important boundary.
+To use a different calculation for some series, set **Calculations** in an override. For example, show **Total** for a request count and **Last** for a queue depth on the same panel.
-- A default color is shown for values that do not cross any threshold.
-- Click **Add Threshold** to define additional threshold values, each with its own color.
-- **Threshold Mode:** Choose between Absolute Value (based on the actual data value) or Relative Percentage (based on a percentage of the range).
-- When the stat value crosses a threshold, the panel color updates to the corresponding threshold color.
+## Rename
-
+Click **Add**, pick a tile label under **Rename**, and type the new label in **To**. The list offers the labels the panel currently draws.
-### Data links & actions
-Add URL links that users can access from within the panel.
+## Stat options
-### Value Mappings
-Map specific data values to custom display text and colors based on defined conditions. When a value meets a condition, it is replaced with the mapped text and displayed in the mapped color. Click Edit to add or modify mappings.
+- **Display Mode:** **Grid** lays the tiles out in a grid, **Stack** puts them in a single column, and **Inline** places them side by side in one row. **Cells** draws one small colored cell per series with no text, for a status grid of many hosts, pods, or devices. Hover a cell for its name and value, and click it for its data links. From the keyboard, Tab reaches the cells, the arrow keys move between them, and Enter opens a cell's links.
+- **Shape** (Cells only): **Square**, **Circle**, **Diamond**, or **Hexagon**. Hexagons pack as a honeycomb.
+- **Show summary** (Cells only) adds a line below the cells that counts them by their mapped text, such as **39 Running · 2 Pending**. It needs [value mappings](#value-mappings) that set text.
+- **Sort** sets the order tiles and cells are drawn in: **Value, lowest first**, **Value, highest first**, **Name**, or **None** (the query's order). Tiles with no value go last.
+- **Graph mode** (not with Cells): **None** shows the value alone. **Area** draws a small area chart of the series behind it.
+- **Text mode** (not with Cells): what each tile shows: **Auto**, **Value**, **Label**, or **Label & Value**.
+- **Color mode** (not with Cells): where the tile's color goes: **None**, **Value** (the number), or **Background** (the whole tile).
+- **Threshold range** appears when a threshold uses **Relative Percentage**, or when **Color scheme** is a color ramp. It sets the range the percentage or the ramp is measured against:
+ - **Whole panel** (the default) runs from the smallest to the largest value of every series behind the panel's tiles, counting every point in the time range and each tile's value.
+ - **Per query** does the same with the series of the tile's own query.
+ - **The field's own range** uses the **Range** set in Standard options. A tile with no range set stays in the default color.
-
+## Threshold
-### Time Range
-Configure time range behavior for this panel independently from the dashboard.
+Thresholds change a tile's color when its value crosses a step, and **Color mode** decides whether the number or the whole tile takes that color. Click **Add Threshold** for each step, and click **Set default color** to choose the color for values below every step. See [Thresholds](../../panel-options/thresholds/).
-- **Override Dashboard Time Range:** Enable this to allow the panel to use its own time range instead of the one selected at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+## Data links & actions
+
+Clicking a tile opens a menu of its data links. Add links to every tile here, or to selected tiles with an override. See [Data links](../../panel-options/data-links/).
+
+## Value mappings
+
+Value mappings replace a tile's value with text and a color. For example, map `0` to `Healthy` in green. See [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
+
+
+
+## Time range
+
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+
+## Overrides
+
+Use the **Overrides** tab to change options for some tiles only. A rule picks series with **Applies to** and can set **Display name**, **Range**, **Calculations**, **Format**, **Color scheme**, **Threshold**, **Data links & actions**, and **Value mappings**. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Gauge Panel](../gauge-panel/)
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/table-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/table-panel.mdx
index 1d5897fd..609d00bc 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/table-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/table-panel.mdx
@@ -1,58 +1,93 @@
---
title: "Table Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Show query results, log records, or spans as rows and columns, with per-column formatting and cell types."
---
-The Table Panel displays your data in a structured table format, making it easy to read and compare values across rows. It includes a query box to define the data and settings to control how columns and values are presented.
-When the panel type is set to Table, the following settings are available under the **General tab**:
+A Table panel shows query results as rows and columns. Use it to compare values across hosts, pods, or services, or to list individual log records and spans.
-
+
-### Panel
+## Show logs and traces
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-- **Links:** Click **Add link** to connect the panel to related resources, such as a runbook or an external dashboard.
-- **Repeat options:** Set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in this editor.
+To list log records or spans, use a Table panel. In the query, choose the **Logs** or **Traces** data set and open the **Records** tab. Each record becomes a row.
-### Columns
-Configure the appearance and formatting of each column in the table individually. Each column detected from your query result appears here and can be expanded to access its settings.
+Dashboards that had Logs List or Spans List panels show them as Table panels.
-- **Rename to:** Enter a custom display name for the column heading.
-- **Width:** Set a fixed width for the column or leave it as Auto to size automatically.
-- **Format:** Choose how the column values are formatted.
-- You can also set the maximum number of decimal places, multiply values by a number, and add a prefix or suffix to the displayed values.
+## Sort and limit rows
-
+Below the query editor, **Order by** sorts the rows by a column (**Select column**) in the direction you pick under **Order**. **Limit** caps the number of rows. Both apply to every query the table joins.
-### Cell options
-Control the visual style applied to table cells.
+## Choose a query or series
-- **Cell style:** Choose a display style for the cells.
-- **Color scheme:** Apply a color scheme to the cells for visual emphasis.
+When the panel returns more than one table, or a query returns several series, a picker at the foot of the panel lets you choose which one to show. The choice isn't saved with the panel.
-### Value Mappings
-Map specific data values to custom display text and colors based on defined conditions. When a value meets a condition, it is replaced with the mapped text and displayed in the mapped color. Click Edit to add or modify mappings.
+## Panel
-### Threshold
-Add thresholds to highlight values that cross important boundaries.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-- Click **Add Threshold** to define a threshold value and assign a color to it.
-- **Threshold Mode:** Choose between Absolute Value (based on the actual data value) or Relative Percentage (based on a percentage of the range).
+## Standard options
-
+Every option in this section applies to all columns when you set it in the **Options** tab. To set it for one column, use an override.
-### Data links & actions
-Add URL links that users can access from within the panel.
+- **Display name** renames a column. Set it in an override, for example to rename `A:LAST` to `Memory limit`.
+- **Range** sets the **Min** and **Max** that a **Gauge** cell fills against. Each column keeps its own range.
+- **Format** sets the unit and how numbers are written. A number column with no unit and no format shows plain digits, such as `90331`.
+- **Color scheme** sets the color that cells and chips use: **Single color**, **From thresholds**, a palette, or a color ramp that colors each value by where it sits between the column's lowest and highest value.
-### Time Range
-Configure time range behavior for this panel independently from the dashboard.
+See [Format values and units](../../panel-options/format-and-units/) and [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+## Cell options
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+**Cell type** sets how a cell draws. Set it here for every column, or per column with an override, so one table can show a duration as a bar, a status as a chip, and a count as text.
-:::info
-At the query level, the Table panel also includes **Order By** to sort results by a selected field in ascending or descending order, and **Limit** to restrict the number of rows displayed.
-:::
+| Cell type | What the cell shows |
+| --- | --- |
+| **Auto** (default) | The formatted value as text. |
+| **Colored text** | The text in the threshold color. |
+| **Colored background** | The threshold color behind the cell. Turn on **Apply to entire row** to color the whole row. |
+| **Gauge** | A bar that fills its share of the column's **Range**. **Bar** is **Basic** (a flat bar) or **Gradient** (shaded along the threshold steps). **Value** is **Show value** or **Bar only**. |
+| **Chip** | Each value in a chip, colored by the column's **Color scheme**. |
+| **Links** | The column's data links, drawn in the cell. |
+| **JSON** | The value as pretty-printed JSON. |
+| **Image** | The image at the URL the value holds. |
+
+A cell type draws only on the columns it suits. **Gauge** needs a number column, **Chip** a text, true or false, or enum column, **Image** a text column, and **JSON** a JSON or text column. Any other column keeps drawing as text.
+
+## Column layout
+
+**Width** sets a fixed column width; leave it on **Auto** to size the column automatically. **Align** places the content **Left**, **Center**, or **Right**. Set both per column with an override.
+
+## Value mappings
+
+Value mappings replace a cell's value with text and a color. They work on text and true or false columns as well as numbers. For example, map `down` to `Down` in red on a status column. The mapping color shows on every cell type, including chips. See [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
+
+## Threshold
+
+Thresholds set the color for **Colored text** and **Colored background** cells, and the shading of a **Gradient** gauge. See [Thresholds](../../panel-options/thresholds/).
+
+
+
+## Data links & actions
+
+A cell with one data link turns its value into the link. A cell with several opens a list of them when you click the value. To draw the links inside the cell instead, use the **Links** cell type. See [Data links](../../panel-options/data-links/).
+
+## Time range
+
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday. See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+
+## Overrides
+
+Per-column settings live in the **Overrides** tab. A rule picks columns with **Applies to**, for example **Fields with names**, and can set **Display name**, **Range**, **Cell options**, **Column layout**, **Format**, **Color scheme**, **Value mappings**, **Threshold**, and **Data links & actions**. For example, one rule can rename a `duration` column, format it in milliseconds, and draw it as a **Gauge**. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+To reorder columns, add an **Organize fields** step in the **Transform** tab. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
+- [Transformations](../../panel-options/transformations/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/text-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/text-panel.mdx
index 76baf31a..27d215d3 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/text-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/text-panel.mdx
@@ -1,18 +1,89 @@
---
title: "Text Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Add Markdown or HTML to a dashboard, with live query values, variables, and the time range."
---
-The Text Panel lets you add custom text, descriptions, or notes directly to your dashboard. This is useful when you want to provide context, explain metrics, highlight key observations, or include instructions for dashboard viewers.
-When the panel type is set to Text, the following settings are available under the **General** tab:
+A Text panel adds notes, instructions, or links to a dashboard, written in Markdown or HTML. It can also show live values from its queries, such as "Error rate over the last hour: 0.4%", so a sentence stays current as the data changes.
-
+
-### Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
+## Panel
-### Content
-Use the text editor to enter the content you want to display in the panel. Markdown is supported, including GitHub-flavored tables, so you can format your content with headers, lists, links, and tabular data.
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-Type `${` to insert a query value, a variable, or the time range, with a live preview as you type. Format inline with `${value:bytes}` or `${value:number(1)}`, and set a fallback with `${value ?? "—"}`. Loop over a query's series with `${#each A.series} … ${/each}` (`${item.value.text}`).
+## Standard options
+
+**Format** sets how `.text` tokens are written (see [Format a value](#format-a-value)). **Display name** renames a series. To format one query's values differently from the rest, add an override with **Applies to** set to **Fields returned by query**. See [Format values and units](../../panel-options/format-and-units/).
+
+## Content
+
+**Format** switches the editor between **Markdown** and **HTML**.
+
+- **Markdown** supports GitHub-flavored tables, so you can write headings, lists, links, and tables.
+- **HTML** gives you an **HTML** editor and a **CSS** editor, and a **Transparent background** switch. The HTML is rendered in isolation with its own CSS: scripts are removed and embeds are sandboxed. In the CSS, `:host` is the panel body. For example, `:host { height: 100%; display: flex; align-items: center; justify-content: center }` centers the content. Use the theme variables, such as `--km-text`, `--km-text-muted`, `--km-surface`, `--km-border`, and `--km-accent`, instead of fixed hex colors so the panel reads well in both light and dark mode.
+
+## Insert query values and variables
+
+Type `${` in the editor to see the tokens you can insert, each with a live preview of its value. `A` below stands for a query ID.
+
+| Token | Value |
+| --- | --- |
+| `${A.value.text}` | The last value of query A's first series, formatted |
+| `${A.value.numeric}` | The same value as a raw number |
+| `${A.last.text}`, `${A.avg.text}`, `${A.min.text}`, `${A.max.text}`, `${A.sum.text}` | The last, mean, minimum, maximum, or total value. Each also has a `.numeric` form. |
+| `${A.series.name}` | The legend name of the first series |
+| `${A.field.name}` | The column name |
+| `${A.field.labels.service}` | The value of a label. Use brackets for a key with dots: `${A.field.labels["k8s.node.name"]}` |
+| `${service}` | The value of the dashboard variable `service` |
+| `${__from}`, `${__to}` | The start and end of the time range, in epoch milliseconds |
+| `${__timeRange}` | The time range |
+| `${__workspaceId}` | The workspace ID |
+
+If a query ID and a dashboard variable have the same name, the token reads the query.
+
+To repeat content for every series of a query, use a loop. `item` is the current series, and `item.index` is its position:
+
+```markdown
+${#each A.series}
+- ${item.value.text}
+${/each}
+```
+
+Tokens are replaced everywhere in the content, including inside code blocks. To write a literal `${`, escape it as `$${`.
+
+### Format a value
+
+A `.text` token is written in the series' unit, using the panel's **Format** and any overrides that match the series. For example, if query A returns memory in bytes, `${A.value.text}` shows it in gigabytes or megabytes, while `${A.value.numeric}` shows the raw byte count.
+
+To format a single token, add a formatter after a colon, for example `${A.value.numeric:bytes}`. Some formatters take a decimal places argument, such as `${A.value.numeric:number(1)}`. A value that isn't a number passes through unchanged.
+
+- Numbers: `number`, `locale`, `percent`, `currency`
+- Data: `bytes`, `bytes_iec` (KiB and MiB), `bytes_rate`, `bits`
+- Durations: `duration` (from milliseconds), `duration_sec` (from seconds)
+- Dates and times: `datetime`, `datetime_utc`, `date`, `time`, `relative`
+
+The string formats `csv`, `pipe`, `json`, and `raw` are also available.
+
+### Missing values and fallbacks
+
+A token that doesn't resolve, for example because the query returned no data, renders as `—` and the rest of the panel still draws. To show something else, add a fallback with `??`:
+
+```markdown
+Error rate: ${A.value.text ?? "n/a"}
+```
+
+## Overrides
+
+Use the **Overrides** tab to set **Display name** or **Format** for some series only. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the tokens read them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/timeseries-panel.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/timeseries-panel.mdx
index 762569dd..1f215761 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/timeseries-panel.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-a-panel/timeseries-panel.mdx
@@ -1,62 +1,103 @@
---
title: "TimeSeries Panel"
-description: "Learn how to configure and use this visualization feature in KloudMate."
+description: "Plot one or more series over time, with axes, thresholds, annotations, and per-series overrides."
sidebar:
order: 100
---
-The TimeSeries Panel displays your data as a time-based graph. It includes a query box to define the data you want to visualize, and a set of settings to customize how that data is presented.
-When the panel type is set to TimeSeries, the following settings are available under the **General tab**:
+A TimeSeries panel plots values over time, one line per series. Use it to follow a trend, such as request rate or CPU usage, and to compare several series on the same time axis.
-
+
-### Panel
-- **Name:** Enter a name for your panel. This appears as the panel title on the dashboard.
-- **Description:** Enter a description to provide additional context about what the panel displays.
-- **Links:** Click **Add link** to connect the panel to related resources, such as a runbook or an external dashboard.
-- **Repeat options:** Set **Repeat by variable** to render one copy of this panel for each value of the selected variable. Only the first 20 values are used, and the copies show on the dashboard, not in this editor.
+## Panel
-
+- **Name** is the title shown on the dashboard.
+- **Description** appears behind the info icon in the panel header.
+- **Links** connect the panel to related resources, such as a runbook or another dashboard. Click **Add link** to add one.
+- **Repeat by variable** draws one copy of the panel for each value of a dashboard variable, up to the first 20 values. Choose a **Direction**, and for horizontal repeats, a **Max per row**. The copies appear on the dashboard, not in the editor.
-### Axes
-Configure how data is represented on each axis of the graph.
+
-- **X-Axis:** Use the Date Style dropdown to choose from various date formats for the horizontal axis of the graph. The default is Auto.
-- **Y-Axis:** Set a Min and Max value to control the visible range of the vertical axis. Use the Format dropdown to choose the unit of data displayed, such as Number, Percentage, or Duration. You can also set the maximum number of decimal places, multiply values by a number, and add a prefix or suffix to the displayed values.
-- **Y-Axis (Right):** You can add a second Y-axis on the right side of the graph and configure it with the same options as the left Y-axis.
+## Standard options
-
+**Format** sets the unit and how numbers are written. If you leave **Unit** on **Auto**, the panel uses the unit the metric declares. **Color scheme** sets the line colors: a palette gives every series its own color, and **From thresholds** colors each line by the threshold step its last value falls in.
-### Legend
-Choose between Table or List mode to control how query results are displayed. Use the Values selector to pick aggregate functions such as Min, Max, or Total to show alongside each legend entry.
+**Display name** renames a series. It's most useful in an override, where it renames only the series the rule matches. See [Format values and units](../../panel-options/format-and-units/) and [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
-### Graph options
-Adjust the visual appearance of the graph using Line width and Fill opacity controls.
+## Axes
-### Tooltip
-Choose what information appears when hovering over the graph.
+- **X-Axis:** **Date style** sets how times are written along the axis. **Auto** picks a format from the length of the time range.
+- **Y-Axis:** **Min** and **Max** pin the ends of the left axis instead of fitting it to the data.
+- **Y-Axis (right):** **Min** and **Max** for the right axis. The right axis appears when you place a series on it with [Axis placement](#axis-placement).
-### Standard options
-Set a Color scheme to apply a consistent color palette across all series in the panel.
+Each Y axis writes its labels in the unit of the series drawn on it. For example, with request rate on the left and memory on the right, the right axis reads in bytes.
-### Threshold
-Add one or more threshold lines on the graph to visually mark important value boundaries.
+
-- Click **Add Threshold** to define a threshold value, assign it to the left or right Y-axis, and give it a color.
-- **Threshold Mode:** Choose between Absolute Value (based on the actual data value) or Relative Percentage (based on a percentage of the data range).
-- **Line Type:** Choose how the threshold line is rendered on the graph.
+## Legend
-
+**Mode** shows the legend as a **Table** or a **List**, or turns it **Off**. **Values** adds summary values next to each series: **Min**, **Max**, **Mean**, **Total**, **First**, **Last**, or **Count**. A series with no values in the time range shows `-` for each one.
-### Data links & actions
-Add URL links that users can access by interacting with the panel data points.
+## Graph options
-### Time Range
-Configure time range behavior for this panel independently from the dashboard.
+- **Line width** runs from 0 to 10, with a default of 1.5.
+- **Fill opacity** runs from 0 to 100, with a default of 15. At 0, the panel draws lines with no fill.
+- **Missing values** sets what a line does where its series has no data point. **Connect** (the default) joins the points on either side, **Leave a gap** breaks the line, and **Show as zero** drops it to zero.
-- **Override Dashboard Time Range:** Individual panels can use their own time range configuration. Enable this to override the time range set at the dashboard level.
-- **Time Shift:** Shift the panel’s start and end time by a specified time shift expression. Use the minus (`-`) operator to subtract time, with the same units supported by the dashboard time range expressions.
+When series report at different times, each one has gaps at the others' timestamps. **Connect** draws through those gaps, so it's usually the right choice when you compare series from different sources.
-
+To change graph options for one series only, such as a thicker line for the series that matters most, set **Graph options** in an override.
-Refer to [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for supported units and syntax.
+## Tooltip
+
+Choose what the tooltip shows when the cursor is over the chart: **Single** shows one series, **All** shows every series at that time, and **Hidden** turns the tooltip off.
+
+### Pin the tooltip and create an alert
+
+Click a point to pin the tooltip in place. The pinned tooltip lists the [data links](../../panel-options/data-links/) of the series you clicked. Click elsewhere, or scroll the page, to unpin it. A refresh that moves the pinned time step also unpins it. A missing value in the pinned tooltip shows as `-`.
+
+On a saved dashboard, the pinned tooltip offers **Create alert at this value**. It opens a new alert rule built from the panel's query, with the clicked value as the threshold. See [Create alerts](../../../../alerts/create-alerts/).
+
+## Axis placement
+
+Choose **Auto**, **Left**, or **Right**. Set here, it applies to every series. To move a single series to the right axis, add an override with **Axis placement** set to **Right**. For example, put latency on the right axis and request count on the left.
+
+## Threshold
+
+Thresholds draw as horizontal lines across the chart. Click **Add Threshold** for each step, pick its color, and use its **Y-Axis** toggle to draw it against the left or right axis. Then choose the line style with **Line Type**: **Off**, **Line**, or **Lines (Dashed)**. With **Color scheme** set to **From thresholds**, the steps also color the lines. See [Thresholds](../../panel-options/thresholds/).
+
+
+
+## Data links & actions
+
+Add data links to every series here, or to selected series with an override. See [Data links](../../panel-options/data-links/).
+
+## Value mappings
+
+Value mappings replace values in the tooltip, on the Y axis, and in the legend values. For example, map `1` to `Up` and `0` to `Down` on a health check series. See [Colors and value mappings](../../panel-options/colors-and-value-mappings/).
+
+## Annotations
+
+Mark firing alerts, issues, custom annotations, or the results of your own query on the chart, and choose whether each source draws as a **Band** or a **Point**. See [Annotations](../../annotations/).
+
+## Time range
+
+Turn on **Override dashboard time range** to give this panel its own time range. **Time shift** moves the panel's range back in time, for example `-1d` to show the same window yesterday.
+
+
+
+See [Time Range Expressions and Settings](../time-range-expressions-and-settings/) for the supported units and syntax.
+
+## Overrides
+
+Use the **Overrides** tab to change options for some series only. A rule picks series with **Applies to**, for example **Fields with names**, and can set **Display name**, **Format**, **Graph options**, **Color scheme**, **Axis placement**, **Threshold**, **Data links & actions**, and **Value mappings**. For example, set **Color scheme** to **Single color** to give one series a fixed color. See [Overrides](../../panel-options/overrides/).
+
+## Transform
+
+Use the **Transform** tab to reshape the query results before the panel draws them. See [Transformations](../../panel-options/transformations/).
+
+## Related
+
+- [Panel options](../../panel-options/)
+- [Queries and data sources](../queries-and-data-sources/)
+- [Annotations](../../annotations/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/adding-links-to-dashboards.mdx b/src/content/docs/docs/visualize-data/dashboards/adding-links-to-dashboards.mdx
index ef6adb0a..1374f077 100644
--- a/src/content/docs/docs/visualize-data/dashboards/adding-links-to-dashboards.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/adding-links-to-dashboards.mdx
@@ -23,13 +23,13 @@ KloudMate dashboards support two kinds of links: internal links to other dashboa
5. Select **Dashboard** as the link type.
-6. Optionally, add a **Tag** to reference the target dashboard.
+6. Optionally, add a **Tag** to reference the target dashboard. The link lists the dashboards that carry this tag with exactly the same spelling, case included.
7. Select from the available options:
- **Open in new tab:** Opens the linked dashboard in a separate browser tab.
- **Add time range:** Transfers the time range selected in the main dashboard to the linked dashboard.
- - **Add variables:** Transfers variables from the main dashboard to the linked dashboard if the same variables are available.
+ - **Add variables:** Sends each variable's current value to the linked dashboard as `var-`. The current value is the one from the link you opened, your last pick, or the variable's default. A variable with no value is left out, and the linked dashboard uses the values for the variables it has.
- **Show as dropdown:** Displays multiple dashboard links as a dropdown, useful when several links are added to the same dashboard.
8. Click **Save**.
@@ -59,18 +59,4 @@ Once saved, the link appears as a button in the top-right corner of the dashboar
## Add a Data Link to a Panel
-1. Navigate to the dashboard containing the panel and open it for editing.
-
-2. In the right-hand panel settings, scroll down to **Data links & actions**.
-
- 
-
-3. Under **Data links**, click **Add link**.
-
-4. Enter a **Title** and the **URL** for the link.
-
-5. Toggle **Open in new tab** if needed.
-
- 
-
-6. Click **Save**.
+Data links are set in the panel editor and open from a panel's values, such as a stat tile or a table cell. See [Data links](../panel-options/data-links/).
diff --git a/src/content/docs/docs/visualize-data/dashboards/annotations.mdx b/src/content/docs/docs/visualize-data/dashboards/annotations.mdx
new file mode 100644
index 00000000..6d6924e4
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/annotations.mdx
@@ -0,0 +1,137 @@
+---
+title: "Annotations"
+description: "Mark deploys, incidents, and other events on TimeSeries panels, and show firing alerts, issues, and query results on the time axis."
+sidebar:
+ order: 5.5
+---
+
+Annotations mark events on the time axis of a **TimeSeries** panel, so you can see what was happening when a line changed. You can mark a moment or a time range by hand, show the alerts and issues related to the panel, draw events from any query, and post deploy markers from a CI pipeline.
+
+Only TimeSeries panels draw annotations.
+
+## Mark a moment or a region
+
+On a saved dashboard (not a public one, which draws no annotations), hold **Cmd** (macOS) or **Ctrl** (Windows and Linux), then:
+
+- Click the chart to mark a moment.
+- Drag across the chart to mark a region, for example the length of a deploy or an incident.
+
+A dialog opens showing the time you marked. Add a **Description** and comma-separated **Tags**, such as `deploy, incident`, then click **Add**. Both fields are optional.
+
+A mark belongs to the panel you drew it on, so it doesn't appear on other panels. You can't add marks to a dashboard that hasn't been saved yet. Any workspace member can add a mark, including a **Viewer**.
+
+## Read and delete a mark
+
+Hover a mark to see its time, description, and service. For a region, hover the bar along the bottom of the plot. The shaded area itself doesn't respond to the pointer, so you can still read the values under it. Marks that sit close together are grouped into one, and the card lists every event in the group.
+
+If the event is an alert or an issue, its title in the card links to that alert or issue in a new tab.
+
+To delete a mark, hover it and click the delete icon in the card. You can delete the **Custom annotations** you added yourself, and an **Admin** can delete anyone's. Alerts, issues, and events drawn from a query can't be deleted from the chart.
+
+## Choose what a panel shows
+
+Open the panel editor and expand **Options** → **Annotations**. Every source is on by default, and each one has a **Band**, **Point**, or **Off** setting:
+
+| Source | What it draws | Default |
+| --- | --- | --- |
+| **Alerts** | Alerts related to this panel, while they're firing | Band |
+| **Issues** | Issues from the services the panel shows | Point |
+| **Custom annotations** | Marks added on this panel, by hand or through the API | Band |
+
+**Band** shades the time between an event's start and end. **Point** draws a marker on the time axis at the start of each event. **Off** hides the source on this panel.
+
+Alerts and issues take their color from the alert state or the issue severity, for example red for a firing alert. Custom annotations always use the same color, so they look the same on every panel.
+
+### Which alerts appear
+
+An alert is drawn while it's firing, as a band from the moment it started firing to the right edge of the chart. Resolved and pending alerts aren't drawn.
+
+A panel shows an alert when either of these is true:
+
+- The alert is linked to the panel. An alert you [create from the panel](../../../alerts/create-alerts/#create-an-alert-from-a-dashboard-panel) is linked automatically. Any alert whose **Responder context** names this dashboard and panel is linked too.
+- The alert shares a label with what the panel shows. For example, an alert firing for `service.name = checkout` appears on a panel filtered or grouped by `service.name = checkout`. Service name keys match each other whichever spelling they use: `service.name`, `service_name`, or `serviceName`.
+
+### Which issues appear
+
+An issue appears when its service matches a service the panel shows. It's drawn as a point at its most recent occurrence. Muted issues aren't shown.
+
+## Add events from a query
+
+A query source draws events from any query whose rows carry a time column, such as error spans, log lines that record a deploy, or rows from an HTTP endpoint.
+
+1. In **Options** → **Annotations**, click **Add annotation**. The **Query annotation** dialog opens.
+2. Build the query, then click **Run query**.
+3. Under **What each row means**, pick the column for each field:
+ - **When it happened:** the timestamp of each event. This field is required.
+ - **When it ended:** the end time. Leave it empty to draw each row as a point.
+ - **Label:** the text shown on the chart and in the hover card.
+ - **Tags:** optional tags for each event.
+4. Click **Save**.
+5. Give the source a **Name** and pick its color.
+
+A column that's already named `time`, `endTime`, `text`, or `tags` is used for that field without being set. You can also type a column name. To read a key inside a JSON column, write it as `column.key`, for example `attributes.http.route`.
+
+The query runs on the panel's time range each time the panel refreshes. Query sources are the only ones with their own color. Drag a source to reorder it, or click its delete icon to remove it.
+
+### Example: mark failed requests
+
+To show each failed request as a band on a latency panel:
+
+1. Click **Add annotation**.
+2. Select the **KloudMate** data source, the **Traces** data set, and the **Records** tab.
+3. Add the filter `status_code = 2`. OpenTelemetry sets status code `2` on a span that failed.
+4. Click **Run query**.
+5. Set **When it happened** to the span's start time column and **When it ended** to its end time column, so each band is as long as the request. Set **Label** to the span name.
+6. Click **Save**, and name the source `Failed requests`.
+
+## When a source fails
+
+If a source can't be drawn, a warning icon appears in the panel header. Hover it to see which source failed and why. The chart and the other sources still draw.
+
+## Add annotations from the API
+
+Post a mark from a CI pipeline to record every deploy on your dashboards. Send `POST /annotations` with a [personal API key](../../../platform/settings/api-keys/) in the `x-api-key` header:
+
+```bash
+curl -X POST https://api.kloudmate.com/annotations \
+ -H "x-api-key: YOUR_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "workspaceId": "YOUR_WORKSPACE_ID",
+ "time": 1762588800000,
+ "text": "Deploy checkout v2.14.0",
+ "tags": ["deploy", "checkout"],
+ "dashboardId": "YOUR_DASHBOARD_ID"
+ }'
+```
+
+For an organization in the India region, use `https://api.in.kloudmate.com`.
+
+| Field | Required | Description |
+| --- | --- | --- |
+| `workspaceId` | Yes | The workspace to add the mark to. |
+| `time` | Yes | When the event happened, in epoch milliseconds. In a shell, `$(($(date +%s) * 1000))` gives the current time. |
+| `endTime` | No | When the event ended, in epoch milliseconds. Set it to draw a region. It can't be earlier than `time`. |
+| `text` | No | The description, up to 2,000 characters. |
+| `tags` | No | Up to 50 tags. |
+| `dashboardId` | No | Show the mark on this dashboard only. |
+| `panelId` | No | Show the mark on this panel only. Requires `dashboardId`. |
+
+Where the mark appears depends on the IDs you send. It's drawn by the **Custom annotations** source:
+
+- Without `dashboardId`, on every TimeSeries panel in the workspace.
+- With `dashboardId` only, on every TimeSeries panel on that dashboard.
+- With both `dashboardId` and `panelId`, on that panel only.
+
+The workspace ID and dashboard ID are both in the dashboard's URL: `...//dashboards/`. To find a panel's ID, open the panel menu, click **Inspect**, and read `id` on the **Panel JSON** tab.
+
+A successful request returns `201` with the new mark, including its `id`. The mark belongs to the person who created the API key, so that person can delete it from the chart. To change a mark, send `PATCH /annotations/{id}` with `workspaceId` and the fields to change (`time`, `endTime`, `text`, or `tags`; an `endTime` of `null` turns a region into a point). To remove one, send `DELETE /annotations/{id}?workspaceId=YOUR_WORKSPACE_ID`.
+
+***
+
+## Related
+
+- [Managing Panels](../managing-panels/)
+- [Creating Alerts](../../../alerts/create-alerts/)
+- [Dashboard JSON and API](../dashboard-json-and-api/)
+- [API Keys](../../../platform/settings/api-keys/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/create-a-dashboard.mdx b/src/content/docs/docs/visualize-data/dashboards/create-a-dashboard.mdx
index 5ef955fa..5be7786b 100644
--- a/src/content/docs/docs/visualize-data/dashboards/create-a-dashboard.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/create-a-dashboard.mdx
@@ -19,6 +19,8 @@ Use a pre-built dashboard for common use cases. This is the fastest way to get s
Select a **Template** from the dropdown, then select a **Datasource** and click **Create Dashboard**.
+For an AWS data source, also pick a **Default Region**. It becomes the default value of the dashboard's region [variable](../dashboard-variables/).
+
### From Scratch
Build a fully custom dashboard. Enter a **Dashboard Name** and click **Create Dashboard**. You land on an empty dashboard where you can start adding panels.
diff --git a/src/content/docs/docs/visualize-data/dashboards/dashboard-details.mdx b/src/content/docs/docs/visualize-data/dashboards/dashboard-details.mdx
index c19857e0..131ab485 100644
--- a/src/content/docs/docs/visualize-data/dashboards/dashboard-details.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/dashboard-details.mdx
@@ -5,7 +5,7 @@ description: "Understand the dashboard details view, toolbar controls, and shari
sidebar:
order: 3
---
-Opening a dashboard takes you to the Dashboard Details view where all your panels are displayed together. This is your live monitoring view — all panels update based on the selected time range and refresh settings.
+Opening a dashboard takes you to the Dashboard Details view where all your panels are displayed together. Every panel updates with the selected time range and refresh setting.

@@ -45,7 +45,7 @@ KloudMate integrates alerts directly into your dashboard visualizations, providi
## Sharing a Dashboard
-Click **Share** — from the dashboard list's more options (⋯) icon, or from an individual dashboard's toolbar — to open the Share Dashboard dialog. Both entry points offer the same two options.
+To open the Share Dashboard dialog, click **Share** in the dashboard's toolbar, or in the more options (⋯) menu in the dashboard list.

@@ -56,13 +56,16 @@ Generates a link that anyone can use to view the dashboard without logging in to
- **Enable public sharing:** Toggle this on to activate the public link.
- **Allow time range selection:** Toggle this on to let viewers change the time range when viewing the shared dashboard.
- **Time range:** Sets the default time range viewers will see when they open the shared link.
+- **Variables:** Picks the value of each variable for the public link. Viewers can't change them. A public link opens on the values picked here, whatever the dashboard's defaults or anyone's own picks. A variable you don't pick here uses its default.
Click **Save** to apply the settings. The shared link can be managed from the **Public Dashboards** page.
+A public dashboard draws no annotations, and its panel menu has no **Create alert**.
+
### Copy JSON
-Copies the dashboard's JSON definition to your clipboard. Use this to replicate a dashboard in another workspace: same layout, no manual rebuild.
+Open the **Export** tab and click **Copy JSON** to copy the dashboard's JSON definition, or **Download** to save it as a file. Use it to recreate the dashboard in another workspace with the same layout and no manual rebuild.

-To recreate it elsewhere, navigate to the Dashboards section in the target workspace, click **Import**, paste the copied JSON, and click **Submit**. The dashboard is recreated in the new workspace.
+To import the JSON, or to read what it contains, see [Dashboard JSON and API](../dashboard-json-and-api/).
diff --git a/src/content/docs/docs/visualize-data/dashboards/dashboard-json-and-api.mdx b/src/content/docs/docs/visualize-data/dashboards/dashboard-json-and-api.mdx
new file mode 100644
index 00000000..054c6315
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/dashboard-json-and-api.mdx
@@ -0,0 +1,315 @@
+---
+title: "Dashboard JSON and API"
+description: "Export and import dashboards as JSON, read the dashboard and panel JSON format, and create, update, share, and delete dashboards with the REST API."
+sidebar:
+ order: 7.5
+---
+
+Every dashboard can be exported as JSON and imported into another workspace. You can also create, update, share, and delete dashboards from a script or a CI pipeline with the REST API, using the same JSON.
+
+## Export and import in the app
+
+To export a dashboard, open it, click **Share**, and open the **Export** tab. Click **Copy JSON**, or **Download** to save it as a `.json` file. See [Sharing a Dashboard](../dashboard-details/#sharing-a-dashboard).
+
+To import one, click **Import** on the Dashboards screen, paste the JSON, and click **Submit**. See [Importing a Dashboard](../#importing-a-dashboard).
+
+An export doesn't name any specific AWS account. CloudWatch queries point at a `$Datasource` data source variable instead, so after you import the dashboard, pick an account in the destination workspace from that variable's dropdown.
+
+The export holds four keys:
+
+```json
+{
+ "name": "Checkout service",
+ "description": "Latency, errors, and throughput for checkout",
+ "data": { },
+ "tags": ["checkout", "prod"]
+}
+```
+
+`data` is the dashboard itself:
+
+| Key | Description |
+| --- | --- |
+| `timeRange` | The default time range, for example `"4h"`. |
+| `tz` | The time zone, for example `"local"`. |
+| `variables` | The [dashboard variables](../dashboard-variables/). A variable starts on its `default`. A `value` key on a variable is ignored, and the app never writes one. Saving in the app drops `usedInPanels`, `usedInVariables`, and `usesVariables`. |
+| `panels` | The panels, in the format below. |
+| `panel_layouts` | Where each panel sits on the grid. `i` is the panel's `id`, `x` and `y` are its position, and `w` and `h` are its width and height. |
+
+## The panel JSON format
+
+This `data` holds one TimeSeries panel with one query, a dashboard variable, and the panel's place on the grid:
+
+```json
+{
+ "variables": [
+ {
+ "name": "ds",
+ "type": "query",
+ "kind": "dataset",
+ "datasourceId": "kloudmate",
+ "dataset": "logs",
+ "query": {},
+ "default": "logs",
+ "show_all_option": false,
+ "sort": "none"
+ }
+ ],
+ "panels": [
+ {
+ "id": "p1",
+ "panelType": "timeseries",
+ "title": "CPU utilization",
+ "node_configs": [
+ {
+ "refId": "A",
+ "type": "query",
+ "datasourceId": "kloudmate",
+ "dataset": "metrics",
+ "query": {
+ "interval": 300,
+ "responseType": "series",
+ "aggregation": { "stat": "AVG", "metric": "system_cpu_utilization" },
+ "filters": []
+ }
+ }
+ ],
+ "timeseries": { "lineWidth": 2, "tooltip": { "mode": "multi" } },
+ "fieldConfig": {
+ "defaults": { "unit": "%", "decimals": 2 },
+ "overrides": [
+ { "matcher": { "id": "byRefId", "options": "A" }, "config": { "custom": { "axisPlacement": "left" } } }
+ ]
+ },
+ "transformations": [],
+ "annotations": [{ "id": "alarms", "kind": "auto-alarms", "enabled": false }]
+ }
+ ],
+ "panel_layouts": [{ "i": "p1", "x": 0, "y": 0, "w": 4, "h": 2 }]
+}
+```
+
+A panel has these keys:
+
+| Key | Description |
+| --- | --- |
+| `id` | The panel's ID, unique on the dashboard. `panel_layouts` refers to it as `i`. |
+| `panelType` | One of `timeseries`, `stats`, `gauge`, `table`, `pie_chart`, `bar_chart`, `histogram`, `heatmap`, `alarms` (Alerts List), `issues` (Issues List), or `text`. |
+| `title`, `description` | The panel's title and description. |
+| `node_configs` | The panel's queries and expressions, described below. |
+| An option set named after the panel type | Options that belong to that type, for example `timeseries` for a TimeSeries panel or `stats` for a Stats panel. Alerts List and Issues List panels have none. |
+| `fieldConfig` | Display settings. `defaults` apply to every field. Each rule in `overrides` has a `matcher` that picks fields (`byNames`, `byRegex`, `byRefId`, `byType`, or `byLabel`) and the `config` to apply to them. Units use UCUM codes, such as `%` for percent and `By` for bytes. See [Panel Options](../panel-options/). |
+| `transformations` | [Transformation](../panel-options/transformations/) steps that reshape the query results, run in order. Each step has a `type` and `options`, and `"disabled": true` switches it off. |
+| `annotations` | The panel's [annotation](../annotations/) sources. In the example, `"enabled": false` turns off the **Alerts** source. |
+
+Each query node in `node_configs` has these keys:
+
+| Key | Description |
+| --- | --- |
+| `refId` | The node's ID, such as `A`. Expressions refer to other nodes by this ID. |
+| `type` | `query`, or `expression` for a math, reduce, or condition node. |
+| `datasourceId` | Where the query runs: `kloudmate`, a connection ID, an AWS account ID, or a data source variable such as `$Datasource`. Every query node needs one. |
+| `dataset` | The data set, such as `metrics`, `logs`, or `traces`. |
+| `query` | The query itself, in the data source's own format. |
+| `hidden` | Set to `true` to run the query but leave it out of the panel. |
+
+Dashboards saved in an older format are upgraded to this one automatically, and they render as before. The exception is Logs List and Spans List panels, which become Table panels showing the same records.
+
+## Manage dashboards with the API
+
+The dashboard API creates, updates, shares, and deletes dashboards. Use the base URL for your organization's region:
+
+| Region | Base URL |
+| --- | --- |
+| US | `https://api.kloudmate.com` |
+| India | `https://api.in.kloudmate.com` |
+
+A key sent to the other region's URL gets a `421` response, with `apiUrl` naming the URL to use.
+
+### Authenticate
+
+Send a [personal API key](../../../platform/settings/api-keys/) in the `x-api-key` header. The API doesn't accept the key as `Authorization: Bearer`. The key acts as you, with the permissions you have in each workspace.
+
+Every request names the workspace in `workspace_id`: in the body for `POST` and `PUT`, and in the query string for `DELETE`.
+
+### Permissions
+
+| Routes | Permission on Dashboards | Built-in roles |
+| --- | --- | --- |
+| Create, update, and delete | **Manage** (`dashboards.manage`) | **Developer**, **Admin** |
+| Turn a public link on, change it, or turn it off | **Share** (`dashboards.share`) | **Admin** |
+
+Without the permission, the request fails with `403`, and the error names the permission it needs:
+
+```json
+{
+ "code": "missing_permission",
+ "message": "You need the dashboards.manage permission to do this.",
+ "permission": "dashboards.manage"
+}
+```
+
+See the [permission reference](../../../platform/settings/roles/permission-reference/) for custom roles.
+
+### Create a dashboard
+
+`POST /dashboards`
+
+| Field | Type | Required | Description |
+| --- | --- | --- | --- |
+| `workspace_id` | string | Yes | The workspace to create the dashboard in. |
+| `name` | string | Yes | The dashboard name. It can't be empty. |
+| `description` | string or null | No | The description. |
+| `data` | object or null | No | The dashboard JSON: variables, panels, and layout. |
+| `tags` | array of strings or null | No | Tags for the dashboard. |
+| `folder_id` | string or null | No | The folder to put the dashboard in. |
+| `is_folder` | boolean | No | Set to `true` to create a folder instead of a dashboard. |
+
+```bash
+curl -X POST https://api.kloudmate.com/dashboards \
+ -H "x-api-key: YOUR_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "workspace_id": "YOUR_WORKSPACE_ID",
+ "name": "CPU",
+ "data": {
+ "timeRange": "4h",
+ "tz": "local",
+ "variables": [],
+ "panels": [{
+ "id": "p1",
+ "panelType": "timeseries",
+ "title": "CPU utilization",
+ "node_configs": [{
+ "refId": "A",
+ "type": "query",
+ "datasourceId": "kloudmate",
+ "dataset": "metrics",
+ "query": { "aggregation": { "stat": "AVG", "metric": "system_cpu_utilization" }, "filters": [] }
+ }],
+ "timeseries": {},
+ "fieldConfig": { "defaults": {}, "overrides": [] }
+ }],
+ "panel_layouts": [{ "i": "p1", "x": 0, "y": 0, "w": 4, "h": 2 }]
+ }
+ }'
+```
+
+The response is the new dashboard, including its `id`.
+
+Keys the API doesn't recognize are ignored, so you can post an exported file as it is after adding `workspace_id`. For example, with `jq`:
+
+```bash
+jq '. + {workspace_id: "YOUR_WORKSPACE_ID"}' checkout.json | \
+ curl -X POST https://api.kloudmate.com/dashboards \
+ -H "x-api-key: YOUR_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d @-
+```
+
+### Update a dashboard
+
+`PUT /dashboards/{id}`
+
+| Field | Type | Required | Description |
+| --- | --- | --- | --- |
+| `workspace_id` | string | Yes | The dashboard's workspace. |
+| `name` | string | No | The new name. |
+| `description` | string or null | No | The new description. |
+| `data` | object or null | No | The dashboard JSON. It replaces the whole of the current `data`. |
+| `tags` | array of strings or null | No | The new tags. |
+| `folder_id` | string or null | No | The folder to move the dashboard to. |
+
+Only the fields you send change. `data` is the exception to partial updates: it replaces everything the dashboard holds, so to change one panel, send the full `data` with that panel changed. You can't turn a dashboard into a folder or a folder into a dashboard.
+
+```bash
+curl -X PUT https://api.kloudmate.com/dashboards/YOUR_DASHBOARD_ID \
+ -H "x-api-key: YOUR_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{"workspace_id": "YOUR_WORKSPACE_ID", "name": "CPU (prod)"}'
+```
+
+The last write wins. If someone saves the dashboard in the app after you exported it, your `PUT` overwrites their changes.
+
+### Delete a dashboard
+
+`DELETE /dashboards/{id}?workspace_id=YOUR_WORKSPACE_ID`
+
+```bash
+curl -X DELETE "https://api.kloudmate.com/dashboards/YOUR_DASHBOARD_ID?workspace_id=YOUR_WORKSPACE_ID" \
+ -H "x-api-key: YOUR_API_KEY"
+```
+
+The response is `{ "id": "" }`. Deleting a folder doesn't delete its dashboards. They move out of the folder.
+
+### Turn on a public link
+
+`PUT /dashboards/{id}/share`
+
+| Field | Type | Required | Description |
+| --- | --- | --- | --- |
+| `workspace_id` | string | Yes | The dashboard's workspace. |
+| `is_enabled` | boolean | Yes | Whether the public link works. |
+| `allow_time_selection` | boolean | Yes | Whether people with the link can change the time range. |
+| `allow_variables_selection` | boolean | Yes | Whether people with the link can change variables. |
+| `variable_values` | object or null | No | The variable values the link opens with. A variable missing from it opens on its default. |
+
+```bash
+curl -X PUT https://api.kloudmate.com/dashboards/YOUR_DASHBOARD_ID/share \
+ -H "x-api-key: YOUR_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{"workspace_id": "YOUR_WORKSPACE_ID", "is_enabled": true, "allow_time_selection": true, "allow_variables_selection": false}'
+```
+
+Send every setting each time, because the request replaces the previous settings. A dashboard has one public link. Sending `PUT` again changes its settings and keeps the same link. The response includes `access_token`, and the public link ends in `/d/public/`.
+
+### Turn off a public link
+
+`DELETE /dashboards/{id}/share?workspace_id=YOUR_WORKSPACE_ID`
+
+```bash
+curl -X DELETE "https://api.kloudmate.com/dashboards/YOUR_DASHBOARD_ID/share?workspace_id=YOUR_WORKSPACE_ID" \
+ -H "x-api-key: YOUR_API_KEY"
+```
+
+The link stops working right away. To replace a link with a new one, delete it and then send `PUT /dashboards/{id}/share` again.
+
+### Validation
+
+When you create or update a dashboard, every query node in `node_configs` is checked. A query node must name a `datasourceId`, and its `query` must match that data source's format. Everything else, including panel options, `fieldConfig`, transformations, annotations, and variables, is stored as you send it. A PromQL query is checked when it runs, not when it's saved.
+
+An invalid query node fails the request with `400`. The message names the panel by its position in `panels`, counting from `0`, and the node by its `refId`:
+
+```json
+{
+ "code": "BadRequestError",
+ "message": "1 panel query is invalid: panel 0 node A — datasourceId: a query node must name its datasource; without one it falls back to the built-in source, which may not be what the query means"
+}
+```
+
+On `PUT`, a query node that was already invalid before your update, and that you didn't change, is saved anyway. The response lists it in `misconfigured`, with its `panelIndex`, `nodeIndex`, `refId`, and `issues`. A query node you add or change must be valid. Imports in the app run the same check.
+
+### Errors
+
+Every error response has a `code` and a `message`.
+
+| Status | When |
+| --- | --- |
+| `400` | `workspace_id` is missing, the body doesn't match the fields above (`ValidationError`, with the problems in `issues`), or a query node is invalid (`BadRequestError`). |
+| `401` | The key is missing, unknown, or sent as `Authorization: Bearer`. |
+| `403` | You aren't a member of the workspace, the key belongs to a different organization, or you don't have the permission the route needs. |
+| `404` | The dashboard isn't in the workspace you named. |
+| `421` | The key belongs to the other region. Use the URL in `apiUrl`. |
+
+### Reading dashboards
+
+No API endpoint reads or lists dashboards. To get a dashboard's JSON, export it in the app. Because `PUT` replaces the whole of `data`, keep the JSON you deploy in source control and send it in full.
+
+***
+
+## Related
+
+- [API Keys](../../../platform/settings/api-keys/)
+- [Dashboard Variables](../dashboard-variables/)
+- [Annotations](../annotations/)
+- [Roles and permissions](../../../platform/settings/roles/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/dashboard-variables.mdx b/src/content/docs/docs/visualize-data/dashboards/dashboard-variables.mdx
new file mode 100644
index 00000000..ce514f8a
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/dashboard-variables.mdx
@@ -0,0 +1,86 @@
+---
+title: "Dashboard Variables"
+description: "Add variables that let viewers switch a dashboard between data sets, services, regions, or AWS accounts without editing its queries."
+sidebar:
+ order: 6.5
+---
+
+Variables let one dashboard cover many views. For example, a `service` variable puts a dropdown at the top of the dashboard, and every panel that uses it filters to the service a viewer picks. A data source variable switches every CloudWatch panel between your AWS accounts.
+
+## Add a variable
+
+1. Open the dashboard, click **Edit**, then click **Settings** and open the **Variables** tab.
+2. Enter a **Name**, a **Label**, and an optional **Description**. The name can contain only letters and numbers, with no spaces. The label is what viewers see on the dashboard.
+3. Choose a **Variable type**, and fill in the fields for that type.
+4. Check the **Preview of values** to see what viewers will be able to pick.
+5. Click **Save**.
+
+
+
+To use a variable in a panel, edit the panel's query and select the variable in place of a fixed value. Variables are listed above the other values in each field's picker. A data source variable is listed at the top of the **Data source** picker.
+
+## Variable types
+
+- **Query** takes its values from a data source. Pick the **Data source**, then a **Query type**.
+- **Data source** points panels at another account of the same type. The **Data source type** is **CloudWatch**, so a viewer can switch every CloudWatch panel between AWS accounts. A panel bound to the variable stays on that type, because a query written for one type can't run against another.
+- **Text box** lets viewers type a value on the dashboard. The **Default value** is used until someone types another.
+
+### Query types for KloudMate
+
+| Query type | Values |
+| --- | --- |
+| **Data set** | The data sets, such as Metrics, Logs, and Traces. A viewer picks one. |
+| **Attribute key** | Attribute keys, such as `service.name` or `host.name`. |
+| **Attribute values** | The values of one **Attribute**, such as every `service.name`. Set **Metric (optional)** to read the values from one metric's series only, which is useful when a label exists on a different metric from the ones your panels chart. Leave it on **Any metric** to look across every metric. |
+
+### Query types for CloudWatch
+
+| Query type | Values |
+| --- | --- |
+| **Region** | AWS regions. |
+| **Namespace** | CloudWatch namespaces, such as `AWS/EC2`. |
+| **Metric** | The metrics in a namespace. Needs a region and a namespace. |
+| **Dimension key** | Dimension keys, such as `InstanceId`. |
+| **Dimension values** | The values of a dimension, such as every instance ID. |
+
+## Shape the list of values
+
+Query variables have these settings:
+
+- **Sort:** **None** keeps the order the data source returned, which puts the most common values first. **A to Z** and **Z to A** sort alphabetically.
+- **Regex (optional):** Values that don't match are dropped, so `/^prod-/` keeps only the production values. A capture group shows part of each value: `/^prod-(.*)/` turns `prod-eu-1` into `eu-1`.
+- **Match on:** Whether the regex is tested against each option's **Label** or its **Value**.
+- **Multi value:** Lets viewers select more than one value. It's offered for **Attribute key**, **Attribute values**, **Dimension key**, and **Dimension values**.
+- **Show All option:** Adds an **All** choice at the top of the dropdown that matches every value. It's offered only where the data source can match every value at once, which is **Dimension values** on CloudWatch.
+
+Every variable also has **None** at the bottom of its dropdown. Selecting **None** removes that filter from the query entirely, rather than filtering on an empty value. This also applies to a filter inside an OR group and to a filter in an aggregation.
+
+## How a viewer's selection is kept
+
+When someone opens a dashboard, each variable starts on the first of these that applies:
+
+1. The value in the link. A shared link carries the sender's selection, so it opens on the same view.
+2. The value last chosen for this dashboard in this browser.
+3. The variable's default value.
+
+The value in the link is the `var-` URL parameter, for example `?var-service=checkout`. A multi-value variable takes a comma-separated list, such as `?var-service=checkout,payments`. Picking a value in the variable bar updates the parameter.
+
+The last pick is remembered for each dashboard, in this browser only.
+
+Picking a value never changes the saved dashboard, in view mode or in edit mode, and saving the dashboard doesn't save your picks. Viewers can change variables without edit access, and their picks don't affect anyone else. To change what a **Text box** variable starts on, set its **Default value** in the variable settings.
+
+A [dashboard link](../adding-links-to-dashboards/) with **Add variables** turned on, the **Export** button in the dashboard toolbar, and scheduled reports all use each variable's current value.
+
+A public link opens on the values picked in its own settings. See [Public link](../dashboard-details/#public-link).
+
+**Share** → **Export** copies the saved dashboard definition, so its JSON carries each variable's default and none of your picks.
+
+When you create a dashboard from an AWS template, the **Default Region** you pick becomes the default value of the dashboard's region variable.
+
+***
+
+## Related
+
+- [Managing Dashboards](../managing-dashboards/)
+- [Create a Dashboard](../create-a-dashboard/)
+- [Dashboard JSON and API](../dashboard-json-and-api/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/index.mdx b/src/content/docs/docs/visualize-data/dashboards/index.mdx
index 7233bbb4..f1ab0963 100644
--- a/src/content/docs/docs/visualize-data/dashboards/index.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/index.mdx
@@ -5,70 +5,64 @@ sidebar:
order: 1
label: "Introduction"
---
-KPI metrics come in all shapes and sizes and are often specific to businesses and applications. Pre-defined default metrics cannot always capture what matters most to your team. KloudMate’s custom metric dashboards let you cut through the noise and focus on only the metrics relevant to your application and business.
-
-Navigate to **Dashboards** from the left navigation menu to view all your existing dashboards and folders.
+Build dashboards to track the metrics that matter to your application and business. Open **Dashboards** in the left navigation to see all of them. To build one, see [Create a dashboard](./create-a-dashboard/).

-The Dashboards screen lists every dashboard and folder with its name, folder, description, and tags. Search for a specific dashboard using the search bar. Use the view toggle at the top-right to switch between the flat list and a folder view.
-
-From the more options (⋯) icon on any dashboard or folder, you can **edit**, **delete**, or **share** it. Sharing offers both a copyable public link and a copy of the dashboard's JSON — see [Sharing a Dashboard](./dashboard-details/#sharing-a-dashboard).
-
-### User Permissions
+## Find a dashboard
-| **Role** | **Permissions** |
-| ------------- | ---------------------------------------------- |
-| **Admin** | Create, edit, or delete dashboards and folders. Turn a public link on or off. |
-| **Developer** | Create, edit, or delete dashboards and folders |
-| **Viewer** | View dashboards and folders only |
+Search by dashboard or folder name. Switch to **Folders** to group dashboards by folder, or to **List** to see them all in one list.
-## Dashboard Folders
+To move, share, or delete a dashboard, open its more options (⋯) menu and click **Move to folder**, **Share**, or **Delete**. See [Sharing a Dashboard](./dashboard-details/#sharing-a-dashboard).
-Folders help you organize related dashboards in one place, making it easier to navigate and manage dashboards across teams or services.
+### Tag dashboards
-1. Click **Create Folder** at the top of the Dashboards screen.
+Click a dashboard's **Tags** cell to add a tag or create a new one. A tag is saved exactly as you type it. A dashboard can't carry the same tag twice in different cases, so if it already has `Prod`, adding `prod` keeps `Prod`.
-
+To show only dashboards with certain tags, click **Tags** in the toolbar and pick one or more. A dashboard must carry every tag you pick. The filter ignores case and lists each tag once, under the spelling first used in the workspace.
-2. Enter a **Folder Name** and an optional **Description** , then click **Create**.
+[Dashboard links](./adding-links-to-dashboards/) match a tag's exact spelling, case included, so keep one spelling for each tag.
-Switch to the folder view to see the new folder. Click the arrow next to it to expand and view the dashboards inside.
+## Organize dashboards in folders
-
+Group related dashboards in a folder, for example one folder per team or service. Folders are optional.
-:::info
-Creating a folder is not mandatory. Standalone dashboards do not need to be added to a folder.
-:::
+1. Click the arrow next to **Create Dashboard**, then click **Create folder**.
-***
+ 
-### Public Dashboards
+2. Enter a **Name** and an optional **Description**, then click **Create**.
-Sharing a dashboard publicly lets you give read-only access to people outside your workspace, for example, stakeholders or external teams, without requiring them to log in to KloudMate.
+
-Click **Public Dashboards** at the top of the Dashboards screen to view all dashboards you have shared publicly.
+To put a dashboard in a folder, open its more options (⋯) menu, click **Move to folder**, and pick the folder. Pick **Ungrouped** to take it out of a folder.
-
+To rename or remove a folder, use its more options (⋯) menu to **Edit folder** or **Delete folder**. Deleting a folder doesn't delete its dashboards. They move to **Ungrouped**.
-The list shows the dashboard name, who shared it, and whether the link is currently active.
+## Manage public dashboards
-From this screen you can:
+A public link gives read-only access to people outside your workspace, such as stakeholders or external teams, without a KloudMate login. To create one, see [Sharing a Dashboard](./dashboard-details/#sharing-a-dashboard).
-- **Copy link:** Copy the shareable URL to send to others.
-- **View:** Open the public dashboard to preview what others will see.
-- **Delete:** Revoke access. Deleting the link will make it stop working immediately.
+To manage your public links, click **Public Dashboards**. From there you can copy a link, open it to see what others see, or click **Delete** to revoke it. A deleted link stops working immediately.
-***
+
## Importing a Dashboard
-You can import a dashboard from its JSON definition, so you don't have to build it from scratch. For example, you can export a dashboard from one workspace and import it into another. To get the JSON of an existing dashboard, see [Sharing a Dashboard](./dashboard-details/#sharing-a-dashboard).
-
-1. Copy the dashboard's JSON definition.
+Import a dashboard from its JSON to copy it from one workspace to another, or to reuse a dashboard someone shared with you. To get the JSON of an existing dashboard, see [Sharing a Dashboard](./dashboard-details/#sharing-a-dashboard).
-2. In KloudMate, click the **Import** button at the top-right of the Dashboards screen, paste the copied JSON into the Import Dashboard dialog, and click **Submit**.
+1. Copy the dashboard's JSON.
+2. On the Dashboards page, click **Import**.
+3. Paste the JSON and click **Submit**.

-The dashboard will appear in your Dashboards list, ready to open and use with your data.
+To create, update, or delete dashboards from a script instead, or to read the JSON format, see [Dashboard JSON and API](./dashboard-json-and-api/).
+
+## User Permissions
+
+| **Role** | **Permissions** |
+| ------------- | ---------------------------------------------- |
+| **Admin** | Create, edit, or delete dashboards and folders. Turn a public link on or off. |
+| **Developer** | Create, edit, or delete dashboards and folders |
+| **Viewer** | View dashboards and folders only |
diff --git a/src/content/docs/docs/visualize-data/dashboards/managing-dashboards.mdx b/src/content/docs/docs/visualize-data/dashboards/managing-dashboards.mdx
index 100f6132..8b10d847 100644
--- a/src/content/docs/docs/visualize-data/dashboards/managing-dashboards.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/managing-dashboards.mdx
@@ -32,43 +32,12 @@ Click the **Settings** icon in the toolbar while in edit mode to open the Dashbo
- **Name:** Update the dashboard name.
- **Description:** Add or edit a description.
- **Add to Folder:** Move the dashboard into a folder to keep it organized with related dashboards.
-- **Links:** Add external links that appear as quick-access buttons on the dashboard (e.g., a link to a related service’s traces page). Click **Add Link** to add one.
+- **Links:** Add external links that appear as quick-access buttons on the dashboard (for example, a link to a related service’s traces page). Click **Add Link** to add one.
- **Tags:** Add tags to make the dashboard easier to search and categorize.
-- **Default AWS Region:** Set the default AWS region for the dashboard.
- **Delete Dashboard:** Permanently delete the dashboard.
Click **Save** to apply changes or **Cancel** to discard them.
### Variables tab
-You can add and manage variables in your dashboards. Variables are placeholders for values that help you create dynamic dashboards by avoiding hard-coded values within queries.
-
-
-1. Click the **Variables** tab in Dashboard Settings.
-
-2. Enter a **Name** , **Label** , and **Description** for the variable.
-
-3. Select the **Variable Type**:
-
-- **Query:** Dynamically populates values based on a query. When selected, an additional Query Type dropdown appears. Select the appropriate query type from the available options.
-- **Constant:** Sets a fixed value that remains unchanged across the dashboard.
-
-4. Click **Save**.
-
-Once the variable has been added, you can use it by selecting the created variable in the panel query box and saving the new query.
-
-### Variable values from attribute values, filtered by metric
-
-Populating a variable from OTel attribute values adds these fields:
-
-- **OTel Dataset:** Choose the dataset (e.g., Metrics) to pull attribute values from.
-- **OTel Attribute Key:** Choose the attribute whose values populate the variable, such as `host_name`.
-- **Metric (optional):** Reads the attribute off this metric's series, so a label can come from a metric that carries it even when the panels chart a different one. Leave empty to look across every metric. The dropdown lists any existing template variables alongside the available metrics with their type (Gauge, Sum, and so on).
-- **Filters:** Click **Add filter** to narrow the values further by other attributes.
-- **Regex (optional):** Enter a regular expression, such as `/^prod-(.*)/`, to match only values that fit the pattern.
-
-
-
-Turn on **Multi Values** to let viewers select more than one value at once, and **Show All option** to add an **All** choice to the variable dropdown.
-
-The **Preview of values** list updates as you adjust these fields, showing exactly what viewers will see in the variable dropdown.
+Use the **Variables** tab to add variables, such as a service or an AWS account, that viewers can switch from a dropdown on the dashboard. See [Dashboard Variables](../dashboard-variables/).
diff --git a/src/content/docs/docs/visualize-data/dashboards/managing-panels.mdx b/src/content/docs/docs/visualize-data/dashboards/managing-panels.mdx
index 88b357d6..249dd90c 100644
--- a/src/content/docs/docs/visualize-data/dashboards/managing-panels.mdx
+++ b/src/content/docs/docs/visualize-data/dashboards/managing-panels.mdx
@@ -15,6 +15,8 @@ In view mode, click the more options (⋯) icon on any panel to access:
- **View:** Opens the panel in a focused full view for a closer look at the data.
- **Edit:** Opens the panel editor to modify the query, visualization, or settings.
+- **Inspect:** Shows the data and JSON behind the panel. See [Inspect a panel](#inspect-a-panel).
+- **Create alert:** Opens a new alert rule built from the panel's query. See [Create an alert from a panel](#create-an-alert-from-a-panel).
### Edit Mode
@@ -23,9 +25,30 @@ In view mode, click the more options (⋯) icon on any panel to access:
In edit mode, click the more options (⋯) icon on any panel to access:
- **Edit:** Opens the panel editor to modify the query, visualization, or settings.
+- **Inspect:** Shows the data and JSON behind the panel.
+- **Create alert:** Opens a new alert rule built from the panel's query.
- **Duplicate:** Creates a copy of the panel on the same dashboard. Useful when you need a similar panel with minor query differences.
- **Delete:** Removes the panel from the dashboard.
+### Inspect a panel
+
+**Inspect** opens the data behind a panel, which helps when a panel draws something you don't expect. It's also in the panel editor's header. The tabs are:
+
+- **Data frames:** The query response as it arrived, before anything was hidden or reshaped.
+- **Panel data:** What the panel draws: the data after hidden queries and [transformations](../panel-options/transformations/), with the time window and the query state.
+- **Panel JSON:** The panel's definition, which is what saving the panel writes. See [Dashboard JSON and API](../dashboard-json-and-api/).
+- **Query:** The query nodes as they were sent, with variables replaced by their values.
+
+Use the copy action to copy the tab's contents.
+
+### Create an alert from a panel
+
+Click **Create alert** in the panel menu to open the alert editor with the panel's first query already filled in. Set a threshold before you save. **Create alert** appears only on a saved dashboard, and not on a public dashboard. See [Create an alert from a dashboard panel](../../../alerts/create-alerts/#create-an-alert-from-a-dashboard-panel).
+
+On a TimeSeries panel, you can also start from a value on the chart. Click a point to pin the tooltip, then click **Create alert at this value**. The new alert uses that value as its threshold. Click the close icon, click elsewhere, or scroll the page to unpin the tooltip.
+
+To mark an event on the chart instead, hold **Cmd** or **Ctrl** while you click. See [Annotations](../annotations/).
+
### Reposition a Panel

diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/_meta.json b/src/content/docs/docs/visualize-data/dashboards/panel-options/_meta.json
new file mode 100644
index 00000000..76d19451
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/_meta.json
@@ -0,0 +1,5 @@
+{
+ "label": "Panel Options",
+ "order": 4.5,
+ "collapsed": true
+}
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/colors-and-value-mappings.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/colors-and-value-mappings.mdx
new file mode 100644
index 00000000..39ed6d92
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/colors-and-value-mappings.mdx
@@ -0,0 +1,72 @@
+---
+title: "Colors and Value Mappings"
+description: "Pick a color scheme for a panel's series and values, and replace values with text and colors of your own."
+sidebar:
+ order: 4
+---
+
+A color scheme decides how a panel colors its series and values. A value mapping replaces a specific value with text and a color you choose, so a status of `0` can read **Down** in red. Both are on the **Options** tab of TimeSeries, Stats, Gauge, and Table panels.
+
+## Choose a color scheme
+
+**Color scheme** is under **Standard options**:
+
+| Option | What it does |
+|---|---|
+| **Single color** | Draws every value in one color, picked with the swatch. |
+| **From thresholds** | Colors each value by the [threshold](../thresholds/) step it reaches. On a TimeSeries panel, each line takes the color of its last value. |
+| **Default palette**, **Palette 2**, **Palette 3** | Gives each series or tile its own color from the palette. On a Table panel, each distinct value in a column gets its own color, which suits a **Chip** column of statuses. |
+| **Blues**, **Greens**, **Oranges**, **Purples**, **Reds**, **Viridis**, **Magma**, **Green-yellow-red** | Stats, Gauge, and Table panels only, under **By value**. Colors each value by where it sits between the lowest and highest value: a Stats panel uses its **Threshold range**, a Gauge its range, and a Table column its own values or its **Range**. **Green-yellow-red** runs from green at the low end to red at the high end, for values where high is bad, such as CPU or latency. A value with no range to place it in takes its threshold color. |
+
+On a Table panel, the column's **Cell type** under **Cell options** decides where the color lands: **Colored text**, **Colored background**, and **Chip** all take the column's color.
+
+When more than one source could color a value, the most specific one wins:
+
+1. A value mapping's color.
+2. **Single color**.
+3. A palette.
+4. A color ramp.
+5. Thresholds. These color a value when the field has no other color scheme.
+
+To give one series a fixed color while the rest keep the palette, add an [override](../overrides/#give-one-series-a-fixed-color) that sets **Color scheme** to **Single color** for that series.
+
+Heatmap panels color their cells with a separate **Color scheme** in the **Display** section. See [Heatmap panel](../../adding-a-panel/heatmap-panel/).
+
+### Series keep their color
+
+With a palette, a series gets its color from its name. It keeps the same color each time the panel refreshes, and when other series appear or drop out. Series on the same chart get colors that are easy to tell apart: if two would land on the same or a similar color, one of them moves to another. When a chart has more series than the palette has colors, colors start to repeat.
+
+## Map values to text and colors
+
+Use value mappings to show a meaningful label in place of a raw value, or to color specific values. For example, map `1` to **Up** in green and `0` to **Down** in red on a health check.
+
+1. In the **Value mappings** section, click **Edit**.
+2. In the **Edit value mappings** dialog, click **Add** for each mapping.
+3. Choose a **Type** and fill in its **Condition**.
+4. Enter the text to show in **Replace with (optional)**, pick a color, or both. Leave the text empty to keep the value and only color it. Click **Remove color** to show the text without a color.
+5. Click **Update**. A row without a complete condition is dropped.
+
+Mappings are checked from the top of the list, and the first one that matches applies.
+
+### Mapping types
+
+- **Value** matches one value. Matching is loose: typing `0` matches the number 0, `down` matches a text cell that reads `down`, and `true` or `false` matches a boolean.
+- **Range** matches numbers from **From** to **To**. Leave either end empty for an open range: **From** `500` with no **To** matches 500 and above. A range never matches text.
+- **No data** matches an empty value, or one that isn't a finite number, such as `NaN`. It never matches text.
+
+### Where mappings apply
+
+- **Table**: cells in number, text, and boolean columns. A mapping's color shows whatever the column's **Cell type** is, including chips.
+- **Stats** and **Gauge**: the tile's value.
+- **TimeSeries**: values in the tooltip, on the Y axis, and in the legend.
+
+Value mappings on the **Options** tab apply to every series or column. To map values for one series or column, add an [override](../overrides/) with the **Value mappings** property. The override's mappings replace the panel's mappings for that field.
+
+***
+
+## Related
+
+- [Thresholds](../thresholds/)
+- [Overrides](../overrides/)
+- [Table panel](../../adding-a-panel/table-panel/)
+- [Panel options](../)
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/data-links.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/data-links.mdx
new file mode 100644
index 00000000..124f85c4
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/data-links.mdx
@@ -0,0 +1,98 @@
+---
+title: "Data Links"
+description: "Turn the values on a panel into links to runbooks, other dashboards, or any URL, filled in with the value's own details."
+sidebar:
+ order: 6
+---
+
+A data link turns a value on a panel into a link, with details of that value filled into the URL. Use one to open the runbook for the host a tile shows, or another dashboard filtered to the service in a table row. Data links are on TimeSeries, Stats, Gauge, and Table panels.
+
+For links in the dashboard header, see [Adding links to dashboards](../../adding-links-to-dashboards/).
+
+## Add a data link
+
+1. Edit the panel. On the **Options** tab, open **Data links & actions**.
+
+ 
+
+2. Under **Data links**, click **Add link**.
+3. Enter a **Title**. It can use the same variables as the URL, for example `Open ${__field.name}`.
+4. Enter the **URL**. Type `$` to open the list of [variables](#variables-you-can-use-in-the-url) and insert one.
+5. Turn on **Open in new tab** if the link should open in a new browser tab.
+6. Click **Save**.
+
+ 
+
+A link added on the **Options** tab appears on every series, column, or tile in the panel. To add a link to only some fields, such as one table column, add an [override](../overrides/) with the **Data links & actions** property.
+
+Some data sources put links on a field themselves (see [Links from the data source](#links-from-the-data-source)). On a field:
+
+- Links from the **Options** tab are added to the data source's links.
+- Links from an override rule are added to the **Options** tab links, and **replace** the data source's links on the fields the rule matches. Remove the rule's last link to bring the data source's links back.
+
+A link with the same title and URL appears once.
+
+## Variables you can use in the URL
+
+| Variable | Inserts |
+|---|---|
+| **Series name** (`${__series.name}`) | The series' name as the legend shows it, or the field name when there's no legend name. |
+| **Field name** (`${__field.name}`) | The name of the field. |
+| **Field Label:** `` (`${__field.labels[""]}`) | The value of that label on the field. The list has one entry per label key in the data. |
+| **Value numeric** (`${__value.numeric}`) | The raw number, before formatting. A tile that shows `0.13` links with `0.125`. |
+| **Value time** (`${__value.time}`) | The time of the value, in epoch milliseconds. On a Stats or Gauge tile, it's the time of the series' last point. In a table, it's the row's time, so it's empty when the table has no time column. |
+| **Dashboard variable:** `` | `var-=${}`, the variable's current selection as a query parameter. Use it to open another dashboard with the same selection. See [Dashboard variables](../../dashboard-variables/). |
+| **Time range** (`${__time_range}`) | The dashboard's time range and time zone as query parameters. For example, with Last 1 hour, `/logs?${__time_range}` becomes `/logs?timeRange=1h&tz=Asia%2FKolkata`. A fixed start and end is written as milliseconds, `timeRange=:`. |
+| **From** (`${__from}`), **To** (`${__to}`) | The start and end of the dashboard's time range, in epoch milliseconds. |
+| **Workspace ID** (`${__workspace_id}`) | The ID of the current workspace. |
+
+You can also type these by hand. They aren't in the `$` list:
+
+- `${__value.raw}` is the clicked value before formatting, such as the id in a table cell.
+- `${__data.fields.}` is another value from the same table row, including hidden columns.
+- `:kmql` writes a value as a [KMQL](../../../kmql/) value, quoted when needed, and a list as comma-separated values for `in ( )`. For example, `/logs?q=service.name = ${__field.labels["service.name"]:kmql}`.
+
+For example, this URL opens a runbook page for the host a value belongs to:
+
+```text
+https://runbooks.example.com/hosts/${__field.labels["host.name"]}
+```
+
+Every value inserted into the URL is URL-encoded, so a series named `checkout api` arrives as `checkout%20api`. Values in the title aren't encoded. To insert a value without encoding, add `:raw` inside the braces, for example `${__field.name:raw}`.
+
+A variable at the very start of the URL is inserted as it is, so it can supply the scheme and host, as in `${base}/status` or a `${__value.raw}` that holds a full URL. Values after it are still encoded, and the result still has to be one of the URLs below.
+
+## URLs a link can use
+
+A link's URL must be one of these:
+
+- An `http://` or `https://` address.
+- A `mailto:` address.
+- A path inside KloudMate that starts with a single `/`, such as the path of another dashboard copied from your browser's address bar.
+
+The link editor won't save any other URL, such as `example.com/status` with no scheme, `//example.com`, or a `javascript:` URL. A URL that starts with a variable, such as `${base}/status`, is checked when the panel draws the link. If the result isn't one of the forms above, the link doesn't appear on the panel.
+
+## Where links open
+
+- **TimeSeries**: click a point to pin the tooltip. It lists the data links of the series you clicked.
+- **Stats** and **Gauge**: click a tile to open a menu of its links.
+- **Table**: when a cell has one link, the cell's value is the link. When it has several, clicking the value opens a list of them. Set the column's **Cell type** to **Links** under **Cell options** to show the links in the cell itself. Empty cells don't get links.
+
+## Links from the data source
+
+A **Records** table of logs or traces comes with links on its id columns:
+
+- `id` opens the log in Log Explorer (**View log**).
+- `traceId` opens the trace (**View trace**).
+- `spanId` opens the trace with that span selected (**View span**).
+
+An empty id cell has no link. To replace these links on a column, add an override with **Data links & actions** on that column. Links on the **Options** tab are added beside them.
+
+***
+
+## Related
+
+- [Overrides](../overrides/)
+- [Dashboard variables](../../dashboard-variables/)
+- [Adding links to dashboards](../../adding-links-to-dashboards/)
+- [Panel options](../)
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/format-and-units.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/format-and-units.mdx
new file mode 100644
index 00000000..ea39cc40
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/format-and-units.mdx
@@ -0,0 +1,77 @@
+---
+title: "Format Values and Units"
+description: "Choose the unit, number style, decimals, multiplier, and affixes a panel uses to write its values."
+sidebar:
+ order: 2
+---
+
+Use **Format** to tell a panel what its values are and how to write them, so a byte count reads in megabytes instead of as a seven-digit number. **Format** is under **Standard options** on the **Options** tab of every panel type that draws values. Histogram and Heatmap panels have [**Bucket format**](#bucket-format-on-histogram-and-heatmap-panels) instead.
+
+**Format** applies to every series or column in the panel. To give one series or column its own unit, add an [override](../overrides/) with the **Format** property. On a TimeSeries chart, each Y axis is written in the unit of the series on it.
+
+## The metric's unit is used by default
+
+A new panel doesn't set a unit. It uses the unit the metric declares, so a metric reported in bytes is written in bytes and a metric reported in seconds is written as a duration. Picking a metric in the query doesn't change **Format**, so you only need to set **Unit** when the data doesn't declare one or you want a different one.
+
+When neither the data nor the panel sets a unit or a **Display** style, the panel type decides how a number is written:
+
+- A table cell shows the plain digits, for example `90331`.
+- A chart axis shows the number compactly, for example `50k`.
+
+Set **Display** if you want the same style in both.
+
+## Unit
+
+**Unit** says what the values are. **Auto** uses the unit the data declares. In an override, **Auto** keeps the unit set on the **Options** tab. To write values with no unit, even when the data declares one, pick **Dimensionless**.
+
+| Group | Units |
+|---|---|
+| General | **Auto**, **Dimensionless** |
+| Data | **Bytes**, **Bits** |
+| Data rate | **Bytes/sec**, **Bits/sec** |
+| Time | **Nanoseconds**, **Microseconds**, **Milliseconds**, **Seconds** |
+| Proportion | **Percent (0-100)**, **Percent (0.0-1.0)** |
+| Throughput | **Requests/sec**, **Operations/sec**, **Events/sec** |
+
+Pick the unit the values arrive in, not the one you want to read. For example, if a metric reports latency in seconds, choose **Seconds**, and the panel writes each value as a duration. Likewise, a ratio between 0 and 1 takes **Percent (0.0-1.0)**, and a value already between 0 and 100 takes **Percent (0-100)**.
+
+## Display
+
+**Display** says how the number is written:
+
+| Group | Options |
+|---|---|
+| Automatic | **Auto** |
+| Number | **Short, 1.2M**, **Full, 1,234,567**, **Unformatted, 1234567**, **Currency (USD)** |
+| Size | **Binary prefixes, KiB and MiB** |
+| Date & time | **Date & time**, **Date & time (UTC)**, **Date**, **Time**, **Relative (ago)** |
+
+A unit that scales, such as bytes or a duration, is written in its own terms, so **Short** and **Full** mostly affect plain numbers. **Unformatted** always writes the digits exactly as they are.
+
+Use the **Date & time** options for a value that holds a timestamp, such as a table column of epoch times. **Relative (ago)** writes it as the time elapsed since then.
+
+### Binary prefixes for bytes and bits
+
+**Bytes** and **Bits** step up in multiples of 1,000 by default. To step up in multiples of 1,024 instead (KiB, MiB, GiB), keep **Unit** set to **Bytes** or **Bits** and set **Display** to **Binary prefixes, KiB and MiB**. This option changes how the unit is written; it doesn't replace the unit.
+
+## Decimals, multiplier, prefix, and suffix
+
+- **Decimals** fixes the number of decimal places. Leave it empty to trim trailing zeros.
+- **Multiplier** scales every value before it's written. Leave it empty for no scaling. For example, a **Multiplier** of `60` with a **Suffix** of `/min` turns a per-second rate into a per-minute rate.
+- **Prefix** adds text before the value, for example `~`.
+- **Suffix** adds text after the value, for example `/s`.
+
+## Bucket format on Histogram and Heatmap panels
+
+Histogram and Heatmap panels have **Bucket format** in place of **Format**. It has the same fields, and it formats the bucket boundaries. The counts in each bucket stay plain numbers.
+
+Bucket boundaries don't carry the metric's unit, so set **Unit** yourself. For example, a latency histogram measured in milliseconds needs **Unit** set to **Milliseconds** for its buckets to read as durations.
+
+***
+
+## Related
+
+- [Panel options](../)
+- [Overrides](../overrides/)
+- [Thresholds](../thresholds/)
+- [Colors and value mappings](../colors-and-value-mappings/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-extract-fields.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-extract-fields.svg
new file mode 100644
index 00000000..d5bc8989
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-extract-fields.svg
@@ -0,0 +1,57 @@
+
+
+Extract fields
+INPUT
+
+
+
+
+
+
+
+
+
+
+
+time
+
+attributes
+10:00
+{"method":"GET","status":200}
+10:01
+{"method":"POST","status":502}
+
+
+
+
+Extract fields
+Column: attributes
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+time
+
+method
+
+status
+10:00
+GET
+200
+10:01
+POST
+502
+
+Each key in the JSON column becomes its own column.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-filter-by-query.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-filter-by-query.svg
new file mode 100644
index 00000000..853426fb
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-filter-by-query.svg
@@ -0,0 +1,67 @@
+
+
+Filter by query
+
+QUERY A · REQUESTS
+
+
+
+
+
+
+
+
+
+
+
+time
+
+requests
+10:00
+1,240
+10:01
+1,310
+
+
+QUERY B · HELPER
+
+
+
+
+
+
+
+time
+total
+10:00
+5,510
+10:01
+5,620
+
+
+
+
+Filter by query
+Draw everything else · B
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+time
+
+requests
+10:00
+1,240
+10:01
+1,310
+
+Query B still runs, so an expression can use it, but the panel doesn't draw it.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-filter-rows.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-filter-rows.svg
new file mode 100644
index 00000000..cf43c78e
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-filter-rows.svg
@@ -0,0 +1,78 @@
+
+
+Filter rows
+INPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+host
+Last
+Max
+Mean
+web-1
+
+51
+
+51
+
+46.5
+
+web-2
+74
+92
+77.5
+db-1
+86
+86
+80.8
+db-2
+
+60
+
+64
+
+58.2
+
+
+
+
+
+Filter rows
+Max greater than 80
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+host
+Last
+Max
+Mean
+web-2
+74
+92
+77.5
+db-1
+86
+86
+80.8
+
+Rows that fail the condition are removed.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-group-by.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-group-by.svg
new file mode 100644
index 00000000..9b2d77cf
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-group-by.svg
@@ -0,0 +1,83 @@
+
+
+Group by
+INPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+k8s.namespace.name
+k8s.pod.name
+memory
+checkout
+checkout-7f9c
+412 MiB
+checkout
+checkout-b21d
+388 MiB
+payments
+payments-4k2p
+256 MiB
+payments
+payments-9xq1
+301 MiB
+search
+search-0
+1024 MiB
+
+
+
+
+Group by
+namespace · Total
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+k8s.namespace.name
+memory (Total)
+checkout
+800 MiB
+payments
+557 MiB
+search
+1024 MiB
+
+Rows with the same namespace collapse into one. k8s.pod.name isn't grouped, so it's dropped.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-join-by-field.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-join-by-field.svg
new file mode 100644
index 00000000..8caab1f2
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-join-by-field.svg
@@ -0,0 +1,92 @@
+
+
+Join by field
+
+QUERY A · REQUESTS
+
+
+
+
+
+
+
+
+
+
+
+
+
+service
+
+requests
+checkout
+1,240
+payments
+860
+search
+3,410
+
+
+QUERY B · ERRORS
+
+
+
+
+
+
+
+
+
+
+
+
+
+service
+
+errors
+checkout
+12
+payments
+31
+search
+4
+
+
+
+
+Join by field
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+service
+
+requests
+
+errors
+checkout
+1,240
+12
+payments
+860
+31
+search
+3,410
+4
+
+Rows from each query are matched on service, with one column per query.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-organize-fields.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-organize-fields.svg
new file mode 100644
index 00000000..b1efa74d
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-organize-fields.svg
@@ -0,0 +1,61 @@
+
+
+Organize fields
+INPUT
+
+
+
+
+
+
+
+
+
+
+
+
+service.namespace
+
+host.name
+cpu
+shop
+web-1
+51
+shop
+web-2
+74
+shop
+db-1
+86
+
+
+
+
+Organize fields
+move · hide · rename
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Host
+cpu
+web-1
+51
+web-2
+74
+db-1
+86
+
+host.name moves first and is renamed to Host. service.namespace is hidden.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-reduce.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-reduce.svg
new file mode 100644
index 00000000..2422a9dd
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-reduce.svg
@@ -0,0 +1,104 @@
+
+
+Reduce
+INPUT · CPU % PER HOST
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+time
+
+web-1
+
+web-2
+
+db-1
+10:00
+42
+61
+77
+10:01
+48
+83
+79
+10:02
+45
+92
+81
+10:03
+51
+74
+86
+
+
+
+
+Reduce
+Last · Max · Mean
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+host
+Last
+Max
+Mean
+web-1
+51
+51
+46.5
+web-2
+74
+92
+77.5
+db-1
+86
+86
+80.8
+
+Each series over time becomes one row, with a column per calculation.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-series-to-rows.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-series-to-rows.svg
new file mode 100644
index 00000000..3637afbc
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-series-to-rows.svg
@@ -0,0 +1,79 @@
+
+
+Series to rows
+INPUT · A COLUMN PER HOST
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+time
+
+web-1
+
+web-2
+10:00
+42
+61
+10:01
+48
+83
+
+
+
+
+Series to rows
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+time
+host
+cpu
+10:00
+web-1
+42
+10:00
+web-2
+61
+10:01
+web-1
+48
+10:01
+web-2
+83
+
+Each series becomes rows, with its label in a host column beside one value column.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-sort-by.svg b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-sort-by.svg
new file mode 100644
index 00000000..54cde4b3
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/images/transform-sort-by.svg
@@ -0,0 +1,66 @@
+
+
+Sort by
+INPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+host
+Max
+web-1
+51
+web-2
+92
+db-1
+86
+db-2
+64
+
+
+
+
+Sort by
+Max · Descending
+OUTPUT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+host
+Max
+web-2
+92
+db-1
+86
+db-2
+64
+web-1
+51
+
+Rows are reordered by one column. The busiest host comes first.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/index.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/index.mdx
new file mode 100644
index 00000000..e94d168f
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/index.mdx
@@ -0,0 +1,79 @@
+---
+title: "Panel Options"
+description: "Set how a panel formats, colors, and links its values, for the whole panel or for the fields a rule matches."
+sidebar:
+ order: 1
+ label: "Introduction"
+---
+
+Panel options control how a panel draws the values its queries return: the unit and number style, colors, thresholds, value mappings, and data links. You set them in the panel editor, in the settings pane on the right.
+
+## Where the settings live
+
+The settings pane has tabs for **Options**, **Transform**, and **Overrides**:
+
+- **Options** holds the settings for the whole panel. A setting here applies to every series, column, or tile the panel draws.
+- **Transform** reshapes the query results before the panel draws them, for example to join two queries into one table or to reorder table columns. See [Transformations](./transformations/).
+- **Overrides** holds rules that change settings for only the fields a rule matches, such as one series on a chart or one column in a table. See [Overrides](./overrides/).
+
+**Alerts List** and **Issues List** panels have only the **Options** tab, with the **Panel** and **Time range** sections.
+
+
+
+## Standard options
+
+Every panel type that draws values has a **Standard options** section on the **Options** tab. Some of its options only appear on the panel types that can use them:
+
+| Option | What it does | Panel types |
+|---|---|---|
+| **Display name** | Renames the series, column, or tile. Leave it empty to keep the name from the query. | All except Alerts List and Issues List |
+| **Range** | Sets the **Min** and **Max** a value is drawn against, such as the ends of a gauge's arc. | Stats, Gauge, Table |
+| **Format** | Sets the unit and how numbers are written. Histogram and Heatmap panels have **Bucket format** instead, which formats the bucket boundaries. | All except Alerts List and Issues List |
+| **Color scheme** | Picks how values or series are colored. | TimeSeries, Stats, Gauge, Table |
+| **No-data value** | Sets what a tile shows when its query returns no value, such as `0`. | Stats |
+
+A **Display name** set on the **Options** tab renames every series in the panel. To rename a single series or column, set **Display name** in an [override rule](./overrides/) instead.
+
+## Options apply to everything, overrides to what they match
+
+An option you set on the **Options** tab applies to every series, column, or tile in the panel. An override rule applies only to the fields it matches. When both set the same option for a field, the override wins.
+
+For example, set **Unit** to **Milliseconds** on the **Options** tab, then add an override that sets **Bytes** for the `heap_used` series. That series is written in bytes, and every other series keeps milliseconds.
+
+## The unit comes from the metric
+
+When you haven't set a unit, the panel uses the unit the metric declares. A metric reported in bytes is written in bytes and a metric reported in seconds is written as a duration, with no setup. Set **Unit** only when the data doesn't declare one or you want a different one. See [Format values and units](./format-and-units/).
+
+## Settings from the data source
+
+When the data source already sets something on a field, such as a unit the metric declares, the section on the **Options** tab or the property row in an override shows a **From data source** chip. Hover the chip to see which fields it applies to. A value you set replaces the data source's. Data links are the exception: links on the **Options** tab are added to the data source's links. See [Data links](./data-links/).
+
+## Sections on each panel type
+
+The **Options** tab shows these sections, in this order:
+
+| Panel type | Sections |
+|---|---|
+| TimeSeries | **Panel**, **Standard options** (Display name, Format, Color scheme), **Axes**, **Legend**, **Graph options**, **Tooltip**, **Axis placement**, **Threshold**, **Data links & actions**, **Value mappings**, **Annotations**, **Time range** |
+| Stats | **Panel**, **Standard options** (Display name, Range, Format, Color scheme), **Calculations**, **Rename**, **Stat options**, **Threshold**, **Data links & actions**, **Value mappings**, **Time range** |
+| Gauge | **Panel**, **Standard options** (Display name, Range, Format, Color scheme), **Calculations**, **Gauge**, **Threshold**, **Data links & actions**, **Value mappings**, **Time range** |
+| Table | **Panel**, **Standard options** (Display name, Range, Format, Color scheme), **Cell options**, **Column layout**, **Value mappings**, **Threshold**, **Data links & actions**, **Time range** |
+| Pie Chart | **Panel**, **Standard options** (Display name, Format), **Value options**, **Display**, **Legend**, **Time range** |
+| Bar Chart | **Panel**, **Standard options** (Display name, Format), **Display**, **Axes**, **Legend**, **Time range** |
+| Histogram | **Panel**, **Standard options** (Display name, Bucket format), **Axes**, **Legend**, **Time range** |
+| Heatmap | **Panel**, **Standard options** (Display name, Bucket format), **Display**, **Time range** |
+| Text | **Panel**, **Standard options** (Display name, Format), **Content** |
+| Alerts List, Issues List | **Panel**, **Time range** |
+
+The options specific to one panel type are covered on that panel's page under [Adding a Panel](../adding-a-panel/).
+
+***
+
+## Related
+
+- [Format values and units](./format-and-units/)
+- [Thresholds](./thresholds/)
+- [Colors and value mappings](./colors-and-value-mappings/)
+- [Overrides](./overrides/)
+- [Data links](./data-links/)
+- [Transformations](./transformations/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/overrides.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/overrides.mdx
new file mode 100644
index 00000000..d796458e
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/overrides.mdx
@@ -0,0 +1,94 @@
+---
+title: "Overrides"
+description: "Change a panel's options for one series, one table column, or every field that matches a rule."
+sidebar:
+ order: 5
+---
+
+An override changes panel options for only the fields it matches: one series on a chart, one column in a table, or every field from one query. Use overrides to put a single series on a right-hand axis, give a series a fixed color, or rename and resize a table column.
+
+The **Overrides** tab is in the panel editor on every panel type except Alerts List and Issues List.
+
+## Add an override rule
+
+1. Open the **Overrides** tab and click **Add Field Override**.
+2. Pick a matcher from the menu. The rule is added as **Override 1**, with the matcher under **Applies to**.
+3. Fill in the matcher's value, for example the name of the series.
+4. Click **Add Override Property**, choose the option to change, and set it.
+5. Repeat the previous step for each other option the rule should change.
+
+
+
+Run the query before you add a rule. The field names offered in **Values** and the label keys offered in **Label** come from what the panel currently draws.
+
+## Choose what a rule applies to
+
+| Matcher | What it matches |
+|---|---|
+| **Fields with names** | The fields you pick in **Values**, by their name or their display name. |
+| **Fields with name matching regex** | Every field whose name matches the regular expression in **Value**. |
+| **Fields with type** | Every field of the type you pick in **Value**: **Time**, **Number**, **Text**, **True or false**, **Enum**, **JSON**, or **Other**. |
+| **Fields with label** | Every field that carries the label you pick in **Label**, with the value you pick in **Value**. You can also type a value that isn't in the list. |
+| **Fields returned by query** | Every field from the query you pick in **Value**, such as `A` or `B`. |
+
+A regular expression is tested against the field's original name, not its **Display name**, so renaming a field doesn't change what the rule matches. The match is case-sensitive and can fall anywhere in the name: `latency` matches `http.server.latency`, and `Latency` doesn't. Add `^` and `$` to match the whole name. An empty or invalid expression matches nothing.
+
+## Properties a rule can set
+
+A rule can set the options from the **Options** tab that can differ from one field to the next:
+
+| Panel type | Properties |
+|---|---|
+| TimeSeries | **Display name**, **Format**, **Graph options**, **Color scheme**, **Axis placement**, **Threshold**, **Data links & actions**, **Value mappings** |
+| Stats | **Display name**, **No-data value**, **Range**, **Calculations**, **Format**, **Color scheme**, **Threshold**, **Data links & actions**, **Value mappings** |
+| Gauge | **Display name**, **Range**, **Calculations**, **Format**, **Color scheme**, **Threshold**, **Data links & actions**, **Value mappings** |
+| Table | **Display name**, **Range**, **Cell options**, **Column layout**, **Format**, **Color scheme**, **Value mappings**, **Threshold**, **Data links & actions** |
+| Pie Chart, Bar Chart, Text | **Display name**, **Format** |
+| Histogram, Heatmap | **Display name**, **Bucket format** |
+
+## How rules combine
+
+An override wins over the **Options** tab for the fields it matches. Rules are applied in order, starting with **Override 1**, so when two rules set the same property on a field, the later rule wins.
+
+Threshold steps and value mappings in a rule replace the panel's steps or mappings for that field instead of adding to them. Data links are the exception: links from a rule are added to the links from the **Options** tab, and the field shows both. A rule's links replace the data source's own links on the fields it matches. See [Data links](../data-links/).
+
+## Examples
+
+### Put one series on the right axis
+
+A TimeSeries panel that shows request rate and latency together is hard to read when both share one axis. Move latency to its own axis:
+
+1. Click **Add Field Override** and pick **Fields with names**.
+2. In **Values**, pick the latency series.
+3. Click **Add Override Property**, choose **Axis placement**, and select **Right**.
+
+The series moves to a Y axis on the right, which is written in that series' unit. To pin the ends of that axis, set **Min** and **Max** under **Y-Axis (right)** in the **Axes** section of the **Options** tab.
+
+### Give one series a fixed color
+
+To make an `errors` series always draw in red while the other series keep their palette colors:
+
+1. Click **Add Field Override** and pick **Fields with names**.
+2. In **Values**, pick the `errors` series.
+3. Click **Add Override Property**, choose **Color scheme**, select **Single color**, and pick red with the swatch.
+
+### Rename and resize a table column
+
+To show a `service.name` column as **Service** with a fixed width:
+
+1. Click **Add Field Override** and pick **Fields with names**.
+2. In **Values**, pick `service.name`.
+3. Click **Add Override Property**, choose **Display name**, and enter `Service`.
+4. Click **Add Override Property** again, choose **Column layout**, and set **Width** to `200`. Set **Align** to **Left**, **Center**, or **Right** if you need to.
+
+To reorder or hide table columns, use the [Organize fields](../transformations/#organize-fields) transformation.
+
+***
+
+## Related
+
+- [Panel options](../)
+- [Format values and units](../format-and-units/)
+- [Colors and value mappings](../colors-and-value-mappings/)
+- [Transformations](../transformations/)
+- [Table panel](../../adding-a-panel/table-panel/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/thresholds.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/thresholds.mdx
new file mode 100644
index 00000000..22bc4c86
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/thresholds.mdx
@@ -0,0 +1,76 @@
+---
+title: "Thresholds"
+description: "Color values by the range they fall in, and draw threshold lines on time series charts."
+sidebar:
+ order: 3
+---
+
+Thresholds color a value by the range it falls in. For example, a CPU tile can stay green below 70, turn amber at 70, and turn red at 90. Set them in the **Threshold** section on the **Options** tab of TimeSeries, Stats, Gauge, and Table panels.
+
+Thresholds on the **Options** tab apply to every series, column, or tile. To give one series or column its own thresholds, add an [override](../overrides/) with the **Threshold** property. The override's steps replace the panel's steps for that field; they aren't merged with them.
+
+## Add threshold steps
+
+1. In the **Threshold** section, click **Add Threshold** for each step you need.
+2. Set each step's value and pick its color.
+3. Click **Set default color** and pick the color for values below the lowest step.
+
+A step's value is the lowest value that takes its color, and a value takes the color of the highest step it reaches. With a green default color, an amber step at `70`, and a red step at `90`, the value `65` is green, `70` is amber, and `95` is red.
+
+## Absolute or relative steps
+
+**Threshold Mode** decides what a step's value means:
+
+- **Absolute** compares the value itself. A step at `90` fires at 90.
+- **Relative Percentage** compares where the value sits in its range, from `0` at the smallest value to `100` at the largest. A step at `80` fires for values in the top fifth of the range.
+
+On a Gauge panel, the range is the gauge's **Range** under **Standard options**. With no **Range**, the arc runs over the values the series reported, and a **Relative Percentage** step is measured along that same arc, so the gauge's color always matches the band it sits in.
+
+### Threshold range on Stats panels
+
+When any threshold on a Stats panel uses **Relative Percentage**, **Stat options** shows **Threshold range**. It decides which values a tile's percentage is measured against:
+
+- **Whole panel** measures each tile against the smallest and largest value of every series behind the panel's tiles: every point in the time range, plus each tile's value. This is the default.
+- **Per query** does the same with the series of the tile's own query. Use it when one panel shows two different measurements, such as bytes and a percentage, so one doesn't flatten the other.
+- **The field's own range** measures each tile against its own **Range** under **Standard options**. A tile without a **Range** takes the default color.
+
+A panel with one tile is measured within its own series. A tile with no series behind it, such as a lone **Single value**, takes the default color.
+
+## Where thresholds show
+
+### Stats and Gauge panels
+
+The tile is colored by the step its value reaches. On a Stats panel, **Color mode** under **Stat options** decides whether the color goes on the value or the tile background.
+
+Thresholds color tiles when **Color scheme** is unset or set to **From thresholds**. A **Single color** or palette scheme takes precedence over thresholds. See [Colors and value mappings](../colors-and-value-mappings/).
+
+### Table panels
+
+A cell shows its threshold color when the column's **Cell type** under **Cell options** is **Colored text** or **Colored background**.
+
+With **Colored background**, turn on **Apply to entire row** to color the whole row. The row takes the color of the highest step that any cell in it reaches. A column whose **Color scheme** is a palette doesn't color the row.
+
+### TimeSeries panels
+
+Set **Color scheme** to **From thresholds** to color each line by the step its last value reaches.
+
+To draw the steps on the chart as horizontal lines, set **Line Type** in the **Threshold** section:
+
+- **Line** draws a solid line at each step. This is the default.
+- **Lines (Dashed)** draws dashed lines.
+- **Off** draws no lines. The steps still color series that use **From thresholds**.
+
+Each step has a **Y-Axis** toggle, **Left** or **Right**, that sets which axis its line is drawn against. For example, put a `500` ms latency step on the right axis when latency is plotted there. A step on an axis with no series draws no line.
+
+With **Relative Percentage**, a step's line is drawn at that percentage of its axis. For example, a step at `10` on an axis from 0 to 72 draws at 7.2.
+
+Threshold lines come from the thresholds on the **Options** tab. A threshold set in an override colors the series it matches, but doesn't draw a line.
+
+***
+
+## Related
+
+- [Colors and value mappings](../colors-and-value-mappings/)
+- [Overrides](../overrides/)
+- [Panel options](../)
+- [Stats panel](../../adding-a-panel/stats-panel/)
diff --git a/src/content/docs/docs/visualize-data/dashboards/panel-options/transformations.mdx b/src/content/docs/docs/visualize-data/dashboards/panel-options/transformations.mdx
new file mode 100644
index 00000000..95b040d9
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/dashboards/panel-options/transformations.mdx
@@ -0,0 +1,134 @@
+---
+title: "Transformations"
+description: "Reshape query results before a panel draws them: join queries, reduce series to rows, filter, sort, and organize columns."
+sidebar:
+ order: 7
+---
+
+Transformations reshape the query results before the panel draws them. Use them to join two queries into one table, collapse each series over time into a row of numbers, or reorder and rename table columns. They're on the **Transform** tab of the panel editor, on every panel type except Alerts List and Issues List.
+
+## Add a transformation
+
+1. Run the query, so the steps that pick columns or queries have something to list.
+2. On the **Transform** tab, click **Add transformation** and pick a step.
+3. Fill in the step's fields. The panel preview updates as you edit.
+
+Steps run from top to bottom, and each step works on the output of the step above it. Drag a step by its handle to change the order. Turn a step off with its switch to skip it while keeping its settings, or click **Remove** to delete it. The steps are kept when you switch to another panel type that has a **Transform** tab.
+
+To see what a step changes, click **Inspect data** on it. The **Input** tab shows the data the step receives, and the **Output** tab shows what it passes on.
+
+## Several queries and expressions
+
+Every step except **Join by field** and **Filter by query** works on each query on its own. Expressions count as queries here. So, on a panel with queries `A` and `B`:
+
+- A column name matches in every query that has it. Renaming `AVG(cpu)` renames it in both queries.
+- **Filter rows** tests each query against the conditions on its own columns. A condition on `A` and one on `B` with **Match all** don't combine into one test.
+- **Series to rows** gives one table per query.
+
+To work across queries, add **Join by field** first. It puts the queries on one row per set of dimension values, with each column named for its query, such as `A:AVG(cpu)` and `B:AVG(mem)`. Steps after it can then rename only `B`'s column, filter on `A` and `B` together, or sort hosts by `B`.
+
+A query or expression that returns a value per group, such as average CPU per host at one point in time, returns one result per group. Steps handle that as one set: **Series to rows** makes one table of it, and **Sort by** orders the groups.
+
+## Organize fields
+
+Reorder, hide, and rename columns. The step lists one row per column. Drag a row to move the column, turn off its switch to hide it, and type a new name in its box to rename it.
+
+
+
+This is how you set the column order on a Table panel. For example, drag `host.name` to the top, hide `service.namespace`, and rename `host.name` to `Host`.
+
+A renamed column keeps its original name for [override](../overrides/) rules, so rules that match it by name still apply.
+
+Hiding the only column of a query or expression, such as `C` for an expression `C`, stops the panel drawing it. Hiding every column of every query does nothing.
+
+## Reduce
+
+Collapse each series over time into one row, with a column per calculation. Pick one or more **Calculations**: **Last**, **First**, **Min**, **Max**, **Mean**, **Total**, **Count**, **Difference**, or **Range**. The step does nothing until you pick at least one.
+
+
+
+For example, a query for CPU usage per host draws a line per host. On a Table panel, add **Reduce** with **Last**, **Max**, and **Mean** to get one row per host, with the host's labels as columns and a column each for **Last**, **Max**, and **Mean**. When the labels don't tell two series apart, a **Field** column holds each series' name.
+
+Only results with a time axis are reduced. Results that already have one value per series, and lists of logs or spans, pass through unchanged. A query that returned no points becomes a row with empty calculation cells.
+
+**Total** adds up the points in the series. On a rate series, that sum isn't a count of events.
+
+## Group by
+
+Collapse rows that share the same values, and reduce the numbers in each group. Pick the columns that identify a row in **Group by**. Then, for each number column, pick the calculations to apply. Leave a number column empty to drop it.
+
+
+
+For example, a table of pods with `k8s.namespace.name`, `k8s.pod.name`, and memory usage can be grouped by `k8s.namespace.name` with **Total** on memory usage, to show one row per namespace with the memory of all its pods. Text columns that aren't in **Group by**, such as `k8s.pod.name` here, are dropped.
+
+## Join by field
+
+Merge the queries on the dimensions they share, with one row per set of dimension values and a column for each query. The step has no fields.
+
+
+
+For example, query A returns the request count per service and query B returns the error count per service, both as a single value. **Join by field** gives one row per service, with the request count and the error count side by side.
+
+Each value column is named for its query, such as `A:COUNT` and `B:COUNT`. Use those names in the steps after the join.
+
+Queries that return values over time are left alone, because joining them would give a row per time bucket. Add a **Reduce** step above **Join by field** to join them.
+
+## Series to rows
+
+Turn one column per series into rows, with the series' labels as columns beside a single value column. A result over time keeps its time column, so a column per host becomes `time`, `host`, and a value column. Use it when you want to hide, rename, format, filter, or sort on a label as a column.
+
+
+
+**Value column name** names the value column. Leave it empty to use the measurement's name when every series shares it, such as `AVG(cpu)`, or the query's name, such as `A`, when the series names differ. A result whose columns have no labels doesn't change.
+
+Each query becomes its own table. To put several queries in one table, add **Join by field** instead.
+
+## Extract fields
+
+Open a JSON column into a column per key. Pick the JSON column in **Column**. Turn on **Keep the original column** to keep the JSON column beside the new ones.
+
+
+
+For example, pick the `attributes` column of a table of log records to get a column for each attribute.
+
+## Filter by query
+
+Draw only some of the panel's queries. Choose **Draw only these** to keep the queries you pick in **Queries**, or **Draw everything else** to hide them.
+
+
+
+For example, choose **Draw everything else** and query `B` to hide a query that only feeds an expression.
+
+With **Draw only these**, a query that returned nothing draws nothing. The panel doesn't fall back to the other queries. Lists of logs and spans are always drawn.
+
+## Filter rows
+
+Keep only the rows whose values pass a test. Each condition has a **Column**, a **Test**, and a **Value**. The tests are **equals**, **does not equal**, **greater than**, **at least**, **less than**, **at most**, **contains**, **does not contain**, **is empty**, and **is not empty**.
+
+Click **Add condition** to add more, then choose **Match all** to keep rows that pass every condition, or **Match any** to keep rows that pass at least one.
+
+
+
+For example, after a **Reduce** step, set **Column** to **Max**, **Test** to **greater than**, and **Value** to `80` to keep only the hosts that went above 80.
+
+A condition applies to the queries that have its column. To test values from two queries together, add **Join by field** above **Filter rows**.
+
+When a query returns a value per group, a group with no row that passes is removed, so the panel draws nothing for it. A query that returns a single result keeps its columns when no row passes.
+
+## Sort by
+
+Order the rows by one column. Pick the column in **Column**, then choose **Ascending** or **Descending**.
+
+
+
+For example, after a **Reduce** step, sort by **Max** in **Descending** order to put the busiest host first.
+
+Each query is sorted on its own. To order hosts by one query's values with the other queries beside them, add **Join by field** first.
+
+***
+
+## Related
+
+- [Overrides](../overrides/)
+- [Table panel](../../adding-a-panel/table-panel/)
+- [Panel options](../)
diff --git a/src/content/docs/docs/visualize-data/explore/index.mdx b/src/content/docs/docs/visualize-data/explore/index.mdx
index 7b2ec074..93592d45 100644
--- a/src/content/docs/docs/visualize-data/explore/index.mdx
+++ b/src/content/docs/docs/visualize-data/explore/index.mdx
@@ -11,7 +11,7 @@ import explorePanelType from './images/explore-panel-type.png';
import exploreGeneral from './images/explore-general.png';
import exploreOverrides from './images/explore-overrides.png';
-Explore is the ad hoc query workspace in KloudMate. Build and validate a query — metrics, logs, or traces — before you commit it to a dashboard.
+Explore is the ad hoc query workspace in KloudMate. Use it to build and check a query on metrics, logs, or traces before you add it to a dashboard. It uses the same query editor and panel settings as the dashboard panel editor.
This walkthrough focuses on metrics.
@@ -21,45 +21,53 @@ This walkthrough focuses on metrics.
Open the Explore section from the left-hand navigation menu. A new untitled panel opens immediately.
2. **Configure the Visualization**
- Use the **Panel Type** dropdown to choose how results are displayed: `TimeSeries`, `Stats`, `Table`, `Pie Chart`, `Bar Chart`, `Histogram`, `Logs List`, `Spans List`, `Alerts List`, `Issues List`, or `Text`.
+ Use the **Panel Type** dropdown to choose how results are displayed: **TimeSeries**, **Stats**, **Gauge**, **Table**, **Pie Chart**, **Bar Chart**, **Histogram**, **Heatmap**, **Alerts List**, **Issues List**, or **Text**.
-
+
Below it, the settings panel splits into tabs:
- - **General** controls panel appearance and behavior — axes, legend, graph options, thresholds.
- - **Overrides** applies a field-level customization to one series, by name, a matching regex, or a query.
+ - **Options** sets the panel's appearance, such as the unit, axes, legend, and thresholds.
+ - **Transform** reshapes the result before the panel draws it, for example to sort rows or join two queries.
+ - **Overrides** changes the display of specific fields only, matched by name, a regex, type, label, or query.
-
+ See [Panel Options](../dashboards/panel-options/) for every setting.
-
+
+
+
3. **Choose the Data Source and Signal Type**
- At the top of the query editor, select the data source and set the signal type to `Metrics`. Keep the query interval on `Auto` unless you need a specific rollup interval.
+ At the top of the query editor, select **KloudMate** as the data source and **Metrics** as the data set. Connected AWS accounts are listed by account name with **CloudWatch** under them, and HTTP endpoint connections with **HTTP endpoint**. See [Queries and Data Sources](../dashboards/adding-a-panel/queries-and-data-sources/) for each source.
+
+ Keep **Interval** on **Auto** unless you need a specific rollup interval. On panel types other than TimeSeries, **Returns** sets whether the query computes a value for each time step or a single value for the whole range.
+
+ For logs or traces, choose the **Logs** or **Traces** data set instead. The **Builder** tab computes values, such as an error count per service, and the **Records** tab lists the individual log records or spans in a **Table** panel. A **Builder** query on logs or traces also has **Interval**.
4. **Build the Query**
- In the Query Builder, select a metric name and choose an aggregation function such as `Avg`, `Sum`, `Min`, or `Max`.
+ On the **Builder** tab, the query is a row of labeled steps. Pick a metric under **Metric**, then choose a statistic such as **Avg**, **Sum**, or **Rate** under **Aggregate**.

- - Click **Customize aggregation** to access advanced temporal and spatial aggregation controls. See [Metrics Aggregations](./metrics-aggregations/) for details.
- - Use **Group by** to break down the metric by one or more attributes, such as `host_id` or `host_name`.
+ - Click **customize** under **Aggregate** to set **Within series** and **Across series** separately. See [Metrics Aggregations](./metrics-aggregations/) for details.
+ - Use **Group by** to break down the metric by one or more labels, such as `host_id` or `host_name`, or choose **Each series** to keep every series apart.

- - Use **Add filters** to narrow the results by attributes. Each filter needs a field, an operator, and a value, for example `service_name = checkout-api`.
+ - Use **Filter** to narrow the results. Each chip is a condition with a label, an operator, and a value, for example `service_name = checkout-api`. An **OR group** matches when any one of its conditions matches. See [KMQL](../kmql/) for every operator.

- - Use **Ranking** to control how series are ordered.
+ - Use **Rank** to keep only the top or bottom K series.

- - Use **Legend Format** to customize series labels.
- - Switch to the **PromQL** tab to write a raw query expression instead. Its search bar makes it easy to jump to a keyword in a long query.
+ - Click **display options** to set **Display**, the name each series shows.
+ - Switch to the **PromQL** tab to write the query in PromQL instead. Use its search bar to jump to a keyword in a long query. See [Write PromQL](../dashboards/adding-a-panel/queries-and-data-sources/#write-promql) for how the two tabs convert a query.
+ - Use **Copy as KMQL** and **Paste KMQL** in the query's menu to move a query between Explore, dashboards, and alert rules as text.
5. **Add Queries and Expressions**
- Use **Add Query** to compare multiple metric series in one panel.
+ Use **Add Query** to compare multiple metric series in one panel. If one query fails, its error shows under the header and the other queries still draw.
Use **Add Expression** to derive values from existing queries, including math, reduce, and condition expressions. See [Alert Expressions](../../alerts/expressions/) for the full expression syntax.
@@ -76,4 +84,5 @@ This walkthrough focuses on metrics.
## Related
- [Metrics Aggregations](./metrics-aggregations/)
+- [Queries and Data Sources](../dashboards/adding-a-panel/queries-and-data-sources/)
- [Create a Dashboard](../../visualize-data/dashboards/create-a-dashboard/)
diff --git a/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-across-series.svg b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-across-series.svg
new file mode 100644
index 00000000..18733929
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-across-series.svg
@@ -0,0 +1,82 @@
+
+
+Aggregation across series (spatial)
+INPUT · FOUR SERIES
+
+
+
+
+0
+
+5
+
+10
+
+10:00
+
+10:05
+
+10:10
+
+10:15
+
+
+
+8
+
+
+
+
+5
+
+
+
+
+3
+
+
+
+
+1
+
+
+checkout, us-east
+
+checkout, eu-west
+
+payments, us-east
+
+payments, eu-west
+
+
+
+Across series
+Sum
+OUTPUT · ONE SERIES
+
+
+
+
+0
+
+10
+
+20
+
+10:00
+
+10:05
+
+10:10
+
+10:15
+
+
+14
+
+17
+
+16
+total
+No Group by, so every series is added together. At 10:05: 8 + 5 + 3 + 1 = 17.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-group-by.svg b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-group-by.svg
new file mode 100644
index 00000000..2b5cb2df
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-group-by.svg
@@ -0,0 +1,92 @@
+
+
+Across series with Group by
+INPUT · FOUR SERIES
+
+
+
+
+0
+
+5
+
+10
+
+10:00
+
+10:05
+
+10:10
+
+10:15
+
+
+
+8
+
+
+
+
+5
+
+
+
+
+3
+
+
+
+
+1
+
+
+checkout, us-east
+
+checkout, eu-west
+
+payments, us-east
+
+payments, eu-west
+
+
+
+Across series
+Sum by service
+OUTPUT · ONE SERIES PER SERVICE
+
+
+
+
+0
+
+5
+
+10
+
+15
+
+10:00
+
+10:05
+
+10:10
+
+10:15
+
+
+11
+
+13
+
+14
+checkout
+
+
+3
+
+4
+
+2
+payments
+Group by service drops region. At 10:05, checkout is 8 + 5 = 13 and payments is 3 + 1 = 4.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-overview.svg b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-overview.svg
new file mode 100644
index 00000000..a199faf2
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-overview.svg
@@ -0,0 +1,135 @@
+
+
+Aggregation within series, then across series
+RAW POINTS EVERY MINUTE · ACTIVE_CONNECTIONS
+
+
+
+
+
+
+
+
+
+
+
+
+service
+region
+10:00
+10:05
+10:10
+
+checkout
+us-east
+6 7 7 8 7
+7 8 9 8 8
+8 9 8 7 8
+
+checkout
+eu-west
+3 4 5 4 4
+4 5 6 5 5
+5 6 7 6 6
+
+payments
+us-east
+1 2 3 2 2
+2 3 4 3 3
+3 2 1 2 2
+
+payments
+eu-west
+1 1 2 1 0
+0 1 1 2 1
+0 0 0 0 0
+
+
+
+
+Within series
+Avg · Interval 5m
+Combines the points in one series
+and one interval into one value.
+FOUR SERIES · ONE VALUE PER INTERVAL
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+service
+region
+10:00
+10:05
+10:10
+
+checkout
+us-east
+7
+8
+8
+
+checkout
+eu-west
+4
+5
+6
+
+payments
+us-east
+2
+3
+2
+
+payments
+eu-west
+1
+1
+0
+
+
+
+
+Across series
+Sum by service
+Adds up the series that share
+a service, in each interval.
+TWO SERIES · ONE PER SERVICE
+
+
+
+
+
+
+
+
+
+
+service
+10:00
+10:05
+10:10
+
+checkout
+11
+13
+14
+
+payments
+3
+4
+2
+
+Grouping by service drops region, so the four series become two.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-within-series.svg b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-within-series.svg
new file mode 100644
index 00000000..052fe8e4
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/images/aggregation-within-series.svg
@@ -0,0 +1,84 @@
+
+
+Aggregation within series (temporal)
+INPUT · CHECKOUT, US-EAST
+
+
+
+
+0
+
+5
+
+10
+
+10:00
+
+10:05
+
+10:10
+
+10:15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Within series
+Avg · Interval 5m
+OUTPUT · ONE POINT PER INTERVAL
+
+
+
+
+0
+
+5
+
+10
+
+10:00
+
+10:05
+
+10:10
+
+10:15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+7
+
+8
+
+8
+A point every minute. The five points from 10:00 to 10:05 add up to 35, so Avg gives 7.
+
\ No newline at end of file
diff --git a/src/content/docs/docs/visualize-data/explore/metrics-aggregations/index.mdx b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/index.mdx
index 6951da9c..0549472a 100644
--- a/src/content/docs/docs/visualize-data/explore/metrics-aggregations/index.mdx
+++ b/src/content/docs/docs/visualize-data/explore/metrics-aggregations/index.mdx
@@ -23,13 +23,42 @@ Refer to the [OpenTelemetry Data Model](https://opentelemetry.io/docs/specs/otel
Both Delta and Cumulative temporalities are supported across all applicable metric types.
-## Aggregation in Explore
+## How aggregation works
-On the Explore page, you can select a metric and apply a standard aggregation function (e.g., Avg, Sum, Min, Max) directly from the Query Builder. This covers most use cases out of the box.
+A metric query aggregates in two steps. **Within series** combines the points of each series into one value per interval. **Across series** then combines those series into the result the panel draws. These steps are also known as temporal and spatial aggregation.
-For more advanced scenarios, **Customize aggregation** provides fine-grained control over how data is aggregated within and across time series.
+A series is one combination of attribute values. For example, `active_connections` reported with a `service` attribute (`checkout` or `payments`) and a `region` attribute (`us-east` or `eu-west`) makes four series, one for each service in each region.
-When you open the advanced aggregation view, two aggregation dropdowns become available:
+
-- **Temporal Aggregation:** Aggregates data within the same time series across time buckets.
-- **Spatial Aggregation:** Aggregates data across multiple time series of the same metric. Use this to combine series from different label combinations into a single result.
+Choosing a single function such as **Avg** or **Sum** under **Aggregate** in the builder covers most queries. Click **customize** under **Aggregate** to pick the operation for each step yourself.
+
+## Aggregation within series
+
+Aggregation within series reduces the points of one series in each interval to a single value. **Interval** sets the length of each interval. For example, with a 5-minute interval and a point every minute, each interval holds five points, and **Avg** returns their mean.
+
+
+
+Each series is aggregated on its own, so a query that matches four series still has four series after this step.
+
+The right operation depends on the metric type. For a [gauge](./gauge/), use **Avg**, **Min**, **Max**, or **Last**. For a [sum](./sum/) such as a request counter, use **Rate** or **Increase**. **Instant rate** is offered only for cumulative counters.
+
+## Aggregation across series
+
+Aggregation across series combines the series in each interval. Without **Group by**, every matching series is combined into one. For example, **Sum** adds the four `active_connections` series into a single total.
+
+
+
+To skip this step, choose **Each series** in the **Group by** list. Every series is kept apart with all of its labels, so **Across series** and **Then** aren't available, while **Rank** still ranks the series one by one.
+
+### Keep one series per group
+
+**Group by** keeps one result for each value of the attributes you pick, and combines only the series that share that value. For example, grouping by `service` adds the `us-east` and `eu-west` series of each service together, so the four series become two. The `region` attribute isn't in the result.
+
+
+
+Grouping by both `service` and `region` keeps all four series, because each series already has its own combination of the two.
+
+To keep only the series whose value matches a condition between the two steps, use [Where value](../../dashboards/adding-a-panel/queries-and-data-sources/#filter-by-value).
+
+In [KMQL](../../kmql/), each step is written in order. The query in the diagrams above reads `active_connections | within avg | sum by service`.
diff --git a/src/content/docs/docs/visualize-data/index.mdx b/src/content/docs/docs/visualize-data/index.mdx
index 27e17167..f452b848 100644
--- a/src/content/docs/docs/visualize-data/index.mdx
+++ b/src/content/docs/docs/visualize-data/index.mdx
@@ -6,14 +6,14 @@ sidebar:
order: 0
---
-KloudMate provides powerful visualization tools to help you monitor, analyze, and extract insights from your telemetry data. Whether you need a persistent view of critical infrastructure KPIs or an ad-hoc workspace to troubleshoot an ongoing incident, KloudMate's visualization suite has you covered.
-
-This section covers the two primary ways to visualize your data:
+Dashboards and Explore turn your telemetry into charts and tables. Use a dashboard for a lasting view of the infrastructure and application metrics you check every day, and Explore for one-off queries while you troubleshoot an incident.
## In This Section
- **[Dashboards](./dashboards/)**
- Build persistent, customizable views of your most important metrics. Dashboards allow you to combine multiple visualization panels—such as time series charts, bar charts, lists, and statistical summaries—into a single pane of glass. You can create them from scratch or use pre-built templates for common use cases like Kubernetes or database monitoring.
+ Build lasting views of your most important metrics. A dashboard combines panels, such as time series charts, bar charts, lists, and stats, on one page. You can create one from scratch or start from a template for common setups like Kubernetes or database monitoring.
+
+ To build panels, see [Adding a Panel](./dashboards/adding-a-panel/), [Queries and Data Sources](./dashboards/adding-a-panel/queries-and-data-sources/), and [Panel Options](./dashboards/panel-options/). To work with whole dashboards, see [Annotations](./dashboards/annotations/), [Dashboard variables](./dashboards/dashboard-variables/), and [Dashboard JSON and API](./dashboards/dashboard-json-and-api/).
- **[Explore](./explore/)**
- Use the Explore workspace for ad-hoc querying and validation. Explore allows you to query metrics, logs, and traces on the fly, apply complex aggregations, and derive insights before optionally saving those queries directly into a persistent Dashboard panel.
+ Query metrics, logs, and traces on the fly, try different aggregations, and check the result before you save the query as a dashboard panel.
diff --git a/src/content/docs/docs/visualize-data/kmql.mdx b/src/content/docs/docs/visualize-data/kmql.mdx
new file mode 100644
index 00000000..9e45dd43
--- /dev/null
+++ b/src/content/docs/docs/visualize-data/kmql.mdx
@@ -0,0 +1,263 @@
+---
+title: "KMQL"
+description: "Reference for KMQL, the text language for filtering and aggregating metrics, logs, and traces in KloudMate."
+sidebar:
+ order: 3
+---
+
+KMQL is the text form of a KloudMate query for metrics, logs, and traces. Use it to filter in the Log Explorer search, or write a full query with aggregations, ranking, and sorting and paste it into any query editor. For example, this query finds error logs that mention `timeout`, counts them per service, and keeps the five services with the most errors:
+
+```text
+severity = ERROR "timeout" (k8s.namespace.name = default or has exception.type)
+ | count by serviceName
+ | top 5
+```
+
+## Where you write KMQL
+
+- **The Log Explorer search.** Each filter you add appears as a chip. Click `>` in the bar to edit the filter as KMQL text.
+- **The trace search bar,** where each filter you add appears as a chip.
+- **The Filter step of the query builder,** in dashboard panels, Explore, and alert rules. It uses the same chips, and `>` shows the text.
+- **Copy as KMQL** and **Paste KMQL** in a query's menu. These carry the full query, stages included, so you can move a query between panels, Explore, and alert rules. Pasting keeps the metric's type and unit.
+
+The search bars and the Filter step take filters only. A `|` there is an error.
+
+If the text doesn't parse, you see the reason, and the query doesn't run. Pasted KMQL that doesn't parse changes nothing.
+
+## KMQL in links and page addresses
+
+Log Explorer, Traces, and RUM keep the current search in the `q` URL parameter as KMQL, so a copied address opens the same search. The trace group drawer keeps its search in `group_q`. If `q` doesn't parse, the page shows the reason and runs nothing.
+
+Old Logs links that use `filter=`, `filter[]=`, or `query=` aren't read, and the page opens without that filter. Old Traces and RUM links that carry `filters=` still open, and the address switches to `q` on your next change.
+
+When a filter can't be written as KMQL, such as `in` with no values, no link to Logs or Traces is offered. For example, clicking a Kubernetes value with such a filter tells you it has no Logs link.
+
+To build a KMQL search into a panel's data link, use the `:kmql` format. See [Data links](../dashboards/panel-options/data-links/).
+
+## Filters
+
+A filter is a field, an operator, and a value: `severity = ERROR`.
+
+| Operator | Matches records where the field | Example |
+|---|---|---|
+| `=` | equals the value | `severity = ERROR` |
+| `!=` | doesn't equal the value | `k8s.namespace.name != kube-system` |
+| `>` `<` `>=` `<=` | is greater or less than the value | `duration > 1s` |
+| `in ( )` | equals any value in the list | `http.status_code in (500, 502, 503)` |
+| `not in ( )` | equals none of the values | `kind not in (commit, rollback)` |
+| `contains` | contains the text | `body contains "connection refused"` |
+| `not contains` | doesn't contain the text | `body not contains healthcheck` |
+| `startswith` | starts with the text | `http.route startswith /api/` |
+| `matches` | matches the regular expression | `http.route matches "/api/v[0-9]+/.*"` |
+| `not matches` | doesn't match the regular expression | `host not matches "10\.0\..*"` |
+| `has field` | is present | `has exception.type` |
+| `missing field` | isn't present | `missing retries` |
+
+`not` only goes before `in`, `contains`, and `matches`. To exclude a single value, use `!=`. To exclude values that start with some text, use `not matches` with `.*` after the text, and start with `(?i)` to ignore case as `startswith` does: `http.route not matches "(?i)/internal/.*"`. KMQL has no "ends with" operator, so put `.*` before the text instead: `http.route matches ".*/health"`.
+
+### Case and regular expressions
+
+`=`, `!=`, and `in` compare the whole value and match case exactly, so `severity = error` doesn't find `ERROR`. `contains` and `startswith` ignore case. They also read the text literally, so `%` and `_` have no special meaning.
+
+`matches` takes an [RE2](https://github.com/google/re2/wiki/Syntax) regular expression, and the expression must match the whole value. For example, `http.route matches "api"` doesn't match `/api/v1`, while `http.route matches ".*api.*"` does. `matches` is case-sensitive, so start the expression with `(?i)` to ignore case: `host matches "(?i)web-.*"`. A `(` or `)` without its pair is an error, so write a literal parenthesis as `\(` or `\)`.
+
+### Records without the field
+
+A record that doesn't have the field never matches a test of its value, such as `=`, `in`, `<`, `contains`, or `matches`. For example, `retries < 5` and `retries = 0` both skip records that have no `retries` attribute.
+
+The negative operators, `!=`, `not in`, `not contains`, and `not matches`, do match a record without the field. For example, `k8s.namespace.name != kube-system` also finds records that have no `k8s.namespace.name`. To keep only records that have the field, add `has`:
+
+```text
+has k8s.namespace.name k8s.namespace.name != kube-system
+```
+
+A missing text attribute counts as empty, so `x = ""` finds records where `x` has no value, and `x != ""` finds records where it has one.
+
+### Combine filters
+
+Filters separated by a space or by `and` must all match. Use `or` for alternatives and parentheses to group them:
+
+```text
+severity = ERROR (k8s.namespace.name = default or has exception.type)
+```
+
+`and` binds before `or`, so `a = 1 and b = 2 or c = 3` means `(a = 1 and b = 2) or c = 3`. Keywords work in any case: `AND`, `Or`, and `count BY` all read the same.
+
+### Search free text
+
+A term in double quotes with no field searches every text attribute of the record and ignores case. This finds error logs that mention `timeout` anywhere:
+
+```text
+severity = ERROR "timeout"
+```
+
+Inside the quotes, `*` matches any run of characters, so `"conn*refused"` finds both `connection refused` and `conn refused`.
+
+Free text works on logs and traces, not metrics. A bare word with no operator, such as `timeout` without quotes, is an error, because KMQL reads it as a field name and expects an operator after it.
+
+### Write values
+
+A value that is a single word, such as `ERROR`, `dev-ovh`, or `/api/`, needs no quotes. Put a value in double quotes when it has a space, a quote, an operator character, or a `$`: `body contains "connection refused"`. Single quotes are read the same way as double quotes.
+
+Inside quotes, write `\"` for a double quote and `\\` for a backslash. A backslash before any other character stays as written, so a regular expression such as `"api\.example"` works without extra escaping.
+
+An unquoted number is compared as a number, and a quoted one as text. For example, `code = "200"` compares `code` as text, while `retries > 3` compares `retries` as a number.
+
+On traces, write a `duration` value with a unit: `ns`, `us`, `ms`, `s`, `m`, or `h`. For example, `duration > 500ms` finds spans that took longer than 500 milliseconds. A plain number is read as nanoseconds, so `duration > 1000000000` is the same as `duration > 1s`. Other fields don't take a unit, so compare them with a plain number.
+
+When the value doesn't show that a field is numeric, wrap the field in `number( )`. This matters most with a dashboard variable, whose value is only known when the query runs:
+
+```text
+number(status.code) = "$code"
+```
+
+`number( )` also works in `has`, `by`, `fields`, and inside an aggregation, for example `has number(@coldStartDuration)`.
+
+To use a dashboard variable, put it in double quotes: `host_name = "$Hostname"`.
+
+### Field names
+
+Field names can contain letters, digits, `_`, `.`, `@`, `-`, `/`, and `:` without quotes, so `k8s.pod.ip` and `@type` work as written.
+
+Put any other field name in backticks. This includes names with spaces and names that are KMQL keywords (`and`, `or`, `not`, `in`, `by`, and `as`):
+
+```text
+`http status` = 200 `and` != x
+```
+
+Backticks only ever quote a field name. A value in backticks is an error, so write values in double quotes.
+
+### Match everything
+
+An empty search, or `*` on its own, matches every record.
+
+## Full queries
+
+A full query starts with filters and continues with stages, each after a `|`:
+
+```text
+ | |
+```
+
+Line breaks and the spaces around operators and pipes are optional, so `a=1|count` is a valid query. On logs and traces you can leave out the filters and start with a stage, such as `count by severity`.
+
+A `where` stage adds filters to the ones at the start: `a = 1 | where b = 2 | count` reads the same as `a = 1 b = 2 | count`.
+
+### Which stages work on which data
+
+| Stage | Metrics | Logs and traces |
+|---|---|---|
+| `where` (filters) | Yes | Yes |
+| `rate`, `irate`, `increase`, `within` | Yes | No |
+| `where value` | Yes | No |
+| Aggregation with `by` | Yes | Yes |
+| `each` | Yes | No |
+| `then` | Yes | No |
+| `top`, `bottom`, `limitk` | Yes | Yes |
+| `fields` | No | Yes, on lists |
+| `sort`, `limit` | No | Yes |
+
+Except for `where`, a query uses each stage at most once, and only one of `rate`, `irate`, `increase`, and `within`.
+
+## Metrics queries
+
+Start with the metric name, then add label filters:
+
+```text
+container_cpu_usage_seconds_total cluster = dev-ovh
+ | rate
+ | sum by namespace
+ | top 5
+```
+
+A metrics query needs an aggregation. `rate`, `irate`, and `increase` work without one, and average across series.
+
+| Stage | What it does | Example |
+|---|---|---|
+| `rate` | Per-second rate of a counter, within each series | `rate` |
+| `irate` | Instant per-second rate of a counter | `irate` |
+| `increase` | Increase of a counter over the interval | `increase` |
+| `within ` | Aggregates within each series, with `avg`, `min`, `max`, `sum`, `last`, or `count` | `within last` |
+| `where value ` | Keeps a series' value only when it passes the comparison | `where value > 4` |
+| ` by ` | Aggregates across series, per group | `avg by pod, namespace` |
+| `each` | Keeps every series apart, with no aggregation across series | `each` |
+| `then by ` | A second aggregation over the first one's groups | `then sum by namespace` |
+| `top N`, `bottom N`, `limitk N` | Keeps the N highest, the N lowest, or any N groups | `top 5` |
+
+Across series, use `avg`, `sum`, `min`, `max`, `count`, `median`, `last`, or a percentile (`p25`, `p50`, `p75`, `p90`, `p95`, `p99`). The metric is the value, so these take no field. To get several percentiles at once, list them: `p50, p95, p99 by http_route`.
+
+`then` takes `last`, `avg`, `min`, `max`, `sum`, `count`, or a percentile. It can't be combined with `top`, `bottom`, or `limitk`, and `each` takes neither `by` nor `then`.
+
+For example, this query takes the average memory of each pod, then adds the averages up per namespace:
+
+```text
+container_memory_working_set_bytes
+ | avg by pod, namespace
+ | then sum by namespace
+```
+
+This one counts the tasks currently in the `running` state:
+
+```text
+container_tasks_state state = running
+ | within last
+ | where value = 1
+ | count
+```
+
+## Logs and traces queries
+
+A logs or traces query either aggregates records or lists them.
+
+### Aggregate
+
+| Aggregation | Result |
+|---|---|
+| `count` | Number of records |
+| `count_distinct(field)` | Number of distinct values of the field |
+| `avg(field)`, `sum(field)`, `min(field)`, `max(field)`, `median(field)` | The statistic over the field |
+| `p25(field)` … `p99(field)` | Percentile of the field: `p25`, `p50`, `p75`, `p90`, `p95`, or `p99` |
+| `last(field)`, `any(field)` | The last value, or any one value, of the field |
+
+Separate several aggregations with commas, and add `by` to group them:
+
+```text
+status.code = 2
+ | p50(duration), p95(duration), p99(duration) by serviceName
+```
+
+Each aggregation can have its own `where` filters and an `as` name. Write `where` before `as`. A name can contain letters, digits, and `_`, must start with a letter or `_`, and can't be the name of an existing field. This query counts spans, errors, and 5xx responses, and takes the p95 duration, for each service:
+
+```text
+serviceName = checkout
+ | count as spans, count where status.code = 2 as errors, count where http.status_code >= 500 as http5xx, p95(duration) as p95 by serviceName
+```
+
+Two aggregations that give the same result, such as `count` twice, need a name on at least one of them.
+
+Rank the groups with `top N`, `bottom N`, or `limitk N`. To order the results instead, sort by a group field or by an aggregation's name:
+
+```text
+count as total by serviceName
+ | sort total desc
+```
+
+### List records
+
+A query with no aggregation lists records. Pick the columns with `fields`, order the rows with `sort`, and cap the count with `limit`:
+
+```text
+severity = ERROR "timeout"
+ | fields timestamp, serviceName, k8s.pod.name
+ | sort timestamp desc
+ | limit 50
+```
+
+`sort` is ascending unless you add `desc`, and it takes several fields separated by commas. `limit` also works after an aggregation.
+
+## Related
+
+- [Log Explorer](../../logs/log-explorer/)
+- [Queries and data sources](../dashboards/adding-a-panel/queries-and-data-sources/)
+- [Dashboard variables](../dashboards/dashboard-variables/)
+- [Explore](../explore/)