ezsnmp-data-logger 2026.11.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. ezsnmp_data_logger-2026.11.3/LICENSE +21 -0
  2. ezsnmp_data_logger-2026.11.3/PKG-INFO +264 -0
  3. ezsnmp_data_logger-2026.11.3/README.rst +224 -0
  4. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/__init__.py +98 -0
  5. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/__main__.py +6 -0
  6. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/cli.py +22 -0
  7. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/__init__.py +159 -0
  8. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/__main__.py +6 -0
  9. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/cli_bridge.py +476 -0
  10. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/desktop_tk.py +1915 -0
  11. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/launcher.py +146 -0
  12. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/locale.json +494 -0
  13. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/locale_manager.py +119 -0
  14. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/server.py +267 -0
  15. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app.js +416 -0
  16. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon.icns +0 -0
  17. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon.ico +0 -0
  18. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon.png +0 -0
  19. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon_128.png +0 -0
  20. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon_16.png +0 -0
  21. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon_256.png +0 -0
  22. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon_32.png +0 -0
  23. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/app_icon_64.png +0 -0
  24. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/apple-touch-icon.png +0 -0
  25. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/ezsnmp_logo.png +0 -0
  26. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/favicon-16x16.png +0 -0
  27. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/favicon-32x32.png +0 -0
  28. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/favicon.ico +0 -0
  29. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/favicon.svg +74 -0
  30. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/icon-192x192.png +0 -0
  31. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/icon-512x512.png +0 -0
  32. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/index.html +206 -0
  33. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger/gui/static/styles.css +239 -0
  34. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger.egg-info/PKG-INFO +264 -0
  35. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger.egg-info/SOURCES.txt +53 -0
  36. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger.egg-info/dependency_links.txt +1 -0
  37. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger.egg-info/entry_points.txt +3 -0
  38. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger.egg-info/requires.txt +10 -0
  39. ezsnmp_data_logger-2026.11.3/ezsnmp_data_logger.egg-info/top_level.txt +1 -0
  40. ezsnmp_data_logger-2026.11.3/pyproject.toml +114 -0
  41. ezsnmp_data_logger-2026.11.3/setup.cfg +4 -0
  42. ezsnmp_data_logger-2026.11.3/setup.py +658 -0
  43. ezsnmp_data_logger-2026.11.3/src/cli_runner.cpp +536 -0
  44. ezsnmp_data_logger-2026.11.3/src/config.cpp +830 -0
  45. ezsnmp_data_logger-2026.11.3/src/csv_sink.cpp +121 -0
  46. ezsnmp_data_logger-2026.11.3/src/data_logger.cpp +683 -0
  47. ezsnmp_data_logger-2026.11.3/src/datatypes.cpp +270 -0
  48. ezsnmp_data_logger-2026.11.3/src/json_utils.cpp +707 -0
  49. ezsnmp_data_logger-2026.11.3/src/jsonl_sink.cpp +105 -0
  50. ezsnmp_data_logger-2026.11.3/src/prometheus_sink.cpp +302 -0
  51. ezsnmp_data_logger-2026.11.3/src/psql_sink.cpp +262 -0
  52. ezsnmp_data_logger-2026.11.3/src/sink_inspector.cpp +335 -0
  53. ezsnmp_data_logger-2026.11.3/src/snmp_poller.cpp +437 -0
  54. ezsnmp_data_logger-2026.11.3/src/sqlite_sink.cpp +278 -0
  55. ezsnmp_data_logger-2026.11.3/src/version.cpp +92 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 carlkidcrypto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,264 @@
