Skip to content

Commit 1ede51c

Browse files
authored
Merge pull request #1658 from netalertx/next_release
Next release
2 parents 494340a + 1094ef3 commit 1ede51c

9 files changed

Lines changed: 189 additions & 31 deletions

File tree

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
</details>
2222

2323

24-
Centralized network visibility and continuous asset discovery.
24+
Centralized network visibility and continuous asset discovery for homelabs, IT teams, MSPs, and distributed environments.
2525

26-
Monitor devices, detect change, and stay aware across distributed networks.
26+
Monitor devices, detect change, and maintain visibility across remote sites, VLANs, branch offices, and segmented networks from a single interface.
2727

28-
NetAlertX provides a centralized "Source of Truth" (NSoT) for network infrastructure. Maintain a real-time inventory of every connected device, identify Shadow IT and unauthorized hardware to maintain regulatory compliance, and automate compliance workflows across distributed sites.
28+
NetAlertX provides a centralized "Source of Truth" (NSoT) for network infrastructure. Maintain a real-time inventory of connected devices, identify Shadow IT and unauthorized hardware, support compliance initiatives, and automate operational workflows across distributed customer environments.
2929

30-
NetAlertX is designed to bridge the gap between simple network scanning and complex SIEM tools, providing actionable insights without the overhead.
30+
Designed to bridge the gap between simple network scanners and complex SIEM platforms, NetAlertX delivers actionable network intelligence and centralized monitoring without the operational overhead.
3131

3232

