Commit 5b8b02d
authored
[cuebot/pycue/proto/sandbox/docs] Add full event-driven monitoring stack, enhance metrics, dashboards, and documentation (#2086)
**Link the Issue(s) this Pull Request is related to.**
- #2085
**Summarize your change.**
[cuebot/pycue/proto/rust/sandbox/docs] Add event-driven monitoring stack
for OpenCue
Implement event-driven monitoring infrastructure enabling real-time and
historical analysis of render farm activity. Adds a Kafka +
Elasticsearch pipeline for collecting job, layer, frame, host, and proc
lifecycle events, with Prometheus and Grafana integration for live
dashboards and operational visibility.
Proto & Event Model:
- Define monitoring.proto with job/layer/frame/host/proc lifecycle
events
- Use proto composition pattern - embed Job, Layer, Frame, Host messages
- Exclude HostReportEvent from pipeline (too high frequency for
Kafka/ES)
Cuebot Event Publishing:
- Add KafkaEventPublisher for async event publishing to Kafka topics
- Add KafkaAdminClient for topic creation with configurable
partitions/retention
- Add MonitoringEventBuilder as Spring-managed bean for event
construction
- Hook publishing into FrameCompleteHandler, HostReportHandler,
DispatchSupportService, JobManagerSupport, DependManagerService
- Publish pickup time tracking events (FRAME_STARTED, FRAME_DISPATCHED)
- Add isFrameDispatchable() to DependDao for dependency checking
Prometheus Metrics:
- cue_frames_completed_total (with show, shot, state labels)
- cue_jobs_completed_total (with show, shot, state labels)
- cue_job_core_seconds histogram
- cue_layer_max_runtime_seconds histogram
- cue_layer_max_memory_bytes histogram
Rust monitoring-indexer Service:
- Add rust/crates/monitoring-indexer: standalone Kafka-to-Elasticsearch
indexer
- Async Kafka consumer with configurable batch processing
- Elasticsearch bulk indexing with date-based indices and field mappings
- Parallel event processing using rayon for CPU-bound operations
- Index templates for all event types (job, layer, frame, host, proc)
- Graceful handling of UnknownTopicOrPartition during startup
gRPC & PyCue:
- Add MonitoringInterface gRPC service
- Implement pycue monitoring wrapper with historical data API methods
Infrastructure (docker-compose.monitoring-full.yml):
- Zookeeper, Kafka, Kafka UI
- Elasticsearch, Kibana
- Prometheus (with cuebot scrape config)
- Grafana (with provisioned dashboard)
- monitoring-indexer service
Grafana Dashboard:
- Frame completion rates by state (DEAD/red, SUCCEEDED/green,
WAITING/yellow)
- Job completion by show
- Frame runtime and memory distribution
- Job core seconds distribution
- Pickup time metrics (FRAME_STARTED/FRAME_DISPATCHED)
- Layer max runtime/memory panels
Documentation:
- Architecture, concepts, and pipeline explanation
- Deployment and Quick Start guides
- User and Developer guides
- API Reference and tutorials
- Elasticsearch query reference guide
Utilities:
- sandbox/monitor_events.py: Example Kafka consumer
- sandbox/load_test_jobs.py: Test data generator with CLI args
Configuration (opt-in, disabled by default):
- monitoring.kafka.enabled, monitoring.kafka.bootstrap.servers
- monitoring.kafka.topic.partitions, .replication.factor, .retention.ms
- monitoring.elasticsearch.enabled, monitoring.elasticsearch.host
---------
Signed-off-by: Ramon Figueiredo <[email protected]>1 parent 74683bd commit 5b8b02d
File tree
148 files changed
+10345
-244
lines changed- cuebot
- src
- main
- java/com/imageworks/spcue
- config
- dao
- postgres
- dispatcher
- monitoring
- servant
- service
- resources
- conf/spring
- test/java/com/imageworks/spcue
- config
- test/monitoring
- docs
- _docs
- concepts
- developer-guide
- getting-started
- other-guides
- quick-starts
- reference
- commands
- tools
- tutorials
- user-guides
- assets/images/opencue_monitoring
- proto/src
- pycue/opencue
- wrappers
- rust
- config
- crates/monitoring-indexer
- src
- sandbox
- config
- grafana
- dashboards
- provisioning/datasources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
148 files changed
+10345
-244
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| |||
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
70 | | - | |
| 81 | + | |
| 82 | + | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
75 | | - | |
| 87 | + | |
| 88 | + | |
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
Lines changed: 108 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 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 | + | |
122 | 154 | | |
123 | 155 | | |
124 | 156 | | |
| |||
269 | 301 | | |
270 | 302 | | |
271 | 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 | + | |
272 | 380 | | |
273 | 381 | | |
274 | 382 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
197 | 205 | | |
198 | 206 | | |
199 | 207 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
218 | 227 | | |
219 | 228 | | |
220 | 229 | | |
| |||
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| 433 | + | |
432 | 434 | | |
433 | 435 | | |
434 | 436 | | |
| |||
0 commit comments