1
+ Metadata-Version: 2.4
2
+ Name: ezsnmp-data-logger
3
+ Version: 2026.11.3
4
+ Summary: Self-contained C++17 SNMP Data Logger powered by ezsnmp with SWIG bindings (Python, Node.js, C#, Go), CLI, and cross-platform GUI.
5
+ Author: carlkidcrypto
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/carlkidcrypto/ezsnmp_data_logger
8
+ Project-URL: Documentation, https://carlkidcrypto.github.io/ezsnmp_data_logger/
9
+ Project-URL: Repository, https://github.com/carlkidcrypto/ezsnmp_data_logger
10
+ Project-URL: Issues, https://github.com/carlkidcrypto/ezsnmp_data_logger/issues
11
+ Keywords: snmp,ezsnmp,net-snmp,telemetry,data-logger,swig,c++17,gui,cli,calsemver
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Intended Audience :: Telecommunications Industry
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: C++
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: System :: Monitoring
26
+ Classifier: Topic :: System :: Networking :: Monitoring
27
+ Requires-Python: >=3.11
28
+ Description-Content-Type: text/x-rst
29
+ License-File: LICENSE
30
+ Requires-Dist: ezsnmp>=2026.10.28a0
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
33
+ Requires-Dist: black>=24.0.0; extra == "dev"
34
+ Requires-Dist: cibuildwheel[uv]>=2.22.0; extra == "dev"
35
+ Requires-Dist: yamllint>=1.35.0; extra == "dev"
36
+ Requires-Dist: sphinx>=7.0.0; extra == "dev"
37
+ Requires-Dist: furo; extra == "dev"
38
+ Requires-Dist: breathe; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ ===================
42
+ EzSnmp Data Logger
43
+ ===================
44
+
45
+ .. list-table::
46
+ :widths: auto
47
+
48
+ * - |Python Code Style|
49
+ - |Clang-format Code Style|
50
+ - |Black|
51
+ * - |Clang-format|
52
+ - |Sphinx Docs Check|
53
+ - |Tests C++ Native|
54
+ * - |Tests Python|
55
+ - |SWIG Multi-Language|
56
+ - |License|
57
+ * - |Quality Gate Status|
58
+ - |Security Rating|
59
+ - |Maintainability Rating|
60
+
61
+ .. |Python Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square
62
+ :target: https://github.com/psf/black
63
+ .. |Clang-format Code Style| image:: https://img.shields.io/badge/code%20style-clang--format-brightgreen.svg?style=flat-square
64
+ :target: https://clang.llvm.org/docs/ClangFormat.html
65
+ .. |Black| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/black.yml?style=flat-square&label=Black
66
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/black.yml
67
+ .. |Clang-format| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/clang_format.yml?style=flat-square&label=Clang-format
68
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/clang_format.yml
69
+ .. |Sphinx Docs Check| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/sphinx_build.yml?style=flat-square&label=Sphinx+Docs+Check
70
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/sphinx_build.yml
71
+ .. |Tests C++ Native| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/tests_cpp_native.yml?style=flat-square&label=Tests+C%2B%2B+Native
72
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/tests_cpp_native.yml
73
+ .. |Tests Python| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/tests_python.yml?style=flat-square&label=Tests+Python+%2B+GUI
74
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/tests_python.yml
75
+ .. |SWIG Multi-Language| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/swig_multilang.yml?style=flat-square&label=SWIG+4+Languages
76
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/swig_multilang.yml
77
+ .. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
78
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/blob/main/LICENSE
79
+ .. |Quality Gate Status| image:: https://sonarcloud.io/api/project_badges/measure?project=carlkidcrypto_ezsnmp_data_logger&metric=alert_status
80
+ :target: https://sonarcloud.io/summary/new_code?id=carlkidcrypto_ezsnmp_data_logger
81
+ :alt: Quality Gate Status
82
+ .. |Security Rating| image:: https://sonarcloud.io/api/project_badges/measure?project=carlkidcrypto_ezsnmp_data_logger&metric=security_rating
83
+ :target: https://sonarcloud.io/summary/new_code?id=carlkidcrypto_ezsnmp_data_logger
84
+ :alt: Security Rating
85
+ .. |Maintainability Rating| image:: https://sonarcloud.io/api/project_badges/measure?project=carlkidcrypto_ezsnmp_data_logger&metric=sqale_rating
86
+ :target: https://sonarcloud.io/summary/new_code?id=carlkidcrypto_ezsnmp_data_logger
87
+ :alt: Maintainability Rating
88
+
89
+ Introduction
90
+ ------------
91
+
92
+ **EzSnmp Data Logger** (``ezsnmp_data_logger``) is a **self-contained**, portable **C++17** SNMP telemetry collection and storage package built directly on top of `EzSnmp <https://github.com/carlkidcrypto/ezsnmp>`_ (standardized on the **CalSemVer** alpha stream ``ezsnmp>=2026.10.28a0``).
93
+
94
+ Every distributed language package—**Python**, **JavaScript (Node.js N-API)**, **C# (.NET 8+)**, and **Go (cgo)**—is built to be **100% self-contained** so end users never have to install extra native libraries (Net-SNMP, OpenSSL, SQLite3, or SWIG).
95
+
96
+ Key Highlights
97
+ --------------
98
+
99
+ 1. **Powered by EzSnmp ("net-snmp" Layer — CalSemVer Alpha Standardized):**
100
+ Uses ``ezsnmp``'s C++17 ``SessionBase`` and ``Result`` classes (`v2026.10.28a0`) to execute SNMPv1, SNMPv2c, and SNMPv3 (``noAuthNoPriv``, ``authNoPriv``, ``authPriv``) ``get``, ``getnext``, ``walk``, ``bulkget``, ``bulkwalk``, and ``set`` operations against Devices Under Test (DUTs), normalizing returned bindings into typed telemetry records.
101
+ 2. **Self-Contained Packages Across All 4 SWIG Target Languages:**
102
+ Statically embeds the public-domain **SQLite3** C amalgamation directly into every binary and bundles/relocates **Net-SNMP 5.10 + OpenSSL** runtime libraries inside **Python** (`cibuildwheel`), **JavaScript / Node.js N-API** (`bindings/javascript/`), **C# / .NET** (`bindings/csharp/`), and **Go** (`bindings/go/`) packages—zero external system libraries required by users!
103
+ 3. **Multi-Sink Telemetry Persistence:**
104
+ Decouples network polling from storage via a bounded queue and fans out batches to embedded **SQLite3 (WAL)**, **CSV**, **JSONL**, **PostgreSQL / TimescaleDB**, and a built-in **Prometheus HTTP** exporter (``/metrics``).
105
+ 4. **100% JSON Configuration:**
106
+ Every engine setting, DUT target, ``ezsnmp`` ``SessionBase`` parameter, storage sink, CLI option, and GUI preference lives in RFC-8259 JSON (see ``configs/``).
107
+ 5. **CLI + Behind-the-Scenes Cross-Platform GUI (Linux / macOS / Windows):**
108
+ Ships both ``ezsnmp-data-logger`` for terminal/automation workflows and two zero-external-dependency cross-platform GUIs (**Native ``tkinter.ttk`` Desktop Studio** and **Browser Web Studio**) that interact strictly with the CLI behind the scenes via subprocess + JSON, complete with a live **CLI Command Audit Log**.
109
+
110
+ Architecture Overview
111
+ ---------------------
112
+
113
+ .. code-block:: text
114
+
115
+ +-----------------------------------------------------------------------+
116
+ | JSON Configuration (configs/*.json) |
117
+ | logger + duts (ezsnmp SessionBase params) + sinks + gui |
118
+ +-----------------------------------+-----------------------------------+
119
+ |
120
+ +--------------------------------+--------------------------------+
121
+ | | |
122
+ v v v
123
+ +------------------+ +-------------------------+ +------------------+
124
+ | Cross-Platform | | ezsnmp-data-logger CLI | | 4 Self-Contained |
125
+ | GUIs (Tk & Web) |-->| init/validate/run/once | | SWIG Packages: |
126
+ | Linux/macOS/Win | | probe/request/set/... | | Python, Node.js, |
127
+ | (via CLI --json) | +------------+------------+ | C#, Go |
128
+ +------------------+ | +--------+---------+
129
+ +------------+------------+
130
+ |
131
+ v
132
+ +----------------------------------+
133
+ | Self-Contained C++17 Engine |
134
+ | EzSnmpPoller (ezsnmp::Session) |
135
+ | -> BoundedQueue<Batch> |
136
+ | -> Embedded SQLite3 / CSV / |
137
+ | JSONL / PostgreSQL / Prom |
138
+ +----------------------------------+
139
+
140
+ Installation
141
+ ------------
142
+
143
+ ``ezsnmp_data_logger`` distributes **100% self-contained** binary wheels for **macOS**, **Windows**, and **Linux** (both ``manylinux`` and ``musllinux``). Users **never need to install external Net-SNMP, OpenSSL, or SQLite3 libraries**.
144
+
145
+ macOS (Apple Silicon & Intel)
146
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
+
148
+ .. code-block:: bash
149
+
150
+ python3 -m pip install --upgrade pip
151
+ python3 -m pip install --pre "ezsnmp-data-logger>=2026.11.3"
152
+
153
+ # Install native macOS Application Launcher in ~/Applications with Retina icon:
154
+ ezsnmp-data-logger-gui --install-launcher
155
+
156
+ Windows (Windows 10 / 11 / Server)
157
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158
+
159
+ .. code-block:: powershell
160
+
161
+ py -m pip install --upgrade pip
162
+ py -m pip install --pre "ezsnmp-data-logger>=2026.11.3"
163
+
164
+ # Install Windows desktop launcher shortcut with custom icon:
165
+ ezsnmp-data-logger-gui --install-launcher
166
+
167
+ Linux (Ubuntu, Debian, Fedora, RHEL, Arch, Alpine)
168
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169
+
170
+ .. code-block:: bash
171
+
172
+ python3 -m pip install --upgrade pip
173
+ python3 -m pip install --pre "ezsnmp-data-logger>=2026.11.3"
174
+
175
+ # Install desktop launcher (.desktop) in ~/.local/share/applications/:
176
+ ezsnmp-data-logger-gui --install-launcher
177
+
178
+ CLI Usage Reference
179
+ -------------------
180
+
181
+ The ``ezsnmp-data-logger`` CLI provides unified access to the C++17 telemetry engine. Passing ``--json`` outputs structured JSON for scripting and automation.
182
+
183
+ .. code-block:: bash
184
+
185
+ # 1. Generate starter JSON configuration template ('demo', 'minimal', or 'all_sinks')
186
+ ezsnmp-data-logger init-config --template demo --output configs/my_lab.json
187
+
188
+ # 2. Validate configuration syntax, schema, and SNMP credentials
189
+ ezsnmp-data-logger validate --config configs/my_lab.json --json
190
+
191
+ # 3. Probe all configured DUTs for network reachability (non-destructive)
192
+ ezsnmp-data-logger probe --config configs/my_lab.json --json
193
+
194
+ # 4. Run an on-demand SNMP GET / WALK / BULKWALK query
195
+ ezsnmp-data-logger request --config configs/my_lab.json \
196
+ --dut edge-router-01 --op walk --oid 1.3.6.1.2.1.1 --json
197
+
198
+ # 5. Run an on-demand SNMP SET operation (ASN.1 types: i, u, s, x, d, n, o, t, a)
199
+ ezsnmp-data-logger set --config configs/my_lab.json \
200
+ --dut edge-router-01 --oid 1.3.6.1.2.1.1.4.0 --type s --value "admin@example.com" --json
201
+
202
+ # 6. Run a single polling cycle across all DUTs and exit
203
+ ezsnmp-data-logger run --config configs/my_lab.json --once --json
204
+
205
+ # 7. Run continuous polling loop with streaming NDJSON event output
206
+ ezsnmp-data-logger run --config configs/my_lab.json --interval-ms 1000 --json
207
+
208
+ # 8. Query recent stored telemetry rows from SQLite3, CSV, or JSONL sinks
209
+ ezsnmp-data-logger inspect --config configs/my_lab.json --limit 25 --json
210
+
211
+ # 9. Inspect compiled capabilities and version
212
+ ezsnmp-data-logger version --json
213
+
214
+ Cross-Platform GUI Usage (Desktop & Web Studio)
215
+ -----------------------------------------------
216
+
217
+ ``ezsnmp_data_logger`` includes two zero-external-dependency GUI frontends that interact strictly with the CLI behind the scenes:
218
+
219
+ - **Native Desktop Studio (**``tkinter.ttk``**):** Native Aqua (macOS), Win32 (Windows), and X11/Wayland (Linux) application with custom window titlebar icons, dynamic macOS Dock icon, real-time Canvas charts, and **interactive selectable series filtering (Select All, Clear All, and auto-rescaling Y-axis)**.
220
+ - **Browser Web Studio (**``HTML5/SVG``**):** Lightweight browser-based studio running on standard-library HTTP server, featuring custom vector SVG favicons and responsive series filter chips.
221
+
222
+ .. code-block:: bash
223
+
224
+ # Auto-detects display: launches native Desktop Tkinter window or Browser Studio
225
+ ezsnmp-data-logger gui --config configs/example.json
226
+
227
+ # Force Native Desktop Tkinter Studio
228
+ ezsnmp-data-logger-gui --config configs/example.json --frontend tk
229
+
230
+ # Force Browser Web Studio on http://127.0.0.1:8765
231
+ ezsnmp-data-logger-gui --config configs/example.json --frontend web --port 8765
232
+
233
+ # Run on a headless remote server (bind to all interfaces without popping browser)
234
+ ezsnmp-data-logger-gui --config configs/example.json --frontend web --host 0.0.0.0 --port 8765 --no-browser
235
+
236
+ # Switch language (e.g. Spanish 'es' or custom locale JSON)
237
+ ezsnmp-data-logger-gui --config configs/example.json --locale es
238
+
239
+ Generate SWIG Bindings (Python, Node.js, C#, Go)
240
+ ------------------------------------------------
241
+
242
+ .. code-block:: bash
243
+
244
+ python3 tools/generate_swig_bindings.py --out-dir build/swig_generated
245
+
246
+ How to Support This Project?
247
+ ----------------------------
248
+
249
+ .. image:: https://raw.githubusercontent.com/carlkidcrypto/ezsnmp/main/images/buy_me_a_coffee.png
250
+ :alt: Buy Me A Coffee
251
+
252
+ `Use this link to buy me a coffee! <https://www.buymeacoffee.com/carlkidcrypto>`__
253
+
254
+ Documentation & Contributing
255
+ ----------------------------
256
+
257
+ * **Full Documentation:** `EzSnmp Data Logger Docs <https://carlkidcrypto.github.io/ezsnmp_data_logger/>`_
258
+ * **Software Requirements:** ``sphinx_docs_build/source/software_requirements.rst``
259
+ * **AI Contribution Guide:** Please read `HOWTOAI.rst <HOWTOAI.rst>`_ before contributing with AI coding assistants.
260
+
261
+ License
262
+ -------
263
+
264
+ EzSnmp Data Logger is released under the **MIT** license. Please see `LICENSE <LICENSE>`_ for details.
@@ -0,0 +1,224 @@
1
+ ===================
2
+ EzSnmp Data Logger
3
+ ===================
4
+
5
+ .. list-table::
6
+ :widths: auto
7
+
8
+ * - |Python Code Style|
9
+ - |Clang-format Code Style|
10
+ - |Black|
11
+ * - |Clang-format|
12
+ - |Sphinx Docs Check|
13
+ - |Tests C++ Native|
14
+ * - |Tests Python|
15
+ - |SWIG Multi-Language|
16
+ - |License|
17
+ * - |Quality Gate Status|
18
+ - |Security Rating|
19
+ - |Maintainability Rating|
20
+
21
+ .. |Python Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square
22
+ :target: https://github.com/psf/black
23
+ .. |Clang-format Code Style| image:: https://img.shields.io/badge/code%20style-clang--format-brightgreen.svg?style=flat-square
24
+ :target: https://clang.llvm.org/docs/ClangFormat.html
25
+ .. |Black| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/black.yml?style=flat-square&label=Black
26
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/black.yml
27
+ .. |Clang-format| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/clang_format.yml?style=flat-square&label=Clang-format
28
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/clang_format.yml
29
+ .. |Sphinx Docs Check| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/sphinx_build.yml?style=flat-square&label=Sphinx+Docs+Check
30
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/sphinx_build.yml
31
+ .. |Tests C++ Native| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/tests_cpp_native.yml?style=flat-square&label=Tests+C%2B%2B+Native
32
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/tests_cpp_native.yml
33
+ .. |Tests Python| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/tests_python.yml?style=flat-square&label=Tests+Python+%2B+GUI
34
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/tests_python.yml
35
+ .. |SWIG Multi-Language| image:: https://img.shields.io/github/actions/workflow/status/carlkidcrypto/ezsnmp_data_logger/swig_multilang.yml?style=flat-square&label=SWIG+4+Languages
36
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/actions/workflows/swig_multilang.yml
37
+ .. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
38
+ :target: https://github.com/carlkidcrypto/ezsnmp_data_logger/blob/main/LICENSE
39
+ .. |Quality Gate Status| image:: https://sonarcloud.io/api/project_badges/measure?project=carlkidcrypto_ezsnmp_data_logger&metric=alert_status
40
+ :target: https://sonarcloud.io/summary/new_code?id=carlkidcrypto_ezsnmp_data_logger
41
+ :alt: Quality Gate Status
42
+ .. |Security Rating| image:: https://sonarcloud.io/api/project_badges/measure?project=carlkidcrypto_ezsnmp_data_logger&metric=security_rating
43
+ :target: https://sonarcloud.io/summary/new_code?id=carlkidcrypto_ezsnmp_data_logger
44
+ :alt: Security Rating
45
+ .. |Maintainability Rating| image:: https://sonarcloud.io/api/project_badges/measure?project=carlkidcrypto_ezsnmp_data_logger&metric=sqale_rating
46
+ :target: https://sonarcloud.io/summary/new_code?id=carlkidcrypto_ezsnmp_data_logger
47
+ :alt: Maintainability Rating
48
+
49
+ Introduction
50
+ ------------
51
+
52
+ **EzSnmp Data Logger** (``ezsnmp_data_logger``) is a **self-contained**, portable **C++17** SNMP telemetry collection and storage package built directly on top of `EzSnmp <https://github.com/carlkidcrypto/ezsnmp>`_ (standardized on the **CalSemVer** alpha stream ``ezsnmp>=2026.10.28a0``).
53
+
54
+ Every distributed language package—**Python**, **JavaScript (Node.js N-API)**, **C# (.NET 8+)**, and **Go (cgo)**—is built to be **100% self-contained** so end users never have to install extra native libraries (Net-SNMP, OpenSSL, SQLite3, or SWIG).
55
+
56
+ Key Highlights
57
+ --------------
58
+
59
+ 1. **Powered by EzSnmp ("net-snmp" Layer — CalSemVer Alpha Standardized):**
60
+ Uses ``ezsnmp``'s C++17 ``SessionBase`` and ``Result`` classes (`v2026.10.28a0`) to execute SNMPv1, SNMPv2c, and SNMPv3 (``noAuthNoPriv``, ``authNoPriv``, ``authPriv``) ``get``, ``getnext``, ``walk``, ``bulkget``, ``bulkwalk``, and ``set`` operations against Devices Under Test (DUTs), normalizing returned bindings into typed telemetry records.
61
+ 2. **Self-Contained Packages Across All 4 SWIG Target Languages:**
62
+ Statically embeds the public-domain **SQLite3** C amalgamation directly into every binary and bundles/relocates **Net-SNMP 5.10 + OpenSSL** runtime libraries inside **Python** (`cibuildwheel`), **JavaScript / Node.js N-API** (`bindings/javascript/`), **C# / .NET** (`bindings/csharp/`), and **Go** (`bindings/go/`) packages—zero external system libraries required by users!
63
+ 3. **Multi-Sink Telemetry Persistence:**
64
+ Decouples network polling from storage via a bounded queue and fans out batches to embedded **SQLite3 (WAL)**, **CSV**, **JSONL**, **PostgreSQL / TimescaleDB**, and a built-in **Prometheus HTTP** exporter (``/metrics``).
65
+ 4. **100% JSON Configuration:**
66
+ Every engine setting, DUT target, ``ezsnmp`` ``SessionBase`` parameter, storage sink, CLI option, and GUI preference lives in RFC-8259 JSON (see ``configs/``).
67
+ 5. **CLI + Behind-the-Scenes Cross-Platform GUI (Linux / macOS / Windows):**
68
+ Ships both ``ezsnmp-data-logger`` for terminal/automation workflows and two zero-external-dependency cross-platform GUIs (**Native ``tkinter.ttk`` Desktop Studio** and **Browser Web Studio**) that interact strictly with the CLI behind the scenes via subprocess + JSON, complete with a live **CLI Command Audit Log**.
69
+
70
+ Architecture Overview
71
+ ---------------------
72
+
73
+ .. code-block:: text
74
+
75
+ +-----------------------------------------------------------------------+
76
+ | JSON Configuration (configs/*.json) |
77
+ | logger + duts (ezsnmp SessionBase params) + sinks + gui |
78
+ +-----------------------------------+-----------------------------------+
79
+ |
80
+ +--------------------------------+--------------------------------+
81
+ | | |
82
+ v v v
83
+ +------------------+ +-------------------------+ +------------------+
84
+ | Cross-Platform | | ezsnmp-data-logger CLI | | 4 Self-Contained |
85
+ | GUIs (Tk & Web) |-->| init/validate/run/once | | SWIG Packages: |
86
+ | Linux/macOS/Win | | probe/request/set/... | | Python, Node.js, |
87
+ | (via CLI --json) | +------------+------------+ | C#, Go |
88
+ +------------------+ | +--------+---------+
89
+ +------------+------------+
90
+ |
91
+ v
92
+ +----------------------------------+
93
+ | Self-Contained C++17 Engine |
94
+ | EzSnmpPoller (ezsnmp::Session) |
95
+ | -> BoundedQueue<Batch> |
96
+ | -> Embedded SQLite3 / CSV / |
97
+ | JSONL / PostgreSQL / Prom |
98
+ +----------------------------------+
99
+
100
+ Installation
101
+ ------------
102
+
103
+ ``ezsnmp_data_logger`` distributes **100% self-contained** binary wheels for **macOS**, **Windows**, and **Linux** (both ``manylinux`` and ``musllinux``). Users **never need to install external Net-SNMP, OpenSSL, or SQLite3 libraries**.
104
+
105
+ macOS (Apple Silicon & Intel)
106
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
107
+
108
+ .. code-block:: bash
109
+
110
+ python3 -m pip install --upgrade pip
111
+ python3 -m pip install --pre "ezsnmp-data-logger>=2026.11.3"
112
+
113
+ # Install native macOS Application Launcher in ~/Applications with Retina icon:
114
+ ezsnmp-data-logger-gui --install-launcher
115
+
116
+ Windows (Windows 10 / 11 / Server)
117
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118
+
119
+ .. code-block:: powershell
120
+
121
+ py -m pip install --upgrade pip
122
+ py -m pip install --pre "ezsnmp-data-logger>=2026.11.3"
123
+
124
+ # Install Windows desktop launcher shortcut with custom icon:
125
+ ezsnmp-data-logger-gui --install-launcher
126
+
127
+ Linux (Ubuntu, Debian, Fedora, RHEL, Arch, Alpine)
128
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129
+
130
+ .. code-block:: bash
131
+
132
+ python3 -m pip install --upgrade pip
133
+ python3 -m pip install --pre "ezsnmp-data-logger>=2026.11.3"
134
+
135
+ # Install desktop launcher (.desktop) in ~/.local/share/applications/:
136
+ ezsnmp-data-logger-gui --install-launcher
137
+
138
+ CLI Usage Reference
139
+ -------------------
140
+
141
+ The ``ezsnmp-data-logger`` CLI provides unified access to the C++17 telemetry engine. Passing ``--json`` outputs structured JSON for scripting and automation.
142
+
143
+ .. code-block:: bash
144
+
145
+ # 1. Generate starter JSON configuration template ('demo', 'minimal', or 'all_sinks')
146
+ ezsnmp-data-logger init-config --template demo --output configs/my_lab.json
147
+
148
+ # 2. Validate configuration syntax, schema, and SNMP credentials
149
+ ezsnmp-data-logger validate --config configs/my_lab.json --json
150
+
151
+ # 3. Probe all configured DUTs for network reachability (non-destructive)
152
+ ezsnmp-data-logger probe --config configs/my_lab.json --json
153
+
154
+ # 4. Run an on-demand SNMP GET / WALK / BULKWALK query
155
+ ezsnmp-data-logger request --config configs/my_lab.json \
156
+ --dut edge-router-01 --op walk --oid 1.3.6.1.2.1.1 --json
157
+
158
+ # 5. Run an on-demand SNMP SET operation (ASN.1 types: i, u, s, x, d, n, o, t, a)
159
+ ezsnmp-data-logger set --config configs/my_lab.json \
160
+ --dut edge-router-01 --oid 1.3.6.1.2.1.1.4.0 --type s --value "admin@example.com" --json
161
+
162
+ # 6. Run a single polling cycle across all DUTs and exit
163
+ ezsnmp-data-logger run --config configs/my_lab.json --once --json
164
+
165
+ # 7. Run continuous polling loop with streaming NDJSON event output
166
+ ezsnmp-data-logger run --config configs/my_lab.json --interval-ms 1000 --json
167
+
168
+ # 8. Query recent stored telemetry rows from SQLite3, CSV, or JSONL sinks
169
+ ezsnmp-data-logger inspect --config configs/my_lab.json --limit 25 --json
170
+
171
+ # 9. Inspect compiled capabilities and version
172
+ ezsnmp-data-logger version --json
173
+
174
+ Cross-Platform GUI Usage (Desktop & Web Studio)
175
+ -----------------------------------------------
176
+
177
+ ``ezsnmp_data_logger`` includes two zero-external-dependency GUI frontends that interact strictly with the CLI behind the scenes:
178
+
179
+ - **Native Desktop Studio (**``tkinter.ttk``**):** Native Aqua (macOS), Win32 (Windows), and X11/Wayland (Linux) application with custom window titlebar icons, dynamic macOS Dock icon, real-time Canvas charts, and **interactive selectable series filtering (Select All, Clear All, and auto-rescaling Y-axis)**.
180
+ - **Browser Web Studio (**``HTML5/SVG``**):** Lightweight browser-based studio running on standard-library HTTP server, featuring custom vector SVG favicons and responsive series filter chips.
181
+
182
+ .. code-block:: bash
183
+
184
+ # Auto-detects display: launches native Desktop Tkinter window or Browser Studio
185
+ ezsnmp-data-logger gui --config configs/example.json
186
+
187
+ # Force Native Desktop Tkinter Studio
188
+ ezsnmp-data-logger-gui --config configs/example.json --frontend tk
189
+
190
+ # Force Browser Web Studio on http://127.0.0.1:8765
191
+ ezsnmp-data-logger-gui --config configs/example.json --frontend web --port 8765
192
+
193
+ # Run on a headless remote server (bind to all interfaces without popping browser)
194
+ ezsnmp-data-logger-gui --config configs/example.json --frontend web --host 0.0.0.0 --port 8765 --no-browser
195
+
196
+ # Switch language (e.g. Spanish 'es' or custom locale JSON)
197
+ ezsnmp-data-logger-gui --config configs/example.json --locale es
198
+
199
+ Generate SWIG Bindings (Python, Node.js, C#, Go)
200
+ ------------------------------------------------
201
+
202
+ .. code-block:: bash
203
+
204
+ python3 tools/generate_swig_bindings.py --out-dir build/swig_generated
205
+
206
+ How to Support This Project?
207
+ ----------------------------
208
+
209
+ .. image:: https://raw.githubusercontent.com/carlkidcrypto/ezsnmp/main/images/buy_me_a_coffee.png
210
+ :alt: Buy Me A Coffee
211
+
212
+ `Use this link to buy me a coffee! <https://www.buymeacoffee.com/carlkidcrypto>`__
213
+
214
+ Documentation & Contributing
215
+ ----------------------------
216
+
217
+ * **Full Documentation:** `EzSnmp Data Logger Docs <https://carlkidcrypto.github.io/ezsnmp_data_logger/>`_
218
+ * **Software Requirements:** ``sphinx_docs_build/source/software_requirements.rst``
219
+ * **AI Contribution Guide:** Please read `HOWTOAI.rst <HOWTOAI.rst>`_ before contributing with AI coding assistants.
220
+
221
+ License
222
+ -------
223
+
224
+ EzSnmp Data Logger is released under the **MIT** license. Please see `LICENSE <LICENSE>`_ for details.
@@ -0,0 +1,98 @@
1
+ """ezsnmp_data_logger: C++17 SNMP Data Logger powered by ezsnmp with SWIG bindings."""
2
+
3
+ from .ezsnmp_data_logger import (
4
+ Batch,
5
+ BatchVector,
6
+ CliResult,
7
+ CliRunner,
8
+ DataLogger,
9
+ DutConfig,
10
+ DutConfigVector,
11
+ DutProbeResult,
12
+ DutProbeResultVector,
13
+ GuiConfig,
14
+ InspectRow,
15
+ InspectRowVector,
16
+ LoggerConfig,
17
+ LoggerRuntimeConfig,
18
+ LoggerStats,
19
+ MetricConfig,
20
+ MetricConfigVector,
21
+ Sample,
22
+ SampleVector,
23
+ SinkConfig,
24
+ SinkConfigVector,
25
+ SnmpConfig,
26
+ StringVector,
27
+ TypeTag_Float64,
28
+ TypeTag_Int64,
29
+ TypeTag_Null,
30
+ TypeTag_Str,
31
+ ValidationReport,
32
+ build_info_json,
33
+ config_json_schema,
34
+ ezsnmp_target_version,
35
+ generate_template_config_json,
36
+ has_embedded_sqlite3,
37
+ has_ezsnmp_support,
38
+ has_psql_support,
39
+ has_sqlite3_support,
40
+ is_valid_calsemver,
41
+ parse_config,
42
+ parse_config_file,
43
+ supported_swig_languages,
44
+ type_tag_to_string,
45
+ validate_config,
46
+ validate_config_file,
47
+ version,
48
+ )
49
+
50
+ __version__ = "2026.11.3"
51
+
52
+ __all__ = [
53
+ "__version__",
54
+ "Batch",
55
+ "BatchVector",
56
+ "CliResult",
57
+ "CliRunner",
58
+ "DataLogger",
59
+ "DutConfig",
60
+ "DutConfigVector",
61
+ "DutProbeResult",
62
+ "DutProbeResultVector",
63
+ "GuiConfig",
64
+ "InspectRow",
65
+ "InspectRowVector",
66
+ "LoggerConfig",
67
+ "LoggerRuntimeConfig",
68
+ "LoggerStats",
69
+ "MetricConfig",
70
+ "MetricConfigVector",
71
+ "Sample",
72
+ "SampleVector",
73
+ "SinkConfig",
74
+ "SinkConfigVector",
75
+ "SnmpConfig",
76
+ "StringVector",
77
+ "TypeTag_Float64",
78
+ "TypeTag_Int64",
79
+ "TypeTag_Null",
80
+ "TypeTag_Str",
81
+ "ValidationReport",
82
+ "build_info_json",
83
+ "config_json_schema",
84
+ "ezsnmp_target_version",
85
+ "generate_template_config_json",
86
+ "has_embedded_sqlite3",
87
+ "has_ezsnmp_support",
88
+ "has_psql_support",
89
+ "has_sqlite3_support",
90
+ "is_valid_calsemver",
91
+ "parse_config",
92
+ "parse_config_file",
93
+ "supported_swig_languages",
94
+ "type_tag_to_string",
95
+ "validate_config",
96
+ "validate_config_file",
97
+ "version",
98
+ ]
@@ -0,0 +1,6 @@
1
+ """Allow running `python -m ezsnmp_data_logger <subcommand> ...`."""
2
+
3
+ from .cli import main
4
+
5
+ if __name__ == "__main__":
6
+ raise SystemExit(main())
@@ -0,0 +1,22 @@
1
+ """Command-line entry point for ezsnmp_data_logger (delegates to C++17 CliRunner or GUI)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from .ezsnmp_data_logger import CliRunner, StringVector
8
+
9
+
10
+ def main(argv: list[str] | None = None) -> int:
11
+ """Execute the ezsnmp_data_logger CLI or launch the cross-platform GUI."""
12
+ args = list(sys.argv[1:] if argv is None else argv)
13
+ if args and args[0] == "gui":
14
+ from .gui import main as gui_main
15
+
16
+ return gui_main(args[1:])
17
+ vec = StringVector(args)
18
+ return int(CliRunner.run(vec))
19
+
20
+
21
+ if __name__ == "__main__":
22
+ raise SystemExit(main())