3333
## Table of Contents
@@ -98,6 +98,10 @@ build your own scanners with the [Plugin system](https://docs.netalertx.com/PLUG
9898

9999
The [workflows module](https://docs.netalertx.com/WORKFLOWS) automates IT governance by enforcing device categorization and cleanup policies. Whether you need to assign newly discovered devices to a specific Network Node, auto-group devices from a given vendor, unarchive a device if detected online, or automatically delete devices, this module provides the flexibility to tailor the automations to your needs.
100100

101+
### MSP & Multi-Site Monitoring
102+
103+
NetAlertX enables centralized monitoring across remote sites and isolated environments through Sync Nodes for VLANs and branch offices, providing unified visibility of assets across multiple networks. It supports [NOC-style wallboard dashboards](https://docs.netalertx.com/ADVISORY_EYES_ON_GLASS/), [Prometheus metrics export](https://docs.netalertx.com/API_METRICS/), workflow automation for device governance, and distributed discovery with centralized alerting for scalable network operations.
104+
101105

102106
## Documentation
103107
<!--- --------------------------------------------------------------------- --->
@@ -126,6 +130,15 @@ Compliance & Hardening:
126130

127131
See [Security Best Practices](https://github.com/netalertx/NetAlertX/security) for more details.
128132

133+
## Designed for MSPs, NOCs & Distributed Networks
134+
135+
NetAlertX supports centralized monitoring across VLANs, branch offices, customer environments, isolated networks, and remote sites.
136+
137+
Using [Sync Nodes](https://docs.netalertx.com/ADVISORY_MULTI_SITE_MONITORING), distributed collectors securely send device inventory and network visibility data back to a central hub, enabling unified monitoring, alerting, and asset tracking across all locations.
138+
139+
This provides MSPs and NOCs with a single operational view of many independent networks, without requiring direct access or centralized scanning infrastructure.
140+
141+
Common deployments include MSP wallboards, NOC dashboards, multi-site inventory monitoring, and remote office discovery.
129142

130143
## FAQ
131144

docs/ADVISORY_MULTI_NETWORK.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Effective multi-network monitoring starts with understanding how NetAlertX "sees
88
* **B. Plan Subnet & Scan Interfaces:** Explicitly configure each accessible segment in `SCAN_SUBNETS` with the corresponding interfaces.
99
* **C. Remote & Inaccessible Networks:** For networks unreachable via ARP, use these strategies:
1010
* **Alternate Plugins:** Supplement discovery with [SNMPDSC](SNMPDSC) or [DHCP lease imports](https://docs.netalertx.com/PLUGINS/?h=DHCPLSS#available-plugins).
11-
* **Centralized Multi-Tenant Management using Sync Nodes:** Run secondary NetAlertX instances on isolated networks and aggregate data using the **SYNC plugin**. Use the [`SYNC_BEHAVIOR`](../front/plugins/sync/README.md#hub-device-write-behavior-sync_behavior) setting on the hub to control whether the hub inherits device config from nodes or manages it independently.
11+
* **Sync Hub for MSP & Multi-Site Deployments:** Run secondary NetAlertX instances on isolated networks and aggregate data using the **SYNC plugin**. Use the [`SYNC_BEHAVIOR`](https://github.com/netalertx/NetAlertX/tree/main/front/plugins/sync/README.md#hub-device-write-behavior-sync_behavior) setting on the hub to control whether the hub inherits device config from nodes or manages it independently.
1212
* **Manual Entry:** For static assets where only ICMP (ping) status is needed.
1313

1414
> [!TIP]
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# MSP & Multi-Site Monitoring with NetAlertX
2+
3+
NetAlertX supports centralized monitoring across remote sites, customer environments, branch offices, VLANs, and isolated networks using distributed Sync Nodes.
4+
5+
Deploy lightweight NetAlertX instances inside remote or segmented networks, then securely aggregate device inventory and network visibility data into a central hub for unified monitoring, alerting, and asset management.
6+
7+
![Sync Hub Setup Diagram](https://raw.githubusercontent.com/netalertx/NetAlertX/refs/heads/main/front/plugins/sync/sync_hub.png)
8+
9+
---
10+
11+
## Common MSP & Multi-Site Use Cases
12+
13+
### Managed Service Providers (MSPs)
14+
15+
Monitor multiple customer environments from a centralized dashboard while keeping scanning local to each customer site.
16+
17+
Typical deployments include:
18+
19+
* Customer branch offices
20+
* Retail stores
21+
* Warehouses
22+
* Small business environments
23+
* Segmented enterprise VLANs
24+
25+
### Network Operations Centers (NOCs)
26+
27+
Create centralized "Eyes on Glass" monitoring dashboards using synchronized remote collectors.
28+
29+
Common NOC setups include:
30+
31+
* [Wallboard dashboards](./ADVISORY_EYES_ON_GLASS.md)
32+
* Dedicated "Down Devices" views
33+
* Site-(node)specific monitoring filters
34+
* [Prometheus/Grafana integrations](./API_METRICS.md)
35+
36+
### Isolated or Restricted Networks
37+
38+
Some environments cannot be scanned directly due to:
39+
40+
* VLAN isolation
41+
* Firewalls
42+
* VPN segmentation
43+
* Layer 2 limitations
44+
* Remote WAN locations
45+
46+
[Sync Nodes](./REMOTE_NETWORKS.md) solve this by running discovery locally and forwarding only inventory and monitoring data to the hub.
47+
48+
---
49+
50+
# Architecture Overview
51+
52+
NetAlertX supports distributed monitoring using two primary roles:
53+
54+
| Role | Purpose |
55+
| -------- | ----------------------------------------------------------- |
56+
| **Hub** | Centralized monitoring, alerting, dashboards, and inventory |
57+
| **Node** | Remote collector performing local network discovery |
58+
59+
Each node scans its local network and synchronizes device data back to the hub.
60+
61+
---
62+
63+
# Sync Modes
64+
65+
NetAlertX supports both PUSH and PULL synchronization models.
66+
67+
| Mode | Description |
68+
| -------- | -------------------------------------------------- |
69+
| **PUSH** | Nodes send inventory data directly to the hub |
70+
| **PULL** | The hub retrieves inventory data from remote nodes |
71+
72+
PUSH mode is typically recommended for MSP deployments because remote customer environments often block inbound access.
73+
74+
---
75+
76+
# Device Ownership Models (`SYNC_BEHAVIOR`) in PULL mode
77+
78+
The hub can operate in different synchronization ownership modes depending on your operational requirements.
79+
80+
| Mode | Best For |
81+
| -------------- | -------------------------------------------------------------------- |
82+
| `copy-new` | MSP environments where the hub becomes the long-term source of truth |
83+
| `carbon-copy` | Fully managed remote appliances where nodes remain authoritative |
84+
| `hub-defaults` | Centralized inventory management with hub-defined policies |
85+
86+
This flexibility allows NetAlertX to support both:
87+
88+
* centrally managed environments
89+
* distributed autonomous sites
90+
91+
---
92+
93+
# Example Deployment
94+
95+
## Multi-Site MSP Deployment
96+
97+
```text
98+
Customer Site A ─┐
99+
Customer Site B ─┼──► Central NetAlertX Hub
100+
Customer Site C ─┘
101+
```
102+
103+
Each customer site runs a lightweight NetAlertX node locally.
104+
105+
The central hub:
106+
107+
* aggregates inventory
108+
* handles alerting
109+
* provides dashboards
110+
* exports metrics
111+
* integrates with Grafana or external systems
112+
113+
---
114+
115+
# Recommended MSP Features
116+
117+
For best results in multi-site environments:
118+
119+
* Configure descriptive `SYNC_node_name` values
120+
* Use Workflows to auto-tag devices by location/site
121+
* Use predefined "Down Devices" dashboards
122+
* Enable Prometheus metrics export
123+
* Use UI Filters to create site-specific views
124+
* Configure notification throttling to reduce alert fatigue
125+
126+
---
127+
128+
# Related Documentation
129+
130+
* [Remote Networks](./REMOTE_NETWORKS.md)
131+
* [Sync Hub Plugin](../front/plugins/sync/README.md)
132+
* [Workflows](./WORKFLOWS.md)
133+
* [Metrics API](./API_METRICS.md)
134+
* [Eyes on Glass / NOC Dashboard](./ADVISORY_EYES_ON_GLASS.md)
135+
136+
---
137+
138+
# Summary
139+
140+
NetAlertX enables lightweight, centralized monitoring across distributed networks without the operational overhead of traditional enterprise monitoring platforms.
141+
142+
By combining distributed Sync Nodes with centralized dashboards, alerting, and workflows, NetAlertX can function as:
143+
144+
* a multi-site monitoring platform
145+
* an MSP inventory dashboard
146+
* a lightweight NOC monitoring solution
147+
* a centralized network visibility platform for segmented environments

docs/API_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,5 @@ The `SYNC_BEHAVIOR` setting controls how the hub writes devices received from no
135135
| `carbon-copy` | | All MACs every sync (UPSERT) |
136136
| `hub-defaults` | | None — hub pipeline handles it |
137137

138-
For full details and per-mode behaviour, see [SYNC plugin README — Hub Device-Write Behavior](../front/plugins/sync/README.md#hub-device-write-behavior-sync_behavior).
138+
For full details and per-mode behaviour, see [SYNC plugin README — Hub Device-Write Behavior](https://github.com/netalertx/NetAlertX/tree/main/front/plugins/sync/README.md#hub-device-write-behavior-sync_behavior).
139139

docs/REMOTE_NETWORKS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You can use supplementary plugins that employ alternate methods. Protocols used
4646
If you have servers in different networks, you can set up separate NetAlertX instances on those subnets and synchronize the results into one instance using the [`SYNC` plugin](https://github.com/netalertx/NetAlertX/tree/main/front/plugins/sync).
4747

4848
> [!TIP]
49-
> The [`SYNC_BEHAVIOR`](../front/plugins/sync/README.md#hub-device-write-behavior-sync_behavior) setting controls how the hub handles newly discovered devices from nodes - whether it inherits node config, overwrites on every sync, or applies its own NEWDEV defaults.
49+
> The [`SYNC_BEHAVIOR`](https://github.com/netalertx/NetAlertX/tree/main/front/plugins/sync/README.md#hub-device-write-behavior-sync_behavior) setting controls how the hub handles newly discovered devices from nodes - whether it inherits node config, overwrites on every sync, or applies its own NEWDEV defaults.
5050
5151
### Manual Entry
5252

front/plugins/sync/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Overview
1+
## Overview: Sync Hub for MSP & Multi-Site Deployments
22

33
The synchronization plugin is designed to synchronize data across multiple instances of the app. It supports the following data synchronization modes:
44

@@ -53,7 +53,7 @@ The plugin operates in three different modes based on the configuration settings
5353
- **Schedule** `[n,h]`: `SYNC_RUN_SCHD`
5454
- **Encryption Key** `[n,h]`: `SYNC_encryption_key`
5555
- **Nodes to Pull From** `[h]`: `SYNC_nodes` + `GRAPHQL_PORT` of the source nodes
56-
- **Hub Behavior** `[h]`: `SYNC_BEHAVIOR` controls how the hub writes devices received from nodes (see [below](#hub-device-write-behavior-sync_behavior))
56+
- **Hub Behavior** `[h]`: `SYNC_BEHAVIOR` - controls how the hub writes devices received from nodes (see [below](#hub-device-write-behavior-sync_behavior))
5757

5858
### Usage
5959

@@ -73,7 +73,7 @@ The plugin operates in three different modes based on the configuration settings
7373

7474
### Hub Device-Write Behavior (`SYNC_BEHAVIOR`)
7575

76-
The `SYNC_BEHAVIOR` setting configured on the **hub only** controls how the hub writes devices received from nodes.
76+
The `SYNC_BEHAVIOR` setting - configured on the **hub only** - controls how the hub writes devices received from nodes.
7777

7878
| Value | Default? | Devices written | Source of truth | Recommended when |
7979
|---|---|---|---|---|

front/plugins/sync/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@
625625
"description": [
626626
{
627627
"language_code": "en_us",
628-
"string": "Controls how the hub handles devices received from nodes.<br><br><b>copy-new</b> (default): New devices are inserted using the node's existing configuration (name, alert settings, etc.). Subsequent node-side changes only update empty fields on the hub. Recommended: customize devices on the hub after first discovery.<br><br><b>carbon-copy</b>: All devices are upserted on every sync — the node is fully authoritative and its values overwrite <i>all</i> hub fields on every sync, including fields with <code>USER</code> or <code>LOCKED</code> source. Do not customize devices on the hub.<br><br><b>hub-defaults</b>: The hub skips the direct INSERT and creates new devices through its own pipeline, applying NEWDEV defaults. The hub is the source of truth; nodes contribute presence data only. Recommended: manage all device settings on the hub."
628+
"string": "Controls how the hub handles devices from nodes.<br><br><b>copy-new</b> (default): New devices inherit settings from the node. Later syncs only fill empty hub fields.<br><i>Recommended: manage devices on the hub after first sync.</i><br><br><b>carbon-copy</b>: Node settings overwrite all hub fields on every sync.<br><i>Recommended: do not customize devices on the hub.</i><br><br><b>hub-defaults</b>: Nodes only report device presence. The hub applies its own defaults and settings.<br><i>Recommended: manage devices on the hub.</i>"
629629
}
630630
]
631631
},

mkdocs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ nav:
6464
- Workflows: WORKFLOWS.md
6565
- Workflow Examples: WORKFLOW_EXAMPLES.md
6666
- Docker Swarm: DOCKER_SWARM.md
67-
- Best practice advisories:
68-
- Eyes on glass: ADVISORY_EYES_ON_GLASS.md
69-
- Multi-network monitoring: ADVISORY_MULTI_NETWORK.md
67+
- Best practice guides:
68+
- NOC / Eyes-on-glass dashboard: ADVISORY_EYES_ON_GLASS.md
69+
- Multi-network (VLAN / routing) monitoring: ADVISORY_MULTI_NETWORK.md
70+
- Multi-site (MSP / customer / branch) monitoring: ADVISORY_MULTI_SITE_MONITORING.md
7071
- Help:
7172
- Common issues: COMMON_ISSUES.md
7273
- Random MAC: RANDOM_MAC.md

test/api_endpoints/test_sync_endpoint.py

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@
99

1010
import os
1111
import sys
12-
from unittest.mock import patch
13-
1412
import pytest
1513

1614
INSTALL_PATH = os.getenv("NETALERTX_APP", "/app")
1715
sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
1816

1917
from helper import get_setting_value # noqa: E402
2018
from api_server.api_server_start import app # noqa: E402
21-
import api_server.sync_endpoint as sync_endpoint # noqa: E402
2219

2320

2421
@pytest.fixture(scope="session")
@@ -75,35 +72,35 @@ def test_sync_post_form_encoded_returns_415(client, api_token):
7572
assert resp.status_code == 415
7673

7774

78-
def test_sync_post_json_body_is_accepted(client, api_token, tmp_path):
75+
def test_sync_post_json_body_is_accepted(client, api_token, tmp_path, monkeypatch):
7976
"""JSON body must pass validation and return 200."""
8077
plugins_dir = tmp_path / "log" / "plugins"
8178
plugins_dir.mkdir(parents=True)
8279

83-
with patch.object(sync_endpoint, "INSTALL_PATH", str(tmp_path)):
84-
resp = client.post(
85-
"/sync",
86-
headers=auth_headers(api_token),
87-
json={"data": "test_payload", "plugin": "TESTPLUGIN", "node_name": "TestNode"},
88-
)
80+
monkeypatch.setenv("NETALERTX_PLUGINS_LOG", str(plugins_dir))
81+
resp = client.post(
82+
"/sync",
83+
headers=auth_headers(api_token),
84+
json={"data": "test_payload", "plugin": "TESTPLUGIN", "node_name": "TestNode"},
85+
)
8986

9087
assert resp.status_code == 200
9188
data = resp.get_json()
9289
assert data is not None
9390
assert "message" in data
9491

9592

96-
def test_sync_post_json_body_writes_encoded_file(client, api_token, tmp_path):
93+
def test_sync_post_json_body_writes_encoded_file(client, api_token, tmp_path, monkeypatch):
9794
"""A successful POST must persist an encoded file in the plugins log dir."""
9895
plugins_dir = tmp_path / "log" / "plugins"
9996
plugins_dir.mkdir(parents=True)
10097

101-
with patch.object(sync_endpoint, "INSTALL_PATH", str(tmp_path)):
102-
client.post(
103-
"/sync",
104-
headers=auth_headers(api_token),
105-
json={"data": "encrypted_blob", "plugin": "ARPSCAN", "node_name": "Node1"},
106-
)
98+
monkeypatch.setenv("NETALERTX_PLUGINS_LOG", str(plugins_dir))
99+
client.post(
100+
"/sync",
101+
headers=auth_headers(api_token),
102+
json={"data": "encrypted_blob", "plugin": "ARPSCAN", "node_name": "Node1"},
103+
)
107104

108105
written = list(plugins_dir.glob("last_result.ARPSCAN.encoded.Node1.*.log"))
109106
assert len(written) == 1

0 commit comments

Comments
 (0)