System Architecture¶
Layered Design¶
ezsnmp_data_logger cleanly separates SNMP protocol transport, concurrent queuing, persistent storage sinks, multi-language SWIG bindings, and user interfaces:
+-----------------------------------------------------------------------+
| Cross-Platform GUIs (Linux / macOS / Windows) |
| [Native tkinter.ttk Desktop Studio] [Browser Web Studio (HTTP)] |
+-----------------------------------+-----------------------------------+
| subprocess + JSON (--json)
v
+-----------------------------------------------------------------------+
| CLI Layer (`ezsnmp-data-logger` / `CliRunner`) |
| run | validate | probe | request | set | inspect | init-config |
+-----------------------------------+-----------------------------------+
|
+-----------------------------------v-----------------------------------+
| SWIG 4.x Universal C++17 API (`DataLogger` PIMPL Boundary) |
| Python | Node N-API | Java | C# | Go | Ruby | Perl | PHP | Lua | R |
+-----------------+-----------------------------------+-----------------+
| |
v v
+----------------------------------+ +--------------------------------+
| SNMP Polling Pool (C++17) | | Sink Writer Thread (C++17) |
| - EzSnmpPoller -> ::SessionBase |-->| BoundedQueue<Batch> |
| (get/walk/bulkwalk/set) | | -> SqliteSink (WAL) |
| - StubSnmpPoller (synthetic) | | -> CsvSink / JsonlSink |
+----------------------------------+ | -> PsqlSink (TimescaleDB) |
| -> PrometheusSink (/metrics)|
+--------------------------------+
EzSnmp SessionBase Integration¶
Rather than re-implementing Net-SNMP session or PDU handling, EzSnmpPoller instantiates ::SessionBase directly from the sibling ezsnmp C++17 codebase:
Scalar Coalescing: All
"operation": "get"metrics configured on a DUT are coalesced into a single multi-OIDSessionBase::get(std::vector<std::string>)request per polling cycle.Bulk & Tree Traversals:
getnext,walk,bulkget, andbulkwalkmetrics invokeSessionBase::get_next,walk,bulk_get, andbulk_walk, with an RAIIScopedMaxRepeatersguard applying-Cr<N>exclusively duringGETBULKPDUs.SNMP SET Support: Both scheduled metrics and on-demand CLI/GUI
setoperations invokeSessionBase::set({oid, set_type, set_value}).Lossless Metadata Storage: Every
ezsnmp::Resultpreservesoid,index(oid_index),type(snmp_type), andvalue(raw_value) alongside strongly typedi64,f64, andstr_valcolumns extracted viastd::get_ifonResult::converted_value.