Files
NetAlertX/server
Mauricio CamayoandClaude Sonnet 5 cfde00048a DOCKERDISC v2: optional device creation for LAN-visible containers
Maps DOCKERDISC to CurrentScan (scanMac/scanCreatesDevice/scanParentMAC/
scanLastIP) so a container on a macvlan/ipvlan network can opt into
creating or confirming its own device, parented to its Docker host.
Gated by a new DOCKERDISC_CREATE_DEV setting (default off). A container
without its own MAC (bridge/overlay/etc.) never creates a device either
way - the framework's blank-scanMac guard blocks the whole group
regardless of the setting.

Reuses the existing objectPrimaryId/extra column definitions (already
host MAC / container IP) to also feed scanParentMAC/scanLastIP, so every
promoted container is auto-parented to its host with no extra plugin
logic. Two new hidden columns (helpVal1/helpVal2) carry the per-container
scanMac/scanCreatesDevice values.

Tests: 33 -> 35, both DOCKERDISC_CREATE_DEV on/off paths asserted.
Live-verified end to end against a real built image (docker-socket-proxy
+ isolated macvlan/bridge test containers), since IMPORT_ON isn't in any
released NetAlertX image yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011meLPKCzVpdZyAUfv5U6mm
2026-09-18 17:14:10 -05:00
..
2026-09-14 16:51:35 +10:00
2025-11-09 17:03:25 +00:00
2026-09-14 18:17:06 +10:00
2026-09-14 18:17:06 +10:00
2026-09-14 08:29:02 +10:00
2026-06-14 10:35:08 +10:00
2026-03-03 12:31:50 +00:00

NetAlertX modules

The original pilaert.py code is now moved to this new folder and split into different modules.

Module Description
__main__.py The MAIN program of NetAlertX
__init__.py an empty init file
README.md this readme file
../server/plugins a folder containing all plugins that publish notifications or scan for devices
api.py updating the API endpoints with the relevant data.
appevent.py TBC
const.py A place to define the constants for NetAlertX like log path or config path.
conf.py conf.py holds the configuration variables and makes them available for all modules. It is also the workaround for global variables that need to be resolved at some point
database.py This module connects to the DB, makes sure the DB is up to date and defines some standard queries and interfaces.
device.py The device module looks after the devices and saves the scan results into the devices
flows.py TBC
helper.py Helper as the name suggest contains multiple little functions and methods used in many of the other modules and helps keep things clean
initialise.py Initiatlise sets up the environment and makes everything ready to go
logger.py Logger is there the keep all the logs organised and looking identical.
networscan.py Networkscan collects the scan results (maybe to merge with reporting.py)
notification.py Creates and handles the notification object and generates ther HTML and text variants of the message
plugin.py This is where the plugins get integrated into the backend of NetAlertX
plugin_utils.py Helper utilities for plugin.py
reporting.py Reporting collects the data for the notification reports
scheduler.py All things scheduling