How nvidia/nvidia-monitor-eventing works
Project type and purpose
• This is a C++-based Linux system daemon suite (“nvidia-monitor-eventing”) for device monitoring and eventing on OpenBMC platforms.
• It comprises two primary runtime services— the main Eventing Daemon and a Device Health Service—plus a rich ecosystem of support libraries, command-line tools, and build/deploy scripts.
File structure
• Top-level build and config:
• Dockerfile, buildenv scripts, Meson build files (meson.build, meson_options.txt)
• config/eventing_config.h.in
• Core services:
• src/ and include/ – implementation and headers for the Eventing Daemon
• device-health-service/ – standalone service with its own meson.build
• Third-party libraries (subprojects): googletest, phosphor-logging, sdbusplus, sdeventplus
• Documentation (doc/), examples/, and a huge suite of tools/ (Python, shell, C++ utilities)
• Automated tests under test/
README
• Environment setup (OpenBMC SDK, Cygwin, Docker) and Meson/Ninja build steps
Main components and their interactions
a. Build & Deployment Layer
• Meson/Ninja build system
• buildenv / Docker container for isolated builds
• OpenBMC SDK as external dependency
b. Core Eventing Daemon
• eventing_main: bootstrap & sdeventplus main loop
• config_parser: read JSON schemas & configs
• data_accessor / dat_traverse: load hardware Data Access Table (DAT)
• json_proc / json_schema: JSON validation & processing
• event_detection: monitor incoming raw events (MCTP, logs)
• event_instantiator: create internal event objects
• event_handler: apply rules, enrich or filter events
• message_composer: build DBus messages (using sdbusplus APIs)
• message_dispatcher: send messages over the system bus
• logging (phosphor-logging) and threadpool for concurrency
c. Device Health Service
• Similar modular design; listens on DBus, aggregates device health, publishes status
d. External Interfaces
• system dbus (sdbusplus)
• hardware message transports (MCTP, TAL)
• OpenBMC environment & diagnostic frameworks
Architectural patterns and design principles
• Modular “pipeline” of plugins: each stage (parse → detect → handle → compose → dispatch) is a separate component
• Publisher‐subscriber model using D-Bus as the event bus
• Dependency injection via singleton/accessor patterns (dbus_singleton, tal_singleton)
• Config-driven behavior with JSON schemas
• Rectangles for services/modules
• Parallelograms for scripts/tools
• Build (gray), Core Daemons (blue), Infrastructure (green), Tools/Tests (light orange)