Repository navigation
Expand file tree
/
Copy pathagent.html
More file actions
831 lines (783 loc) · 82 KB
/
Copy pathagent.html
File metadata and controls
831 lines (783 loc) · 82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="/zoom.js"></script>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMjAwIj48ZyB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTAwIDEwMCkiPjxjaXJjbGUgY3g9IjEwMCIgY3k9IjEwMCIgcj0iODQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzhiOGJmMCIgc3Ryb2tlLXdpZHRoPSIxNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtZGFzaGFycmF5PSI0MjIgNTI4Ii8+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSI1NiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMjJkM2VlIiBzdHJva2Utd2lkdGg9IjE2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1kYXNoYXJyYXk9IjI2NCAzNTIiLz48Y2lyY2xlIGN4PSIxMDAiIGN5PSIxMDAiIHI9IjI4IiBmaWxsPSJub25lIiBzdHJva2U9IiNlODc5ZjkiIHN0cm9rZS13aWR0aD0iMTYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWRhc2hhcnJheT0iMTIzIDE3NiIvPjwvZz48L3N2Zz4=">
<title>Triage Agent Specification</title>
<style>
/* Same light, self-contained palette and type as whitepaper.html: bone paper,
violet mark, Georgia headings, system sans body, system mono. */
:root {
color-scheme: light;
--paper: #f7f2e9;
--surface: #fcf9f3;
--box: #eee7da;
--ink: #22201c;
--ink-2: #57534a;
--ink-3: #666153;
--rule: #e3dcce;
--rule-2: #d5ccba;
--mark: #6d28d9;
--code-bg: #f2ece1;
--hover: #eee7da;
--bg: var(--paper);
--muted: var(--ink-2);
--line: var(--rule);
--line-soft: var(--rule-2);
--accent: var(--mark);
--l2: #8a4310;
--l4: #1f5a96;
--edge: color-mix(in srgb, var(--ink-3) 55%, var(--paper));
--serif: Georgia, "Source Serif 4", serif;
--sans: ui-sans-serif, system-ui, -apple-system, sans-serif;
--mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, .wordmark { font-family: var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
code { font: 400 0.85em var(--mono); background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 3px; overflow-wrap: anywhere; -webkit-hyphens: none; hyphens: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.topbar { display: flex; align-items: center; gap: 0.6rem; padding: 1.15rem 1.75rem; border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.mark { width: 1.6rem; height: 1.6rem; flex: none; }
.wordmark { font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; }
.shell { display: grid; grid-template-columns: 19rem minmax(0, 1fr); align-items: start; max-width: 82rem; margin: 0 auto; }
.sidebar { position: sticky; top: 4.2rem; padding: 2.25rem 1.5rem 3rem 1.75rem; border-right: 1px solid var(--rule); max-height: calc(100vh / var(--z,1) - 4.2rem); overflow-y: auto; }
.sidebar h2 { font: 500 0.68rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.85rem 0.6rem; }
.sidebar h2.group { margin-top: 1.6rem; }
.sidebar nav { display: flex; flex-direction: column; }
.sidebar a { display: flex; align-items: baseline; gap: 0.7rem; padding: 0.5rem 0.6rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; line-height: 1.35; }
.sidebar a:hover, .sidebar a.on { background: var(--hover); }
.sidebar a.on .n { color: var(--mark); }
.sidebar .n { font: 400 0.78rem var(--mono); color: var(--ink-3); flex: none; width: 1.15rem; }
.sidebar .chev { margin-left: auto; color: var(--ink-3); flex: none; align-self: center; }
@media (max-width: 900px) {
.shell { grid-template-columns: 1fr; }
.sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--rule); padding: 1.5rem 1.25rem; }
.sidebar nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.sidebar .chev { display: none; }
main { padding: 1.75rem 1.25rem 5rem; }
}
main { padding: 2.25rem 3rem 7rem; max-width: 54rem; min-width: 0; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-2); margin: 0 0 1.6rem; }
h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 16px; }
.standfirst { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 0 0 8px; }
.standfirst strong { font-weight: 700; color: var(--ink); }
header { padding: 0 0 20px; }
section { padding-top: 2.75rem; scroll-margin-top: 5rem; }
section + section { margin-top: 1rem; }
.sechead { display: grid; grid-template-columns: 3rem 1fr; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 0.6rem; margin-bottom: 1.6rem; }
.ord { font: 400 0.85rem var(--mono); color: var(--mark); }
.sechead h2, h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
h3 { font: 700 18px/1.3 var(--sans); letter-spacing: -0.015em; text-wrap: balance; margin: 36px 0 12px; }
p { margin: 0 0 18px; }
ul { margin: 0 0 18px; padding-left: 1.4em; }
li { margin-bottom: 8px; }
strong { font-weight: 700; }
p, li, figcaption, .standfirst { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 640px) { p, li, figcaption, .standfirst { text-align: left; } }
.faq { border-bottom: 1px solid var(--rule); }
.faq summary { font: 700 16px/1.4 var(--sans); padding: 0.9rem 0; cursor: pointer; list-style-position: outside; }
.faq summary:hover { color: var(--mark); }
.faq[open] summary { padding-bottom: 0.5rem; }
figure { margin: 28px 0 24px; }
figure svg { width: 100%; height: auto; display: block; }
figcaption { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }
.figscroll { overflow-x: auto; }
.figscroll svg { min-width: 640px; }
.tablewrap { overflow-x: auto; margin: 26px 0; }
table { border-collapse: collapse; width: 100%; font: 400 14.5px/1.55 var(--sans); font-variant-numeric: tabular-nums; }
th { font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 22px 9px 0; border-bottom: 1px solid var(--line); vertical-align: bottom; }
td { padding: 11px 22px 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; overflow-wrap: break-word; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 1px solid var(--line); }
td.k { font: 400 0.85em var(--mono); color: var(--ink); white-space: nowrap; }
td.k code { font-size: inherit; }
.pill { font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.pill.hi { background: var(--mark); color: var(--surface); }
.pill.md { background: color-mix(in srgb, var(--mark) 12%, var(--surface)); color: var(--mark); }
.pill.lo { background: color-mix(in srgb, var(--l4) 12%, var(--surface)); color: var(--l4); }
.pill.ok { background: var(--box); color: var(--ink-2); }
pre { background: var(--code-bg); border: 1px solid var(--line-soft); border-radius: 6px; padding: 14px 18px; margin: 14px 0 26px; overflow-x: auto; font: 400 12.5px/1.65 var(--mono); }
pre code { background: none; padding: 0; font: inherit; white-space: pre; color: var(--ink); overflow-wrap: normal; }
pre .c { color: var(--ink-3); }
pre .k { color: var(--mark); }
pre .s { color: var(--ink-2); }
pre .n { color: var(--ink-2); font-weight: 500; }
footer { margin-top: 96px; padding-top: 24px; border-top: 1px solid var(--line); font: 400 12px/1.8 var(--mono); color: var(--muted); }
/* svg vocabulary, on the white paper's tokens */
.box { fill: var(--surface); stroke: var(--edge); stroke-width: 1; }
.box.hot { stroke: var(--mark); stroke-width: 1.6; }
.box.cool { stroke: var(--l4); stroke-width: 1.4; }
.box.ghost { fill: none; stroke: var(--edge); stroke-dasharray: 4 4; }
.box.warn { fill: color-mix(in srgb, var(--mark) 10%, var(--surface)); stroke: var(--mark); stroke-width: 1.4; }
.zone { fill: none; stroke: var(--rule); stroke-width: 1; }
.well { fill: var(--box); stroke: none; }
.bound { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 5; }
.e { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.e.a { stroke: var(--mark); stroke-width: 1.8; }
.e.b { stroke: var(--l4); stroke-width: 1.6; }
.e.d { stroke-dasharray: 5 4; }
.t { font: 600 13px var(--sans); fill: var(--ink); }
.ts { font: 400 11.5px var(--sans); fill: var(--ink-2); }
.tl { font: 400 11.5px var(--sans); fill: var(--ink-2); }
.m { font: 500 10.5px var(--mono); letter-spacing: 0.1em; fill: var(--ink-2); }
.mb { font: 500 10.5px var(--mono); letter-spacing: 0.1em; fill: var(--l4); }
.ma { font: 500 10.5px var(--mono); letter-spacing: 0.06em; fill: var(--mark); }
.mi { font: 400 11.5px var(--mono); fill: var(--ink); }
.gn { fill: var(--l2); stroke: var(--paper); stroke-width: 2; }
.gxn { fill: var(--rule-2); stroke: var(--paper); stroke-width: 2; }
.ge { stroke: var(--edge); stroke-width: 1.1; }
.gx { stroke: var(--edge); stroke-width: 1.1; stroke-dasharray: 3 3; }
.gd { stroke: var(--mark); stroke-width: 1.8; stroke-dasharray: 5 4; }
.gl { font: 500 12px var(--sans); fill: var(--ink-2); text-anchor: middle; }
.gl.gm { font: 400 10.5px var(--mono); fill: var(--ink-2); }
.c { text-anchor: middle; }
.r { text-anchor: end; }
/* hard-coded colours in the inline svg (markers, dotted frames) */
#aa path { fill: var(--mark); } #ab path { fill: var(--l4); }
#am path, #tm path { fill: var(--ink-2); }
svg rect[stroke="#736F65"] { stroke: var(--ink-3); } svg rect[stroke="#3F6478"] { stroke: var(--l4); }
</style>
</head>
<body>
<div class="topbar">
<svg class="mark" viewBox="0 0 200 200" role="img" aria-label="Triage"><g transform="rotate(-90 100 100)"><circle cx="100" cy="100" r="84" fill="none" stroke="#8b8bf0" stroke-width="16" stroke-linecap="round" stroke-dasharray="422 528"/><circle cx="100" cy="100" r="56" fill="none" stroke="#22d3ee" stroke-width="16" stroke-linecap="round" stroke-dasharray="264 352"/><circle cx="100" cy="100" r="28" fill="none" stroke="#e879f9" stroke-width="16" stroke-linecap="round" stroke-dasharray="123 176"/></g></svg>
<span class="wordmark">Triage Agent Specification</span>
</div>
<div class="shell">
<aside class="sidebar">
<h2>Specification</h2>
<nav>
<a href="#s1"><span class="n">01</span>Architecture<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s2"><span class="n">02</span>Scope and tenants<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s3"><span class="n">03</span>Objects and signals<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s4"><span class="n">04</span>Data flow and frames<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s5"><span class="n">05</span>Log samples<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s6"><span class="n">06</span>Connections and trust<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s7"><span class="n">07</span>RBAC<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s8"><span class="n">08</span>Topology and drift<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s9"><span class="n">09</span>Connectors<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s10"><span class="n">10</span>Configuration<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
</nav>
<h2 class="group">Notes</h2>
<nav>
<a href="#s11"><span class="n">11</span>OBI note<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
<a href="#s12"><span class="n">12</span>FAQ<svg class="chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg></a>
</nav>
</aside>
<main>
<header>
<p class="eyebrow">Specification · agent repository · v3.1.82 · 58b8139</p>
<h1>Triage Agent</h1>
<p class="standfirst">The <strong>collection and aggregation layer</strong> of Triage: an agent on <strong>Kubernetes</strong> clusters, <strong>Linux</strong> hosts and <strong>cloud provider connectors</strong>. The agent discovers <strong>virtual apps</strong> from workloads, measures them with <strong>eBPF</strong>, <strong>cgroup</strong> and <strong>logs-based metrics</strong> as <strong>USE</strong>, <strong>RED</strong>, <strong>SIG</strong> and <strong>LOG</strong> frameworks, and streams the result to the <strong>core</strong> over one <strong>outbound secure WebSocket (WSS)</strong>. It sends signals only; drift, issues and root cause are decided in the <strong>core</strong>.</p>
</header>
<figure class="figscroll">
<svg viewBox="0 -96 880 536" role="img" aria-label="Agent architecture: kernel and host sources feed three sensor roles on each node, which stream to sensorstream; push sends frames to the core.">
<defs>
<marker id="aa" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#9C4A26"/></marker>
<marker id="ab" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#3F6478"/></marker>
<marker id="am" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#736F65"/></marker>
</defs>
<text class="m" x="32" y="24">KERNEL AND HOST</text>
<text class="m" x="252" y="24">DAEMONSET · PER NODE</text>
<text class="m" x="472" y="24">CONTROLLER</text>
<text class="mb" x="692" y="24">CORE</text>
<line class="bound" x1="226" y1="36" x2="226" y2="332"/>
<line class="bound" x1="446" y1="36" x2="446" y2="332"/>
<rect x="4" y="6" width="652" height="426" rx="12" fill="none" stroke="#736F65" stroke-width="1.4" stroke-dasharray="1.5 4" stroke-linecap="round"/>
<rect x="664" y="6" width="212" height="426" rx="12" fill="none" stroke="#3F6478" stroke-width="1.4" stroke-dasharray="1.5 4" stroke-linecap="round"/>
<rect class="box" x="16" y="52" width="188" height="64" rx="8"/><text class="t" x="32" y="78">cgroup v2 and PSI</text><text class="ts" x="32" y="96">host files, read only</text>
<rect class="box" x="16" y="152" width="188" height="64" rx="8"/><text class="t" x="32" y="178">eBPF probes</text><text class="ts" x="32" y="196">uprobes, kprobes, socket filter</text>
<rect class="box" x="16" y="252" width="188" height="64" rx="8"/><text class="t" x="32" y="278">Container logs</text><text class="ts" x="32" y="296">/var/log/containers</text>
<rect class="box" x="236" y="52" width="188" height="64" rx="8"/><text class="t" x="252" y="78">resource metrics</text><text class="ts" x="252" y="96">USE · CPU, memory, PSI</text>
<rect class="box" x="236" y="152" width="188" height="64" rx="8"/><text class="t" x="252" y="178">OBI · traffic metrics</text><text class="ts" x="252" y="196">RED · SIG · L7/L4 topology</text>
<rect class="box" x="236" y="252" width="188" height="64" rx="8"/><text class="t" x="252" y="278">logs-based metrics</text><text class="ts" x="252" y="296">LOG · error and warn counts</text>
<rect class="box" x="456" y="52" width="188" height="64" rx="8"/><text class="t" x="472" y="78">sensorstream :9470</text><text class="ts" x="472" y="96">merged across replicas</text>
<rect class="box" x="456" y="152" width="188" height="64" rx="8"/><text class="t" x="472" y="178">Collectors</text><text class="ts" x="472" y="196">deltas, baseline gate</text>
<rect class="box hot" x="456" y="252" width="188" height="64" rx="8"/><text class="t" x="472" y="278">Per-tenant queues</text><text class="ts" x="472" y="296">push over WSS</text>
<rect class="box" x="16" y="352" width="408" height="64" rx="8"/><text class="t" x="32" y="378">Kubernetes API / Linux systemd</text><text class="ts" x="32" y="396">namespaces, workloads, pods, events · systemd units, journald</text>
<path class="e" d="M424 384H452" marker-end="url(#am)"/>
<rect class="box" x="456" y="352" width="188" height="64" rx="8"/><text class="t" x="472" y="378">Kubernetes watches</text><text class="ts" x="472" y="396">virtual apps, Warning events</text>
<rect class="box" x="676" y="52" width="188" height="164" rx="8"/><text class="t" x="692" y="78">Events API</text><text class="ts" x="692" y="96">HTTPS, bearer + X-Tenant</text><text class="tl" x="692" y="124">gcp-cost · gcp-alert</text><text class="tl" x="692" y="142">gcp-status · prometheus</text><text class="ts" x="692" y="170">429 when queue is full</text>
<path class="box ghost" d="M470 -32 A20 20 0 0 1 482 -64 A50 50 0 0 1 552 -84 A31 31 0 0 1 608 -64 A21 21 0 0 1 630 -32 Z"/><text class="t" x="551" y="-56" text-anchor="middle">Cloud providers</text><text class="ts" x="551" y="-40" text-anchor="middle">billing, alerts, health</text>
<rect class="box ghost" x="676" y="-88" width="188" height="56" rx="8"/><text class="t" x="692" y="-64">Connectors</text><text class="ts" x="692" y="-46">gcpevents · promevents · wiz</text>
<rect class="box" x="676" y="252" width="188" height="64" rx="8"/><text class="t" x="692" y="278">Event router</text><text class="ts" x="692" y="296">frames + events, per tenant</text>
<rect class="box" x="676" y="352" width="188" height="64" rx="8"/><text class="t" x="692" y="378">Event processing</text><text class="ts" x="692" y="396">classifies frames + events</text>
<g>
<path class="e" d="M204 84H232" marker-end="url(#am)"/>
<path class="e" d="M204 184H232" marker-end="url(#am)"/>
<path class="e" d="M204 284H232" marker-end="url(#am)"/>
<path class="e a" d="M424 84H452" marker-end="url(#aa)"/>
<path class="e a" d="M424 184H436"/>
<path class="e a" d="M424 284H436V84"/>
<path class="e a" d="M550 116V148" marker-end="url(#aa)"/>
<path class="e a" d="M550 216V248" marker-end="url(#aa)"/>
<path class="e a" d="M550 352V320" marker-end="url(#aa)"/>
<path class="e a" d="M644 276H672" marker-end="url(#aa)"/>
<path class="e b" d="M676 296H648" marker-end="url(#ab)"/>
<path class="e" d="M770 -32V48" marker-end="url(#am)"/>
<path class="e" d="M636 -50H672" marker-end="url(#am)"/>
<path class="e" d="M770 216V248" marker-end="url(#am)"/>
<path class="e" d="M770 316V348" marker-end="url(#am)"/>
</g>
<line x1="16" y1="-66" x2="40" y2="-66" class="e a"/><text class="tl" x="48" y="-62">Signal data (TLS 1.3, WSS)</text>
<line x1="228" y1="-66" x2="252" y2="-66" class="e b"/><text class="tl" x="260" y="-62">Snapshot request on graph load</text>
<line x1="16" y1="-38" x2="40" y2="-38" class="e"/><text class="tl" x="48" y="-34">Host reads, connector posts</text>
<rect x="228" y="-46" width="24" height="16" rx="4" class="box ghost"/><text class="tl" x="260" y="-34">Outside the agent</text>
</svg>
<figcaption>Figure 1. Components and boundaries.</figcaption>
</figure>
<!-- 01 -->
<section id="s1">
<div class="sechead"><span class="ord">01</span><h2>Architecture</h2></div>
<p>Data crosses three boundaries: from kernel and host files into the sensor roles, from the node into <code>sensorstream</code> over gRPC, and from the cluster to the core over a secure WebSocket (WSS) the agent opens. Nothing outside the cluster can open a connection into it.</p>
<p>The sensor roles send one OTLP snapshot per role every <code>--sensor-tick</code>, default 15 s. <code>sensorstream</code> keeps the latest per node and serves it to the collectors through <code>metricset.Source</code>. Collectors are <code>manager.Runnable</code>s that run only on the leader, and only the leader holds the connection to the core. The controller can run several replicas: every replica takes sensor streams and gossips what its own sensors send to the others over mutual TLS (headless Service <code><fullname>-peers</code>, port 9471, pinned to the same sensor certificate), keeping the newest snapshot per node. The leader therefore sees every node whichever replica a sensor connected to, and a newly elected leader already holds the state.</p>
<p>The agent is one container image, run in two shapes. The <strong>DaemonSet</strong> hosts the <strong>sensor roles</strong>; the <strong>controller Deployment</strong> hosts everything that talks to the <strong>Kubernetes API</strong> or the <strong>core</strong>. A namespace is observed only when it is annotated with a tenant or listed in <code>--target-namespaces</code>, and every frame leaves stamped with that tenant.</p>
<p>Collectors are off by default. Virtual apps and Kubernetes Warning events flow as soon as push mode is configured; RED, USE, log and topology collectors each need their own flag and the sensor stream.</p>
<p>Out of scope for the agent: comparing the observed topology with the declared graph, opening issues, and any model call. The core does those.</p>
<h3>High availability</h3>
<p>The controller runs as several replicas behind one leader. Leader election is on whenever <code>replicaCount</code> is above 1, through a Lease named <code>triage-agent</code> in the agent's namespace. Every replica serves the sensor stream and the OTLP receiver; only the leader runs the collectors and holds the connection to the core.</p>
<div class="tablewrap"><table>
<tr><th>Concern</th><th>Behaviour</th></tr>
<tr><td class="k">Intake</td><td>Sensors and OTLP senders reach any replica through the <code><fullname>-sensors</code> Service; losing a replica drops only the streams it held, which reconnect to another within the 1 to 30 s backoff</td></tr>
<tr><td class="k">Shared state</td><td>Replicas gossip every sensor snapshot and OTLP source over mutual TLS on 9471, newest wins, so a new leader already holds the latest data from every node and sender</td></tr>
<tr><td class="k">Failover</td><td>controller-runtime defaults: a 15 s lease, renewed every 10 s, retried every 2 s. The lease is not released on shutdown, so a new leader takes over when it expires: within about 15 s for a crash or a rollout alike</td></tr>
<tr><td class="k">Core link</td><td>The new leader opens the push connection with the same join identity, kept in <code>--join-secret</code>, so no new approval is needed, and resends each tenant's virtual-app snapshot</td></tr>
<tr><td class="k">Baselines</td><td>Held in the leader's memory and not gossiped. After a failover every service is cold until it has the minimum windows again; the cold floors keep reporting a clear breach in that time</td></tr>
<tr><td class="k">Disruptions</td><td>A PodDisruptionBudget with <code>maxUnavailable: 1</code> when replicas are above 1, so a drain takes one controller at a time</td></tr>
<tr><td class="k">Placement</td><td>No anti-affinity by default; set <code>affinity</code> to spread replicas across nodes or zones</td></tr>
</table></div>
<p>A single replica runs without leader election and without a PodDisruptionBudget; a restart is a gap in intake and frames until the pod is back.</p>
<h3>Linux host mode</h3>
<p>With <code>--mode=host</code> the agent runs as one systemd service on a VM or bare-metal host, with no Kubernetes API. The host reports the same frames as a cluster, so the core and the protocol are unchanged: a host is a cluster of one with one synthetic namespace. There is no controller Deployment, no DaemonSet, no sensor stream and no listener; the sensor roles run in the agent's own process and the collectors read them directly.</p>
<div class="tablewrap"><table>
<tr><th>In a cluster</th><th>On a host</th></tr>
<tr><td class="k">Cluster</td><td>The OS host name; <code>--cluster-name</code> overrides it</td></tr>
<tr><td class="k">Namespace</td><td>One synthetic namespace, <code>--host-namespace</code>, default <code>host</code>. Hosts running the same services share one value, so their services merge in the core graph</td></tr>
<tr><td class="k">Tenant</td><td><code>--target-tenant</code>, required; tenant mode only</td></tr>
<tr><td class="k">Virtual app</td><td>A systemd unit selected by <code>--host-units</code> globs, default every enabled service except system units; Ready when <code>ActiveState=active</code> and <code>SubState=running</code>, through the same flap damping</td></tr>
<tr><td class="k">USE</td><td>The unit's cgroup under <code>system.slice</code>, with the same readers, PSI included; limits from the unit's own <code>cpu.max</code> and <code>memory.max</code></td></tr>
<tr><td class="k">LOG</td><td>journald by <code>_SYSTEMD_UNIT</code>, through <code>journalctl --follow</code>; priority 0 to 3 is an error, 4 a warning, then the same regexes and redaction</td></tr>
<tr><td class="k">RED</td><td>OBI with Kubernetes off, one discovery entry per unit selecting every PID in its cgroup; series are stamped with the unit and the host namespace from <code>/proc/<pid>/cgroup</code>. A new PID in a unit restarts the instrumenter, a short RED gap</td></tr>
<tr><td class="k">Topology</td><td>A callee is named only by <code>server.address</code>, so every edge goes to an external host, even another unit; L4 flows carry addresses only</td></tr>
<tr><td class="k">Identity</td><td>The same join approval; key and certificate kept in <code>--join-state-dir</code></td></tr>
<tr><td class="k">HA</td><td>None: one agent per host, and a second one would duplicate every frame</td></tr>
</table></div>
<p>Install is a binary or a deb or rpm package with <code>triage-agent.service</code>, which reads its flags from <code>/etc/triage-agent/env</code> and runs as root with the same six capabilities as the DaemonSet. The <code>hello</code> carries the capability <code>host</code>. The acceptance steps have not yet been run on a real host.</p>
</section>
<!-- 02 -->
<section id="s2">
<div class="sechead"><span class="ord">02</span><h2>Scope and tenants</h2></div>
<p>Each item the agent sees, whether a workload, an event or a metric series, is resolved to a tenant through its namespace before it is queued. An annotated namespace always goes to its annotation's tenant. Tenant mode adds a primary tenant for namespaces listed in <code>--target-namespaces</code>; cluster mode works from annotations alone.</p>
<figure class="figscroll">
<svg viewBox="0 0 880 300" role="img" aria-label="Tenant resolution in the two modes. Tenant mode: namespaces from the list and annotations; annotated ones go to their annotation's tenant, listed-only ones to the primary tenant. Cluster mode: annotated namespaces only, each to its annotation's tenant. A Linux host takes its tenant from --target-tenant.">
<defs><marker id="tm" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#736F65"/></marker></defs>
<text class="ma" x="24" y="24">TENANT MODE · NAMESPACES AND PLAIN LINUX</text>
<text class="mb" x="472" y="24">CLUSTER MODE · ANNOTATED NAMESPACES</text>
<line class="bound" x1="440" y1="12" x2="440" y2="292"/>
<rect class="box" x="24" y="44" width="216" height="52" rx="8"/><text class="t c" x="132" y="66">Namespaces in scope</text><text class="ts c" x="132" y="84">list + annotated</text>
<rect class="box" x="256" y="44" width="168" height="52" rx="8"/><text class="t" x="272" y="66">Linux host</text><text class="ts" x="272" y="84">whole host</text>
<path class="e d" d="M340 96V140" marker-end="url(#tm)"/>
<path class="e" d="M132 96V116M120 116H328"/>
<path class="e" d="M120 116V140" marker-end="url(#tm)"/><path class="e" d="M328 116V140" marker-end="url(#tm)"/>
<text class="ts" x="128" y="132">annotated</text><text class="ts r" x="320" y="132">listed only</text>
<rect class="box" x="24" y="144" width="192" height="52" rx="8"/><text class="t c" x="120" y="166">Annotation's tenant</text><text class="ts c" x="120" y="184">triageagent.dev/tenant</text>
<rect class="box" x="232" y="144" width="192" height="52" rx="8"/><text class="t c" x="328" y="166">Primary tenant</text><text class="ts c" x="328" y="184">--target-tenant</text>
<path class="e" d="M120 196V220H328V196M224 220V240" marker-end="url(#tm)"/>
<rect class="box hot" x="96" y="244" width="256" height="44" rx="8"/><text class="t c" x="224" y="271">Per-tenant queues</text>
<rect class="box" x="544" y="44" width="256" height="52" rx="8"/><text class="t c" x="672" y="66">Namespaces in scope</text><text class="ts c" x="672" y="84">annotated namespaces</text>
<path class="e" d="M672 96V140" marker-end="url(#tm)"/>
<rect class="box" x="576" y="144" width="192" height="52" rx="8"/><text class="t c" x="672" y="166">Annotation's tenant</text><text class="ts c" x="672" y="184">triageagent.dev/tenant</text>
<path class="e" d="M672 196V240" marker-end="url(#tm)"/>
<rect class="box hot" x="544" y="244" width="256" height="44" rx="8"/><text class="t c" x="672" y="271">Per-tenant queues</text>
</svg>
<figcaption>Figure 2. Tenant resolution. An annotated namespace always goes to its annotation's tenant. Items opted out with <code>triageagent.dev/triage: "false"</code> are never sent. A Linux host has no namespaces, so <code>--target-tenant</code> sets its tenant. In cluster mode a namespace listed in <code>--target-namespaces</code> without the annotation has no tenant; its items are skipped and counted.</figcaption>
</figure>
<div class="tablewrap"><table>
<tr><th></th><th>Tenant mode</th><th>Cluster mode</th></tr>
<tr><td class="k">Selected by</td><td><code>--target-tenant</code> set</td><td><code>--target-tenant</code> empty; <code>--cluster-name</code> is the identity</td></tr>
<tr><td class="k">Authentication</td><td>Per cluster, by join certificate; the hello names the primary tenant</td><td>Per cluster, by join certificate; the hello names no tenant</td></tr>
<tr><td class="k">Frame stamp</td><td>Primary tenant unstamped; other annotated tenants stamped</td><td>Every frame stamped</td></tr>
<tr><td class="k">Scope</td><td><code>--target-namespaces</code> plus annotated namespaces</td><td>Annotated namespaces</td></tr>
<tr><td class="k">Listed, not annotated</td><td>Primary tenant</td><td>Skipped and counted</td></tr>
<tr><td class="k">Covers</td><td>Namespaces from the list and annotations; plain Linux hosts (<code>--mode=host</code>)</td><td>Annotated namespaces only</td></tr>
</table></div>
<h3>Annotations</h3>
<div class="tablewrap"><table>
<tr><th>Key</th><th>On</th><th>Effect</th></tr>
<tr><td class="k">triageagent.dev/tenant</td><td>Namespace</td><td>Puts the namespace in scope and names its tenant</td></tr>
<tr><td class="k">triageagent.dev/triage: "false"</td><td>Workload, pod template, namespace</td><td>No virtual app, events, metrics or topology for it</td></tr>
<tr><td class="k">triageagent.dev/instrument</td><td>Pod</td><td>Excludes the pod from eBPF instrumentation</td></tr>
<tr><td class="k">triageagent.dev/virtual-app, -group, -identity</td><td>Workload, namespace</td><td>Names and groups the virtual app; namespace values are inherited</td></tr>
<tr><td class="k">triageagent.dev/tier, weight, domain, description</td><td>Workload, namespace</td><td>Describes it; <code>weight</code> is 0.1 to 10</td></tr>
</table></div>
</section>
<!-- 03 -->
<section id="s3">
<div class="sechead"><span class="ord">03</span><h2>Objects and signals</h2></div>
<h3>Objects</h3>
<p>Objects the chart installs in the agent namespace.</p>
<div class="tablewrap"><table>
<tr><th>Object</th><th>Kind</th><th>Purpose</th></tr>
<tr><td class="k">triage-agent</td><td>Deployment</td><td>Controller; one or more replicas, the leader pushes to the core</td></tr>
<tr><td class="k"><fullname>-ebpf</td><td>DaemonSet</td><td>Sensor roles; <code>hostPID</code>; <code>hostNetwork</code> only with network flows</td></tr>
<tr><td class="k"><fullname>-peers</td><td>Service, headless</td><td>Port 9471, gossip between controller replicas, mutual TLS</td></tr>
<tr><td class="k">PodDisruptionBudget</td><td>PodDisruptionBudget</td><td>Keeps a controller replica up during voluntary disruptions, when replicas are above 1</td></tr>
<tr><td class="k"><fullname>-sensors</td><td>Service, ClusterIP</td><td>Port 9470</td></tr>
<tr><td class="k">OBI config</td><td>ConfigMap</td><td>Mounted as a file; not read through the API</td></tr>
<tr><td class="k"><fullname>-sensor-ca</td><td>ConfigMap, created empty</td><td>Controller writes <code>ca.crt</code>; sensors pin it</td></tr>
<tr><td class="k"><fullname>-sensor-tls</td><td>Secret, created empty</td><td>Controller certificate and key</td></tr>
<tr><td class="k"><fullname>-join</td><td>Secret</td><td>Ed25519 key, issued certificate, core CA</td></tr>
</table></div>
<h3>Watched API types</h3>
<p>The controller follows these Kubernetes API types through informers. All access is get, list and watch.</p>
<div class="tablewrap"><table>
<tr><th>API type</th><th>Default</th><th>Used for</th><th>Ready when</th></tr>
<tr><td class="k">apps/v1 deployments, statefulsets</td><td>Yes</td><td>Virtual-app discovery</td><td><code>readyReplicas</code> ≥ <code>spec.replicas</code></td></tr>
<tr><td class="k">apps/v1 daemonsets</td><td>Yes</td><td>Virtual-app discovery</td><td><code>numberReady</code> ≥ <code>desiredNumberScheduled</code></td></tr>
<tr><td class="k">argoproj.io/v1alpha1 rollouts</td><td>Yes</td><td>Virtual-app discovery</td><td><code>readyReplicas</code> ≥ <code>spec.replicas</code></td></tr>
<tr><td class="k">kagent Agent (AI agents)</td><td>As its Deployment</td><td>The kagent controller runs each Agent as a Deployment; the Agent resource itself is not watched</td><td>As a Deployment</td></tr>
<tr><td class="k">Any namespaced workload kind</td><td>Opt-in</td><td>Virtual-app discovery for custom types and vendor CRDs</td><td>A <code>Ready</code> or <code>Available</code> condition</td></tr>
<tr><td class="k">apps/v1 replicasets, batch/v1 jobs, cronjobs</td><td>Yes</td><td>Owner walk from a pod to the workload that names it</td><td></td></tr>
<tr><td class="k">v1 pods</td><td>Yes</td><td>Pod to workload identity for resource metrics</td><td></td></tr>
<tr><td class="k">v1 namespaces</td><td>Yes</td><td>Scope and tenant annotations</td><td></td></tr>
<tr><td class="k">v1 services, networking.k8s.io/v1 ingresses</td><td>Yes</td><td>Service index and entry points</td><td></td></tr>
<tr><td class="k">v1 events</td><td>Yes</td><td>Warning events, filtered server-side to <code>type=Warning</code></td><td></td></tr>
</table></div>
<p>Custom types are added with <code>workloadResources</code> (flag <code>--workload-resources</code>), one <code><group>/<version>/<resource></code> per entry, and a matching read rule in <code>rbac.extraWorkloadRules</code>. A non-empty list replaces the defaults, so keep the ones still needed. A type the API server does not serve is skipped at startup with one log line.</p>
<pre><code class="language-yaml">workloadResources:
- apps/v1/deployments
- apps/v1/statefulsets
- apps/v1/daemonsets
- argoproj.io/v1alpha1/rollouts
- helm.toolkit.fluxcd.io/v2/helmreleases # Flux HelmRelease
rbac:
extraWorkloadRules:
- apiGroups: ["helm.toolkit.fluxcd.io"]
resources: ["helmreleases"]
verbs: ["get", "list", "watch"]</code></pre>
<h3>Signals</h3>
<p>Five sources feed the agent. RED and topology come from OBI (OpenTelemetry eBPF Instrumentation, vendored at <code>third_party/obi</code>), which chooses its own hooks; the agent loads no eBPF program of its own.</p>
<div class="tablewrap"><table>
<tr><th>Source</th><th>Read by</th><th>Method</th><th>Yields</th></tr>
<tr><td>Kernel hooks</td><td class="k">ebpf</td><td>OBI uprobes and kprobes for HTTP and gRPC; socket filter for L4 when <code>ebpf.networkFlows.enabled</code></td><td>RED per service; L7 and L4 edges</td></tr>
<tr><td>cgroup v2, PSI</td><td class="k">node-exporter</td><td>Host files, read only</td><td>USE per container</td></tr>
<tr><td>Container log files</td><td class="k">logs-based metrics</td><td>Tails from file end, polls every 250 ms; partial lines over 1 MiB dropped and counted</td><td><code>log.errors</code>, <code>log.warns</code>, <code>log.lines</code></td></tr>
<tr><td>Kubernetes API</td><td class="k">controller</td><td>Informers on namespaces and workloads; events filtered server-side to <code>type=Warning</code></td><td>Virtual apps, Warning events</td></tr>
<tr><td>OpenTelemetry SDKs and Collectors</td><td class="k">controller</td><td>OTLP/gRPC push to port 4317, when <code>otlp.enabled</code>; routed by metric name</td><td>RED, SIG and L7 topology from semantic-convention histograms or span metrics; USE, with PSI, from kubelet cAdvisor or <code>use.*</code>; LOG from <code>log.*</code></td></tr>
</table></div>
<h3>OTLP receiver</h3>
<p>A cluster that already runs OpenTelemetry, or cannot run the DaemonSet, pushes OTLP metrics to the controller. The receiver keeps each resource's newest cumulative point per series and hands it to sensorstream, so the same collectors, baseline gates and replica gossip apply. Metric names route it: the HTTP, gRPC and database histograms and <code>obi.network.flow.bytes</code> go to RED and topology, <code>use.*</code> to USE, <code>log.errors</code>, <code>log.warns</code> and <code>log.lines</code> to LOG. Where a sensor and an OTLP sender report the same service or pod, the sensor's numbers are used and the OTLP ones dropped, so nothing is counted twice.</p>
<p>A Collector that has only traces, kubelet access and logs covers all three frameworks without the DaemonSet. The receiver translates two inputs it would otherwise ignore:</p>
<div class="tablewrap"><table>
<tr><th>Collector input</th><th>Translated to</th><th>Notes</th></tr>
<tr><td>Traces through the <code>spanmetrics</code> connector</td><td>HTTP and gRPC server histograms (RED, SIG), client histograms (L7 edges)</td><td>Read from <code>traces.span.metrics.duration</code> by <code>span.kind</code> and <code>rpc.system</code>; milliseconds become seconds; a span without a status code counts as 200 or OK, an error span as 500 or UNKNOWN; internal spans and the calls counter are dropped. Needs <code>add_resource_attributes: true</code> so the service, not the Collector, owns the series</td></tr>
<tr><td>Kubelet <code>/metrics/cadvisor</code> through the <code>prometheus</code> receiver</td><td><code>use.*</code> per pod, node cores and memory</td><td>Pod-level cgroup series only. PSI is the rate of <code>container_pressure_*_waiting_seconds</code> as a percentage, the same meaning as the DaemonSet's <code>some avg</code>; it needs Kubernetes 1.34 or later and a ClusterRole with <code>get</code> on <code>nodes/metrics</code></td></tr>
<tr><td>Logs through the <code>count</code> connector</td><td>LOG</td><td>Count by severity into <code>log.errors</code>, <code>log.warns</code> and <code>log.lines</code></td></tr>
</table></div>
<p>Points need <code>service.name</code> and <code>k8s.namespace.name</code> and cumulative temporality. Older conventions are converted: <code>http.server.duration</code> in milliseconds, <code>http.status_code</code>, a numeric <code>rpc.grpc.status_code</code>. The workload comes from <code>k8s.owner.name</code> or the <code>k8s.deployment.name</code> family that the <code>k8sattributes</code> processor adds. Delta temporality and exponential histograms are refused and reported in the response. Limits: 5000 resources, 20000 series each; a resource silent for 10 minutes is dropped.</p>
<p>The receiver serves the controller's certificate, which senders pin from <code>-sensor-ca</code>. A sender authenticates with a client certificate that chains to <code>otlp.clientCASecret</code>, which is the OTel exporter's own <code>tls.cert_file</code> and <code>key_file</code>, or with a projected ServiceAccount token, audience <code>triage-agent-otlp</code>, of an account in <code>otlp.allowedServiceAccounts</code>, checked by TokenReview.</p>
<pre><code class="language-yaml">exporters:
otlp/triage:
endpoint: <fullname>-sensors.<namespace>.svc:4317
tls:
ca_file: /etc/otel/triage/ca.crt # from -sensor-ca
cert_file: /etc/otel/certs/client.crt # chains to otlp.clientCASecret
key_file: /etc/otel/certs/client.key</code></pre>
<p>Virtual apps come from workloads only, synthesized by workload name or by label when a namespace opts in. The workload kinds and their readiness rules are under Watched API types above.</p>
<p><strong>Sandboxed runtimes.</strong> eBPF works on the host kernel, so sandboxes limit it. The agent cannot run under gVisor, Kata or user-namespaced pods, which have no host kernel or host PID namespace to probe. Workloads that run under them are mostly invisible to the traffic role: their traffic passes through the sandbox's own kernel, so RED, SIG and L7 topology are missing and at most L4 flows at the sandbox's interface are seen.</p>
</section>
<!-- 04 -->
<section id="s4">
<div class="sechead"><span class="ord">04</span><h2>Data flow and frames</h2></div>
<p>Gated frames carry only services that crossed their baseline in the window. Summary frames carry every service, ungated, so the core can see quiet services too.</p>
<figure class="figscroll">
<svg viewBox="0 0 880 250" role="img" aria-label="Pipeline from sensor roles through sensorstream and the collectors to push and the core, with timings, and a snapshot request from the core on graph load.">
<defs>
<marker id="pa" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#9C4A26"/></marker>
<marker id="pb" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#3F6478"/></marker>
</defs>
<rect class="box" x="16" y="40" width="148" height="60" rx="8"/><text class="t c" x="90" y="66">Sensor roles</text><text class="ts c" x="90" y="84">OTLP snapshot</text>
<rect class="box" x="196" y="40" width="148" height="60" rx="8"/><text class="t c" x="270" y="66">sensorstream</text><text class="ts c" x="270" y="84">latest per node</text>
<rect class="box" x="376" y="40" width="148" height="60" rx="8"/><text class="t c" x="450" y="66">Collectors</text><text class="ts c" x="450" y="84">delta, gate, cap</text>
<rect class="box hot" x="556" y="40" width="148" height="60" rx="8"/><text class="t c" x="630" y="66">Per-tenant queues</text><text class="ts c" x="630" y="84">push over WSS</text>
<rect class="box" x="736" y="40" width="128" height="60" rx="8"/><text class="t c" x="800" y="66">Core</text><text class="ts c" x="800" y="84">ingest</text>
<path class="e a" d="M164 70H192" marker-end="url(#pa)"/>
<path class="e a" d="M344 70H372" marker-end="url(#pa)"/>
<path class="e a" d="M524 70H552" marker-end="url(#pa)"/>
<path class="e a" d="M704 70H732" marker-end="url(#pa)"/>
<path class="e b" d="M800 100V150H630V104" marker-end="url(#pb)"/>
<text class="mb c" x="715" y="167">snapshot request on graph load</text>
<rect class="well" x="16" y="180" width="148" height="56" rx="6"/><text class="mi" x="28" y="202">every 15 s</text><text class="ts" x="28" y="222">--sensor-tick</text>
<rect class="well" x="196" y="180" width="148" height="56" rx="6"/><text class="mi" x="208" y="202">stale after 2 m</text><text class="ts" x="208" y="222">node dropped from reads</text>
<rect class="well" x="376" y="180" width="148" height="56" rx="6"/><text class="mi" x="388" y="202">Δ ≥ 10, ≥ 3× median</text><text class="ts" x="388" y="222">of 5+ windows (logs)</text>
<rect class="well" x="556" y="180" width="148" height="56" rx="6"/><text class="mi" x="568" y="202">round-robin</text><text class="ts" x="568" y="222">one WSS</text>
<rect class="well" x="736" y="180" width="128" height="56" rx="6"/><text class="mi" x="748" y="202">≤ 512 KiB in</text><text class="ts" x="748" y="222">per inbound message</text>
<text class="m" x="16" y="24">PIPELINE</text>
<text class="m" x="16" y="172">CADENCE AND LIMITS</text>
</svg>
<figcaption>Figure 3. Pipeline with its cadences. Reconnect backoff is 1 s to 30 s on both links.</figcaption>
</figure>
<div class="tablewrap"><table>
<tr><th>Frame</th><th>Content</th><th>Enabled by</th></tr>
<tr><td class="k">snapshot, app_delta</td><td>Virtual-app status</td><td>Push configured</td></tr>
<tr><td class="k">k8s_event</td><td>Kubernetes Warning events</td><td>Push configured</td></tr>
<tr><td class="k">red_metrics / red_summary</td><td>RED from OBI, gated / every service</td><td><code>redMetrics.enabled</code></td></tr>
<tr><td class="k">use_metrics / use_summary</td><td>USE from cgroup v2 and PSI, gated / every service</td><td><code>useMetrics.enabled</code></td></tr>
<tr><td class="k">log_metrics</td><td>Error and warn deltas per service, one sample line</td><td><code>--log-metrics-enabled</code></td></tr>
<tr><td class="k">topology_snapshot</td><td>Observed L7 calls and optional L4 flows</td><td><code>--topology-enabled</code></td></tr>
<tr><td class="k">sensor_state</td><td>Sensor health every 60 s, unstamped, not tenant data. Lists each OTLP source with its last push and per-framework counts: RED and LOG data points, USE pods</td><td>Any collector</td></tr>
<tr><td class="k">resync (inbound)</td><td>Snapshot request on graph load. Core asks the agent to resend one tenant's virtual-app snapshot after that tenant's service graph reloads. The agent answers with <code>snapshot</code> frames and an end marker; no metrics or topology are resent</td><td>Always</td></tr>
</table></div>
<h3>Wire formats</h3>
<p>Inside the cluster the agent speaks native OpenTelemetry. OBI emits OTel metrics under the semantic conventions, and the sensor roles forward them unchanged as OTLP <code>ResourceMetrics</code> with cumulative temporality. No custom metric model sits between OBI and the collectors.</p>
<div class="tablewrap"><table>
<tr><th>OTel metric</th><th>Type</th><th>Used for</th></tr>
<tr><td class="k">http.server.request.duration</td><td>Histogram</td><td>RED and SIG for HTTP; status from <code>http.response.status_code</code></td></tr>
<tr><td class="k">rpc.server.call.duration</td><td>Histogram</td><td>RED and SIG for gRPC; status from <code>rpc.response.status_code</code></td></tr>
<tr><td class="k">http.client.request.duration, rpc.client.call.duration, db.client.operation.duration</td><td>Histogram</td><td>L7 topology edges</td></tr>
<tr><td class="k">obi.network.flow.bytes</td><td>Counter</td><td>L4 topology edges</td></tr>
<tr><td class="k">k8s.namespace.name, service.name</td><td>Resource attributes</td><td>Identity of every series</td></tr>
</table></div>
<p>The sensor stream wraps those metrics in a small protobuf envelope. Each tick a sensor sends one <code>Snapshot</code> per role and one <code>SensorState</code>; the controller acknowledges each message by sequence number.</p>
<pre><code class="language-protobuf">service SensorService { rpc Stream(stream StreamRequest) returns (stream StreamResponse); }
message StreamRequest { uint64 seq; Timestamp time; oneof { Hello | Snapshot | SensorState } }
message Snapshot {
string role = 1;
repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 2;
}
message StreamResponse { Ack { uint64 seq } }</code></pre>
<p>The collectors turn the cumulative histograms into per-window request count, error count and p99 per service, then gate them. What leaves the cluster is one JSON frame per WebSocket text message: a shared envelope with exactly one payload field named after the kind. The <code>red_metrics</code> example below uses illustrative values.</p>
<pre><code class="language-json">{ "v": 1, "kind": "red_metrics", "cluster": "<cluster>", "tenant": "<tenant>",
"redMetrics": {
"windowStart": 1759834800, "windowSec": 60,
"services": [{
"namespace": "shop", "service": "checkout",
"requestCount": 1840, "errorCount": 41,
"sample": "GET /api/orders -> 502 x41",
"p99Ms": 812, "baselineP99Ms": 140, "latencyBreach": true,
"breach": "op-latency", "operation": "POST /api/orders",
"observed": 812, "baseline": 140, "evidenceSec": 180
}]
} }</code></pre>
<p>The payload fields are <code>hello</code>, <code>snapshot</code>, <code>appDelta</code>, <code>k8sEvent</code>, <code>logMetrics</code>, <code>redMetrics</code>, <code>redSummary</code>, <code>useMetrics</code>, <code>useSummary</code>, <code>topologySnapshot</code> and <code>sensorState</code>. Field names are a pinned contract with the core and must stay byte-identical on both sides; fields added later are optional.</p>
<h3>Wire caps</h3>
<div class="tablewrap"><table>
<tr><th>Cap</th><th>Value</th></tr>
<tr><td>Services per metrics frame</td><td>100, larger frames chunked</td></tr>
<tr><td>Sample text</td><td>256 bytes</td></tr>
<tr><td>Operation name</td><td>128 bytes</td></tr>
<tr><td>Topology</td><td>200 nodes, 500 edges</td></tr>
<tr><td>External address</td><td>128 bytes</td></tr>
</table></div>
</section>
<!-- 05 -->
<section id="s5">
<div class="sechead"><span class="ord">05</span><h2>Log samples</h2></div>
<p>A <code>log_metrics</code> frame carries one sample line per service so the core can see what the errors say. The fingerprint that groups errors is masked; the sample that leaves the cluster is the line with secrets and email addresses replaced by <code>***</code>, then cut to length.</p>
<figure class="figscroll">
<svg viewBox="0 0 880 240" role="img" aria-label="An error line is extracted and stripped, then splits: a masked fingerprint used for identity only, and a raw exemplar that is cut to 256 bytes and sent to the core without redaction.">
<defs>
<marker id="sm" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#736F65"/></marker>
<marker id="sa" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#9C4A26"/></marker>
</defs>
<text class="m" x="16" y="24">FROM ERROR LINE TO log.sample</text>
<rect class="box" x="16" y="70" width="140" height="60" rx="8"/><text class="t c" x="86" y="96">Error line</text><text class="ts c" x="86" y="114">regex: level, panic:</text>
<rect class="box" x="186" y="70" width="140" height="60" rx="8"/><text class="t c" x="256" y="96">Extract</text><text class="ts c" x="256" y="114">message, msg, error, err</text>
<rect class="box" x="356" y="70" width="140" height="60" rx="8"/><text class="t c" x="426" y="96">Strip noise</text><text class="ts c" x="426" y="114">timestamp, level tokens</text>
<rect class="box cool" x="540" y="36" width="160" height="56" rx="8"/><text class="t c" x="620" y="60">Fingerprint</text><text class="ts c" x="620" y="78">UUIDs, hex, digits → #</text>
<rect class="box" x="540" y="132" width="160" height="56" rx="8"/><text class="t c" x="620" y="156">Exemplar</text><text class="ts c" x="620" y="174">redacted, 160 B per slot</text>
<rect class="box" x="736" y="132" width="128" height="56" rx="8"/><text class="t c" x="800" y="156">On the wire</text><text class="ts c" x="800" y="174">cut to 256 B</text>
<rect class="well" x="736" y="36" width="128" height="56" rx="6"/><text class="tl c" x="800" y="60">series identity</text><text class="ts c" x="800" y="78">and dedup only</text>
<path class="e" d="M156 100H182" marker-end="url(#sm)"/>
<path class="e" d="M326 100H352" marker-end="url(#sm)"/>
<path class="e" d="M496 100H516V64H536" marker-end="url(#sm)"/>
<path class="e a" d="M516 100V160H536" marker-end="url(#sa)"/>
<path class="e" d="M700 64H732" marker-end="url(#sm)"/>
<path class="e a" d="M700 160H732" marker-end="url(#sa)"/>
<text class="ma" x="540" y="218">Secrets and PII redacted before truncation</text>
</svg>
<figcaption>Figure 4. Masking applies to the fingerprint; redaction applies to the exemplar. The collector picks the sample of the error series with the largest positive delta in the window. Defaults: 160 bytes and 8 fingerprints per service.</figcaption>
</figure>
<div class="tablewrap"><table>
<tr><th>Control</th><th>Status</th></tr>
<tr><td>Length cap, 160 B exporter / 256 B wire</td><td><span class="pill ok">present</span></td></tr>
<tr><td>Slot cap, 8 fingerprints per service; overflow counted with no sample</td><td><span class="pill ok">present</span></td></tr>
<tr><td>Fingerprint masking</td><td><span class="pill lo">identity only</span></td></tr>
<tr><td>Namespace scope and opt-out</td><td><span class="pill ok">present</span></td></tr>
<tr><td>Secret and PII redaction of the sample: URI credentials, JWTs, Bearer and Basic credentials, secret-named keys, AWS key IDs, email addresses</td><td><span class="pill ok">present</span></td></tr>
<tr><td>URI credential scrub (<code>user:***@host</code>)</td><td><span class="pill ok">present</span></td></tr>
<tr><td>Prompt guardrails before a model call</td><td><span class="pill ok">core-side</span></td></tr>
</table></div>
</section>
<!-- 06 -->
<section id="s6">
<div class="sechead"><span class="ord">06</span><h2>Connections and trust</h2></div>
<p>Both links are encrypted and authenticated in both directions, and node roles open no port. Between the controller and the core, each side proves itself with a certificate inside the WebSocket: the core first, by signing a challenge nonce with its agent CA, then the agent, with its admin-approved Ed25519 certificate and a signature over the same nonce. This is mutual certificate authentication over TLS 1.3, carried in the WebSocket rather than as TLS client certificates.</p>
<p>Between a sensor and the controller, one-way TLS plus a token gives mutual authentication with nothing extra to run. The controller holds a self-signed ECDSA P-256 certificate that each sensor pins from the <code>-sensor-ca</code> ConfigMap, so the sensor knows it reaches the real controller. The sensor presents no client certificate. It sends its projected ServiceAccount token, audience <code>triage-agent-sensors</code>, and the controller checks it with a <strong>TokenReview</strong>, a call to the Kubernetes API server that verifies the token's signature, expiry, audience and bound pod and returns the ServiceAccount and node it was issued for. The controller needs only <code>create</code> on <code>tokenreviews</code> for this. The token must belong to the <code>-ebpf</code> ServiceAccount, and the node named in the token must match the node in the sensor's hello. The kubelet issues the token per pod, valid for one hour and rotated automatically, so there is no client CA, no per-node certificate and no shared client key. A compromised node cannot send data as another node.</p>
<figure class="figscroll">
<svg viewBox="0 0 880 260" role="img" aria-label="Trust on each link: sensors pin the controller certificate and present a ServiceAccount token; the core and the controller prove themselves to each other with certificates over a challenge nonce.">
<defs><marker id="la" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#9C4A26"/></marker>
<marker id="lb" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#3F6478"/></marker></defs>
<rect class="box" x="16" y="60" width="180" height="80" rx="8"/><text class="t" x="32" y="86">Sensor pod</text><text class="ts" x="32" y="106">ebpf, node-exporter,</text><text class="ts" x="32" y="122">logs-based metrics</text>
<rect class="box" x="350" y="60" width="180" height="80" rx="8"/><text class="t" x="366" y="86">Controller</text><text class="ts" x="366" y="106">sensorstream :9470</text><text class="ts" x="366" y="122">WSS client</text>
<rect class="box" x="684" y="60" width="180" height="80" rx="8"/><text class="t" x="700" y="86">Core</text><text class="ts" x="700" y="106">WSS server</text><text class="ts" x="700" y="122">agent CA</text>
<path class="e a" d="M196 100H346" marker-end="url(#la)"/>
<path class="e a" d="M530 92H680" marker-end="url(#la)"/>
<path class="e b" d="M684 112H534" marker-end="url(#lb)"/>
<text class="ma c" x="271" y="90">gRPC · TLS 1.3 only</text>
<text class="ma c" x="605" y="82">wss</text>
<text class="mb c" x="605" y="130">snapshot request only</text>
<text class="m" x="16" y="172">SENSOR → SENSORSTREAM</text>
<text class="tl" x="16" y="194">Server: self-signed ECDSA P-256, pinned via -sensor-ca</text>
<text class="tl" x="16" y="212">Client: projected SA token, audience triage-agent-sensors</text>
<text class="tl" x="16" y="230">Checked by TokenReview; node name must match the hello</text>
<text class="m" x="460" y="172">CONTROLLER → CORE</text>
<text class="tl" x="460" y="194">Core signs a nonce with its agent CA; agent pins the CA</text>
<text class="tl" x="460" y="212">Agent answers with its approved Ed25519 cert and signature</text>
<text class="tl" x="460" y="230">Mutual auth inside WSS, not TLS client certificates</text>
<text class="m" x="16" y="24">TRUST PER LINK</text>
</svg>
<figcaption>Figure 5. Authentication on each link.</figcaption>
</figure>
<ul>
<li><strong>Listeners.</strong> Only the controller listens: 9470 for the sensor stream when <code>--sensor-listen</code> is set, and 4317 for OTLP when <code>--otlp-listen</code> is set. Metrics on 8080 are off by default (<code>--metrics-addr=0</code>). No pprof in the repository.</li>
<li><strong>Keepalive.</strong> 30 s with a 10 s timeout on both ends of the gRPC stream.</li>
<li><strong>Certificate life.</strong> The sensor certificate is valid for 10 years and regenerated 30 days before expiry. The join certificate renews with less than a third of its life left.</li>
</ul>
</section>
<!-- 07 -->
<section id="s7">
<div class="sechead"><span class="ord">07</span><h2>RBAC</h2></div>
<p>RBAC is read-only on workloads. The agent has no cluster-wide Secret or ConfigMap access and updates three named objects in its own namespace, each by <code>resourceNames</code>.</p>
<div class="tablewrap"><table>
<tr><th>Role</th><th>Grants</th></tr>
<tr><td class="k">ClusterRole, controller</td><td>get, list, watch on namespaces, events, pods, services, ingresses, deployments, statefulsets, daemonsets, replicasets, jobs, cronjobs, rollouts; get on endpoints. No Secrets, ConfigMaps or wildcards</td></tr>
<tr><td class="k">ClusterRole, ebpf</td><td>get, list, watch on pods, services, nodes, namespaces and workload kinds; pod informer limited to its node</td></tr>
<tr><td class="k">Role -sensor-stream</td><td>get, update on <code>-sensor-tls</code> and <code>-sensor-ca</code></td></tr>
<tr><td class="k">Role -join</td><td>get, update on <code>-join</code></td></tr>
<tr><td class="k">Role leader-election</td><td>Leases; create and patch events</td></tr>
<tr><td class="k">ClusterRole -sensor-tokenreview</td><td>create tokenreviews</td></tr>
</table></div>
<h3>Process privilege</h3>
<p>Both workloads run the same image, whose default user is <code>nonroot</code> (UID 65532, Chainguard <code>static</code> base). The controller keeps that user and needs no host access. The DaemonSet overrides it with <code>runAsUser: 0</code> in its pod spec, in both modes below. It runs all sensor roles in one container, <code>agent</code>, so the traffic, resource and logs-based metrics roles share one security context. The chart offers two privilege modes for it, selected by <code>ebpf.privileged</code>.</p>
<div class="tablewrap"><table>
<tr><th></th><th>Unprivileged (default)</th><th>Privileged fallback</th></tr>
<tr><td class="k">ebpf.privileged</td><td><code>false</code></td><td><code>true</code></td></tr>
<tr><td class="k">privileged</td><td>false</td><td>true</td></tr>
<tr><td class="k">Capabilities</td><td>Drop <code>ALL</code>; add <code>BPF</code>, <code>PERFMON</code>, <code>NET_RAW</code>, <code>SYS_PTRACE</code>, <code>DAC_READ_SEARCH</code>, <code>CHECKPOINT_RESTORE</code>, plus <code>ebpf.extraCapabilities</code></td><td>All</td></tr>
<tr><td class="k">Privilege escalation</td><td>Blocked</td><td>Not restricted</td></tr>
<tr><td class="k">Seccomp</td><td><code>RuntimeDefault</code></td><td>Not set</td></tr>
<tr><td class="k">Root filesystem</td><td>Read-only</td><td>Read-only</td></tr>
<tr><td class="k">User</td><td>0 (root), overrides the image's <code>nonroot</code></td><td>0 (root), overrides the image's <code>nonroot</code></td></tr>
<tr><td class="k">Use when</td><td>Kernels 5.11 and later, which load eBPF under this capability set</td><td>Older or unusual kernels that cannot load eBPF under the capability set</td></tr>
</table></div>
<p><strong>Root scope.</strong> UID 0 is what makes the six capabilities effective: Kubernetes has no field for ambient capabilities, and file capabilities on the binary are blocked by <code>no_new_privs</code>. Root here is not full privilege; it is UID 0 with every other capability dropped, <code>privileged: false</code>, <code>no_new_privs</code>, seccomp and a read-only root filesystem. <code>hostPID</code> already requires the <code>privileged</code> Pod Security level, with or without root. Comparable eBPF agents such as Beyla, Cilium, Falco and Tetragon also run as root, most with wider capabilities or full privilege.</p>
<h3>Extra capabilities</h3>
<div class="tablewrap"><table>
<tr><th>Capability</th><th>Needed for</th></tr>
<tr><td class="k">SYS_RESOURCE</td><td>Kernels before 5.11, to lift BPF verifier instruction and memory limits</td></tr>
<tr><td class="k">SYS_ADMIN</td><td>Go services on GKE COS 6.12: without it every Go uprobe fails with permission denied and Go services report no RED; the sensor status points to this capability only when the failing executable is Go. Some kernels also need it for Go trace-context propagation</td></tr>
</table></div>
<p>Both widen the container beyond the audited default; the chart advises trying without them first.</p>
<h3>Host access</h3>
<div class="tablewrap"><table>
<tr><th>Item</th><th>When</th><th>Why</th></tr>
<tr><td class="k">hostPID</td><td>Traffic metrics on</td><td>OBI hooks other containers' processes; a namespace share has no capability substitute</td></tr>
<tr><td class="k">hostNetwork</td><td><code>ebpf.networkFlows.enabled</code></td><td>The socket filter captures L4 flows in the host network namespace</td></tr>
<tr><td class="k">/sys/fs/bpf</td><td>Always</td><td>BPF filesystem for OBI's maps and programs</td></tr>
<tr><td class="k">/sys/fs/cgroup, read-only</td><td>Resource metrics on</td><td>cgroup v2 and PSI files</td></tr>
<tr><td class="k">/var/log, read-only</td><td>Logs-based metrics on</td><td>Container log files</td></tr>
</table></div>
</section>
<!-- 08 -->
<section id="s8">
<div class="sechead"><span class="ord">08</span><h2>Topology and drift</h2></div>
<p>With <code>--topology-enabled</code>, the RED collector builds a <code>topology_snapshot</code> from OBI's client-side metrics and, when enabled, L4 flows. Counts accumulate across RED ticks and flush every 600 s as one full snapshot, so a lost frame heals on the next flush. The snapshot keeps the top 500 edges by calls and the first 200 nodes, and is skipped when every scrape in the tick failed.</p>
<figure class="figscroll">
<svg viewBox="0 18 880 352" role="img" aria-label="Sample topology snapshot drawn as a graph: eleven workloads, three external hosts, and one observed edge from checkout to cache that is not in the declared graph.">
<line class="ge" x1="160" y1="180" x2="350" y2="125"/>
<line class="ge" x1="160" y1="180" x2="330" y2="265"/>
<line class="ge" x1="160" y1="180" x2="215" y2="70"/>
<line class="ge" x1="160" y1="180" x2="140" y2="300"/>
<line class="ge" x1="160" y1="180" x2="60" y2="110"/>
<line class="ge" x1="140" y1="300" x2="215" y2="70"/>
<line class="ge" x1="350" y1="125" x2="520" y2="70"/>
<line class="ge" x1="350" y1="125" x2="480" y2="198"/>
<line class="ge" x1="350" y1="125" x2="660" y2="135"/>
<line class="ge" x1="350" y1="125" x2="690" y2="212"/>
<line class="ge" x1="350" y1="125" x2="330" y2="265"/>
<line class="ge" x1="330" y1="265" x2="520" y2="265"/>
<line class="gx" x1="520" y1="70" x2="700" y2="45"/>
<line class="gx" x1="690" y1="212" x2="800" y2="280"/>
<line class="ge" x1="480" y1="198" x2="660" y2="135"/>
<line class="gx" x1="480" y1="198" x2="420" y2="335"/>
<line class="gd" x1="350" y1="125" x2="520" y2="265"/>
<circle class="gn" cx="160" cy="180" r="15"/><text class="gl" x="160" y="158">frontend</text>
<circle class="gn" cx="350" cy="125" r="14"/><text class="gl" x="350" y="104">checkout</text>
<circle class="gn" cx="330" cy="265" r="12"/><text class="gl" x="330" y="246">cart</text>
<circle class="gn" cx="520" cy="70" r="12"/><text class="gl" x="520" y="51">payment</text>
<circle class="gn" cx="520" cy="265" r="11"/><text class="gl" x="520" y="294">cache</text>
<circle class="gn" cx="215" cy="70" r="11"/><text class="gl" x="215" y="52">catalog</text>
<circle class="gn" cx="140" cy="300" r="10"/><text class="gl" x="140" y="283">recommendation</text>
<circle class="gn" cx="480" cy="198" r="11"/><text class="gl" x="480" y="180">shipping</text>
<circle class="gn" cx="660" cy="135" r="10"/><text class="gl" x="660" y="118">currency</text>
<circle class="gn" cx="690" cy="212" r="10"/><text class="gl" x="690" y="195">email</text>
<circle class="gn" cx="60" cy="110" r="9"/><text class="gl" x="60" y="94">ad</text>
<circle class="gxn" cx="700" cy="45" r="7"/><text class="gl gm" x="700" y="31">pay.example.com:443</text>
<circle class="gxn" cx="800" cy="280" r="7"/><text class="gl gm" x="800" y="266">smtp.example.com:587</text>
<circle class="gxn" cx="420" cy="335" r="7"/><text class="gl gm" x="420" y="321">10.4.0.12:5432</text>
<text class="ma" x="420" y="215" text-anchor="end">not declared</text>
<circle class="gn" cx="690" cy="330" r="7"/><text class="tl" x="704" y="334">workload</text>
<circle class="gxn" cx="690" cy="352" r="5"/><text class="tl" x="704" y="356">external host</text>
<line class="gd" x1="770" y1="330" x2="796" y2="330"/><text class="tl" x="804" y="334">drift</text>
</svg>
<figcaption>Figure 6. A sample <code>topology_snapshot</code> drawn as a graph. Nodes are workloads, never pods, sized by traffic. Each edge is one caller, callee and protocol, carrying the call count for the window, or bytes for an L4 flow. A destination outside scope is sent as an external host. The core flags an observed edge that the declared graph lacks, here checkout to cache, as drift.</figcaption>
</figure>
<p>The agent has no drift comparator. The core compares the snapshot with the declared service graph. A snapshot request does not resend topology; the next flush carries it.</p>
</section>
<!-- 09 -->
<section id="s9">
<div class="sechead"><span class="ord">09</span><h2>Connectors</h2></div>
<p>Each connector is its own Go module, deployed apart from the agent, that turns a provider's signals into events for the core events API.</p>
<div class="tablewrap"><table>
<tr><th>Connector</th><th>Runs as</th><th>Input</th><th>Auth to core</th><th>Delivery</th></tr>
<tr><td class="k">gcpevents</td><td>Cloud Run function</td><td>Billing cost anomalies and Monitoring alerts via Pub/Sub push; Service Health polled every 15 min</td><td>Bearer from Secret Manager, <code>X-Tenant</code></td><td>3 attempts, 4xx dropped</td></tr>
<tr><td class="k">promevents</td><td>Deployment, port 8080</td><td>Alertmanager webhook <code>POST /alertmanager</code></td><td>Projected SA token (audience <code>triage-core</code>, 1 h) or static token, <code>X-Tenant</code> per alert</td><td>15 s timeout, 3 attempts, 4xx except 408 and 429 dropped, duplicates suppressed 2 min</td></tr>
</table></div>
<p><code>promevents</code> runs non-root with a read-only root filesystem and all capabilities dropped; its Role in the core namespace grants verb <code>ingest</code> on named tenants only.</p>
</section>
<!-- 10 -->
<section id="s10">
<div class="sechead"><span class="ord">10</span><h2>Configuration</h2></div>
<h3>Requirements</h3>
<div class="tablewrap"><table>
<tr><th>Item</th><th>Requirement</th></tr>
<tr><td class="k">Kernel</td><td>5.8 or later, 4.18 on RHEL-based distros; OBI refuses to start below that. The unprivileged default is documented for 5.11 and later; 5.8 to 5.10 need <code>SYS_RESOURCE</code></td></tr>
<tr><td class="k">BTF</td><td>Kernel built with <code>CONFIG_DEBUG_INFO_BTF</code>; OBI refuses to start without it</td></tr>
<tr><td class="k">cgroup</td><td>cgroup v2, for resource metrics</td></tr>
<tr><td class="k">Linux host</td><td>systemd 240 or later (D-Bus for unit discovery, <code>journalctl</code> for logs), cgroup v2, and the kernel and BTF above. Root, with the six capabilities the unit file grants</td></tr>
<tr><td class="k">Controller resources</td><td>Requests 50m CPU, 64Mi memory; limits 200m CPU, 512Mi memory</td></tr>
<tr><td class="k">DaemonSet resources</td><td>Requests 50m CPU, 128Mi memory; limits 300m CPU, 700Mi memory. Memory grows with the number of instrumented pods; CPU peaks near 130m during the attach burst after a restart</td></tr>
</table></div>
<h3>Flags and values</h3>
<div class="tablewrap"><table>
<tr><th>Flag or value</th><th>Default</th><th>Meaning</th></tr>
<tr><td class="k">--target-tenant</td><td>empty</td><td>Primary tenant; empty selects cluster mode</td></tr>
<tr><td class="k">--target-namespaces</td><td>empty</td><td>Static scope list beside annotated namespaces</td></tr>
<tr><td class="k">--workload-resources</td><td>Deploy, STS, DS, Rollout</td><td>Workload kinds watched</td></tr>
<tr><td class="k">--virtual-apps</td><td>on</td><td>Synthesize virtual apps</td></tr>
<tr><td class="k">--sensor-listen</td><td>empty</td><td>Sensor stream address; empty disables it and its collectors</td></tr>
<tr><td class="k">otlp.enabled</td><td>false</td><td>OTLP/gRPC receiver on 4317; turns on the sensor stream without the DaemonSet</td></tr>
<tr><td class="k">otlp.clientCASecret</td><td>empty</td><td>Secret with <code>ca.crt</code> for mutual TLS</td></tr>
<tr><td class="k">otlp.allowedServiceAccounts</td><td>empty</td><td><code>namespace/name</code> or <code>namespace/*</code> allowed to send with a token</td></tr>
<tr><td class="k">--sensor-tick</td><td>15s</td><td>Sensor send interval</td></tr>
<tr><td class="k">--log-metrics-enabled</td><td>false</td><td>Log collector; needs push</td></tr>
<tr><td class="k">--log-metrics-interval-seconds</td><td>60</td><td>Window</td></tr>
<tr><td class="k">--log-metrics-error-threshold</td><td>10</td><td>Error or warn delta that qualifies a window</td></tr>
<tr><td class="k">--log-baseline</td><td>true</td><td>Median gate: ×3, ≥ 5 windows</td></tr>
<tr><td class="k">--log-exporter-sample-max-len</td><td>160</td><td>Bytes kept for fingerprint and sample</td></tr>
<tr><td class="k">--log-exporter-max-samples-per-service</td><td>8</td><td>Distinct fingerprints per service</td></tr>
<tr><td class="k">--topology-enabled</td><td>false</td><td>Topology snapshots</td></tr>
<tr><td class="k">--topology-interval-seconds</td><td>600</td><td>Snapshot flush</td></tr>
<tr><td class="k">--push-allow-plaintext</td><td>false</td><td>Allow <code>ws://</code> beyond localhost and .svc</td></tr>
<tr><td class="k">--metrics-addr</td><td>0</td><td>Self-metrics listener; 0 disables</td></tr>
<tr><td class="k">ebpf.privileged</td><td>false</td><td>Fully privileged fallback for older kernels</td></tr>
<tr><td class="k">ebpf.networkFlows.enabled</td><td>false</td><td>L4 flows; DaemonSet on <code>hostNetwork</code></td></tr>
<tr><td class="k">replicaCount</td><td>1; production runs 3</td><td>Controller replicas; above 1 turns on leader election, replica gossip and a PodDisruptionBudget</td></tr>
</table></div>
</section>
<!-- 11 -->
<section id="s11">
<div class="sechead"><span class="ord">11</span><h2>OBI note</h2></div>
<p><code>third_party/obi</code> is an owned fork of OBI v0.12.2 with 11 local commits, including eBPF C changes, and is not tracked upstream; Apache-2.0 attribution stays in <code>NOTICE</code>. Its Go offsets table, used for binaries without debug info, covers Go up to 1.26.4 and grpc-go up to 1.81.1. Refresh it with OBI's tracker when new Go or grpc-go releases land, and keep scanning its <code>go.mod</code> for CVEs.</p>
</section>
<!-- 12 -->
<section id="s12">
<div class="sechead"><span class="ord">12</span><h2>FAQ</h2></div>
<details class="faq"><summary>What is the difference between the eBPF and OTLP modes?</summary>
<p>Both feed the same collectors, gates and frames; they differ in where the numbers come from. In eBPF mode the DaemonSet reads them on each node: OBI hooks see every HTTP and gRPC call without code changes, cgroup files give USE and PSI, container log files give LOG, and a socket filter adds L4 flows. In OTLP mode the triage DaemonSet does not run; an OpenTelemetry Collector pushes metrics to the controller on port 4317. RED and L7 edges come from semantic-convention histograms or span metrics, LOG from the count connector, and USE with PSI from each node's kubelet, which reads the cgroup pressure files itself and serves them on <code>/metrics/cadvisor</code>. The Collector still has to reach every node: as a DaemonSet each pod scrapes its own node's kubelet, or one Deployment discovers the nodes through the Kubernetes API and scrapes them all. The two can run side by side; where both report the same service or pod, the sensor's numbers are used.</p>
<div class="tablewrap"><table>
<tr><th></th><th>eBPF</th><th>OTLP</th></tr>
<tr><td class="k">On each node</td><td>Triage DaemonSet with <code>hostPID</code>, root, six capabilities, reading <code>/sys/fs/cgroup</code></td><td>The kubelet's own <code>/metrics/cadvisor</code>, scraped by the Collector (a DaemonSet, or one Deployment for all nodes) with <code>get</code> on <code>nodes/metrics</code></td></tr>
<tr><td class="k">Coverage</td><td>Every process on the node, any language</td><td>Only what is traced or scraped</td></tr>
<tr><td class="k">Service graph</td><td>L7 calls and L4 flows</td><td>L7 edges from client spans that name the server; no L4</td></tr>
<tr><td class="k">Needs</td><td>Kernel 5.8+, BTF, cgroup v2</td><td>A Collector with spanmetrics, a kubelet cAdvisor scrape and the count connector; Kubernetes 1.34+ for PSI</td></tr>
<tr><td class="k">Sandboxed runtimes</td><td>Mostly invisible</td><td>Seen if instrumented</td></tr>
</table></div>
<p>Measured side by side on one cluster, OTLP alone matched eBPF for USE and for RED on traced services, and kept about a tenth of the graph's edges once L4 flows were gone.</p>
</details>
<details class="faq"><summary>Can the agent run outside a cluster in OTLP-only mode?</summary>
<p>Yes, as long as it can reach a Kubernetes API. The controller loads a kubeconfig when it is not in a pod, so it runs on a laptop or a VM against any cluster it can reach. Set <code>POD_NAMESPACE</code> to the namespace that holds its Secrets, turn leader election off for a single copy, and give the kubeconfig identity the agent's RBAC, including <code>create</code> on TokenReviews when senders use tokens. Senders must reach that machine on 4317 and verify it by name, so add that name to the serving certificate with <code>--sensor-extra-names</code>; a Collector next to it is the simple setup, and every point still needs <code>k8s.namespace.name</code> to land in a tenant. A host with no Kubernetes API at all runs the Linux host mode (see the last question).</p>
</details>
<details class="faq"><summary>What sensitive information leaves the cluster?</summary>
<p>Only the frames in section 04, over the one outbound WebSocket connection to the core. They carry:</p>
<ul>
<li>names: cluster, namespace, workload, service, and pod names in USE and events;</li>
<li>aggregates per window: request, error and log counts, p99 latency, CPU, memory and PSI percentages;</li>
<li>operation names: HTTP route templates, RPC methods and the status codes seen;</li>
<li>topology edges between workloads, and the host name of a destination outside scope;</li>
<li>the message of Kubernetes Warning events;</li>
<li>one log line per service, redacted for secrets and email addresses and cut to 160 bytes (section 05);</li>
<li>sensor health and the OTLP source list; a tenant sees only its own OTLP sources, and role error text only reaches the all-tenant view.</li>
</ul>
<p>Request and response bodies, headers, raw logs, traces, environment variables and Secrets never leave. Namespaces without a tenant and objects opted out with <code>triageagent.dev/triage: "false"</code> are not sent at all.</p>
</details>
<details class="faq"><summary>Why are connectors needed?</summary>
<p>The agent sees what runs in the cluster. Some failures start outside it: a cost anomaly or a Service Health incident in the cloud provider, an alert from an existing Prometheus rule, a security finding. Connectors bring those into the same tenants and issues as events, so a cloud outage and the errors it causes in a service are correlated in one place. Each connector is a small separate deployment that posts to the core events API with its own credentials (section 09), so the agent itself needs no cloud permissions.</p>
</details>
<details class="faq"><summary>How can a Linux host be instrumented?</summary>
<p>With <code>--mode=host</code>, the agent runs as one systemd service on a VM or bare-metal host, with no Kubernetes API. The host is a cluster of one: <code>--cluster-name</code> (default the host name) names it, <code>--target-tenant</code> sets the tenant since a host has no namespaces (figure 2), and every selected systemd unit is a virtual app in one synthetic namespace (<code>--host-namespace</code>, default <code>host</code>). USE comes from each unit's cgroup, LOG from journald and log files, and RED from OBI in a build with the <code>obi</code> tag, which the release binaries are. The agent joins like a cluster: it prints a fingerprint, an admin runs <code>triagectl agent approve</code>, and the key then stays in <code>/var/lib/triage-agent/join</code>. The release carries the binaries, the unit file with the same six capabilities as the DaemonSet and a deb and rpm package; the README has the steps. Host containers (Docker, Podman) are not covered yet. Alerts from a host's existing Prometheus still arrive through <code>promevents</code>.</p>
</details>
</section>
</main>
</div>
<script>
(function () {
var links = document.querySelectorAll('.sidebar a');
var map = {};
links.forEach(function (a) { map[a.getAttribute('href').slice(1)] = a; });
var io = new IntersectionObserver(function (entries) {
entries.forEach(function (e) {
if (e.isIntersecting) {
links.forEach(function (a) { a.classList.remove('on'); });
var a = map[e.target.id]; if (a) a.classList.add('on');
}
});
}, { rootMargin: '-20% 0px -70% 0px' });
document.querySelectorAll('main section[id]').forEach(function (s) { io.observe(s); });
})();
</script>
<script>
/* Light, dependency-free highlighting for the yaml, json and protobuf blocks. */
(function () {
var esc = function (t) { return t.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); };
var str = /"(?:[^"\\\n]|\\.)*"|'[^'\n]*'/.source;
var num = /\b(?:\d+(?:\.\d+)?|true|false|null)\b/.source;
var none = '(?!)';
var spec = { // [comment, key]
yaml: [/(?<![^\s])#.*/.source, /(?<=^[ \t-]*)[\w.\/-]+(?=:(?:\s|$))/.source],
json: [none, /"(?:[^"\\\n]|\\.)*"(?=\s*:)/.source],
protobuf: [/\/\/.*/.source, none]
};
document.querySelectorAll('pre code[class*="language-"]').forEach(function (el) {
var lang = (el.className.match(/language-(\w+)/) || [])[1], s = spec[lang];
if (!s) return;
var re = new RegExp('(' + s[0] + ')|(' + s[1] + ')|(' + str + ')|(' + num + ')', 'gm');
var text = el.textContent, out = '', last = 0;
text.replace(re, function (m, c, k, st, n, off) {
out += esc(text.slice(last, off)) + '<span class="' + (c ? 'c' : k ? 'k' : st ? 's' : 'n') + '">' + esc(m) + '</span>';
last = off + m.length;
return m;
});
el.innerHTML = out + esc(text.slice(last));
});
})();
</script>
</body>
</html>