Skip to content

Commit 727fe0e

Browse files
authored
Merge branch 'main' into feat/adguard-export-plugin
2 parents 93e534c + 6845104 commit 727fe0e

216 files changed

Lines changed: 15030 additions & 4135 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/skills/code-standards/SKILL.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,23 @@ description: NetAlertX coding standards and conventions. Use this when writing c
88
- ask me to review before going to each next step (mention n step out of x) (AI only)
99
- before starting, prepare implementation plan (AI only)
1010
- ask me to review it and ask any clarifying questions first
11-
- add test creation as last step - follow repo architecture patterns - do not place in the root of /test
11+
- add test creation as last step - follow repo architecture patterns - do not place in the root of `/test`
1212
- code has to be maintainable, no duplicate code
1313
- follow DRY principle - maintainability of code is more important than speed of implementation
1414
- code files should be less than 500 LOC for better maintainability
15+
- DB columns must not contain underscores, use camelCase instead (e.g., deviceInstanceId, not device_instance_id)
16+
- treat DB as temporary storage for stats, long-term configuration should be stored in the `/config` folder, the `/config` folder should allow you to restore most of your functionality (excluding historical data)
17+
- never access DB directly from application layers, always use helper functions in `server/db/db_helper.py` and implement new functionality in handlers (e.g., `DeviceInstance` in `server/models/device_instance.py`)
18+
- always validate and normalize MAC addresses before writing to DB (use `normalize_mac` from `plugin_helper.py`)
19+
- all subprocess calls must set explicit timeouts
20+
- use `timeNowUTC` from `utils.datetime_utils` for all time-related operations and DB timestamps (store all timestamps in UTC)
21+
- use sanitizers from `server/helper.py` for user input before storing in DB
22+
- reuse shared mocks and factories from `test/db_test_helpers.py` for tests, never redefine them locally
23+
- use environment variables for runtime paths, never hardcode paths or use relative paths
24+
- follow existing code style and structure, and ensure backward compatibility with existing installations when submitting PRs
25+
- all code needs to be scalable to handle large networks with thousands of devices (10k+) without performance degradation
26+
- no inline imports, all imports must be at the top of the file
27+
1528

1629
## File Length
1730

@@ -72,6 +85,18 @@ Use sanitizers from `server/helper.py` before storing user input. MAC addresses
7285
- Everything is already writable
7386
- If permissions needed, fix `.devcontainer/scripts/setup.sh`
7487

88+
## Test Helpers — No Duplicate Mocks
89+
90+
Reuse shared mocks and factories from `test/db_test_helpers.py`. Never redefine `DummyDB`, `make_db`, or inline DDL in individual test files.
91+
92+
```python
93+
import sys, os
94+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
95+
from db_test_helpers import make_db, DummyDB, insert_device, minutes_ago
96+
```
97+
98+
If a helper you need doesn't exist yet, add it to `db_test_helpers.py` — not locally in the test file.
99+
75100
## Path Hygiene
76101

77102
- Use environment variables for runtime paths

.github/workflows/mkdocs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v4
2020
with:
21-
python-version: '3.9'
21+
python-version: '3.11'
2222

2323
- name: Install MkDocs
2424
run: |
25-
pip install mkdocs mkdocs-material
26-
pip install mkdocs-github-admonitions-plugin
25+
pip install \
26+
mkdocs==1.6.0 \
27+
mkdocs-material==9.5.21 \
28+
mkdocs-github-admonitions-plugin==0.1.1 \
29+
mkdocs-glightbox
2730
2831
- name: Build MkDocs
2932
run: mkdocs build

CONTRIBUTING.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,37 @@ Before opening a new issue:
1515
- [Check Common Issues & Debug Tips](https://docs.netalertx.com/DEBUG_TIPS#common-issues)
1616
- [Search Closed Issues](https://github.com/netalertx/NetAlertX/issues?q=is%3Aissue+is%3Aclosed)
1717

18+
---
19+
20+
## Contributing without coding knowledge
21+
22+
Writing code is not the only way how you can contribute to the project. Here are some ideas how you can help out otherwise:
23+
24+
- Help improving the documentation (text, typos, use cases, screenshots - all this makes things better)
25+
- Share your favorite project on socials (see [Growth ideas](./GROWTH.md))
26+
- Write a blog post, or a how-to set-up guide
27+
- Write how it helped you to achieve something fun or interesting to simplify your personal or work life
28+
- Help with the translation effort
29+
- Running a nightly or dev build to test for bugs before they make it to the production release
30+
- Report bugs and features with sufficient detail and care (super important to ease everyone's maintenance burden and minimize back-and-forth)
31+
- running a projects test suite
32+
33+
34+
---
35+
36+
## Use of AI
37+
38+
Use of AI-assisted tools is permitted, provided all generated code is reviewed, understood, and verified before submission.
39+
40+
- All AI-generated code must meet the project's **quality, security, and performance standards**.
41+
- Contributors are responsible for **fully understanding** any code they submit, regardless of how it was produced.
42+
- Prefer **clarity and maintainability over cleverness or brevity**. Readable code is always favored over dense or obfuscated implementations.
43+
- Follow the **DRY (Don't Repeat Yourself) principle** where appropriate, without sacrificing readability.
44+
- Do not submit code that you cannot confidently explain or debug.
45+
46+
All changes must pass the **full test suite** before opening a PR.
47+
48+
1849
---
1950

2051
## Submitting Pull Requests (PRs)
@@ -28,11 +59,19 @@ Please:
2859
- Provide a clear title and description for your PR
2960
- If relevant, add or update tests and documentation
3061
- For plugins, refer to the [Plugin Dev Guide](https://docs.netalertx.com/PLUGINS_DEV)
62+
- Switch the PR to DRAFT mode if still being worked on
63+
- Keep PRs **focused and minimal** — avoid unrelated changes in a single PR
64+
- PRs that do not meet these guidelines may be closed without review
65+
66+
## Commit Messages
3167

68+
- Use clear, descriptive commit messages
69+
- Explain *why* a change was made, not just *what* changed
70+
- Reference related issues where applicable
3271

33-
## Code quality
72+
## Code Quality
3473

35-
- read and follow the [code-standards](/.github/skills/code-standards/SKILL.md)
74+
- Read and follow the [code standards](/.github/skills/code-standards/SKILL.md)
3675

3776
---
3877

GROWTH.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# 📈 NetAlertX Growth Playbook
2+
3+
If you like NetAlertX and want to help it grow, this is how.
4+
5+
This isn’t about spam or "growth hacks." It’s just getting the tool in front of people who already have the problem (manual network docs, blind spots, messy networks).
6+
7+
---
8+
9+
## 🎯 Who this is for
10+
11+
* **Homelabbers** → Proxmox, Unraid, Raspberry Pi setups
12+
* **Self-hosters** → moving away from cloud / want local-first
13+
* **Sysadmins / MSPs** → need visibility + fast onboarding
14+
15+
---
16+
17+
## 💬 Where to post (and how)
18+
19+
### Reddit (main channel)
20+
21+
Reddit works *if* you don’t sound like marketing.
22+
23+
**Subreddits**
24+
25+
* r/homelab
26+
* r/selfhosted
27+
* r/sysadmin
28+
* r/networking
29+
30+
**What works**
31+
32+
* "Show r/homelab" / "I built this"
33+
* Problem → solution
34+
* Real screenshots or short GIFs
35+
36+
**Example**
37+
38+
> Tired of keeping network diagrams up to date?
39+
> I deployed something that does it automatically.
40+
41+
**Avoid**
42+
43+
* Over-explaining
44+
* Buzzwords
45+
* "Check out my project!!!" energy
46+
47+
**Timing (rough guide)**
48+
49+
* Tue–Thu mornings (US time)
50+
51+
---
52+
53+
### Hacker News (Show HN)
54+
55+
Good fit because NetAlertX is:
56+
57+
* local-first
58+
* privacy-focused
59+
* actually useful
60+
61+
**Title**
62+
63+
> Show HN: NetAlertX – network documentation that updates itself
64+
65+
Be ready to answer:
66+
67+
* stack (Python / PHP / JS)
68+
* how discovery works
69+
* privacy / local scanning
70+
71+
---
72+
73+
### Awesome Lists
74+
75+
Low effort, long-term visibility.
76+
77+
Target:
78+
79+
* awesome-selfhosted
80+
* awesome-homelab
81+
82+
Keep it simple:
83+
84+
> NetAlertX – automated network discovery and documentation with alerting
85+
86+
---
87+
88+
## 🎥 Content / creators
89+
90+
If you or someone else makes videos, these angles work:
91+
92+
* **First 5 minutes** → "it already found everything"
93+
* **Before vs after** → manual vs NetAlertX
94+
* **Docker setup** → show how easy it is
95+
96+
No need for overproduction—real usage > polished demos.
97+
98+
---
99+
100+
## ⚖️ Positioning (keep it simple)
101+
102+
When explaining NetAlertX, this is the mental model:
103+
104+
| | Manual Docs | Basic Scanners | NetAlertX |
105+
| ------- | ----------------- | -------------- | ------------------------- |
106+
| Updates | Manual / outdated | On demand | **Automatic** |
107+
| Alerts | None | Limited | **New / unknown devices** |
108+
| History | None | None | **Device timeline** |
109+
| Effort | High | Medium | **Set & forget** |
110+
111+
---
112+
113+
## 🧑‍💻 MSP / professional angle
114+
115+
If you’re using it in real environments:
116+
117+
* Faster client onboarding
118+
* Better visibility
119+
* Less "what changed?" guessing
120+
121+
That’s the value—keep it grounded. And share your experience 🙏
122+
123+
---
124+
125+
## 🛠 Easy ways to help
126+
127+
* Star the repo
128+
* Post a screenshot of your network
129+
* Mention it when someone asks "how do you track devices?" or "how do you detect presence?"
130+
* Write a quick "how I use it" post
131+
132+
---
133+
134+
## Final note
135+
136+
Authenticity matters more than reach.
137+
138+
If it feels like marketing, people ignore it.
139+
If it feels like "this solved my problem," people pay attention.
140+
141+
Thanks a lot in advance!
142+
- jokob

README.md

Lines changed: 19 additions & 5 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

@@ -157,7 +170,7 @@ Check the [GitHub Issues](https://github.com/netalertx/NetAlertX/issues) for the
157170
## Everything else
158171
<!--- --------------------------------------------------------------------- --->
159172

160-
<a href="https://trendshift.io/repositories/12670" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12670" alt="jokob-sk%2FNetAlertX | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
173+
<a href="https://trendshift.io/repositories/19712" target="_blank"><img src="https://trendshift.io/api/badge/repositories/19712" alt="jokob-sk%2FNetAlertX | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
161174

162175
### 📧 Get notified what's new
163176

@@ -170,6 +183,7 @@ Get notified about a new release, what new functionality you can use and about b
170183
- [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
171184
- [NetBox](https://netboxlabs.com/) - The gold standard for Network Source of Truth (NSoT) and IPAM.
172185
- [Zabbix](https://www.zabbix.com/) or [Nagios](https://www.nagios.org/) - Strong focus on infrastructure monitoring.
186+
- [Domotz](https://www.domotz.com/) - Commercial network monitoring and remote management platform aimed at MSPs, IT teams, and multi-site environments.
173187
- [NetAlertX](https://netalertx.com) - The streamlined, discovery-focused choice for real-time asset intelligence and noise-free alerting.
174188

175189
### 💙 Donations

back/app.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ REPORT_DASHBOARD_URL='update_REPORT_DASHBOARD_URL_setting'
3030
INTRNT_RUN='schedule'
3131
ARPSCAN_RUN='schedule'
3232
NSLOOKUP_RUN='before_name_updates'
33+
DIGSCAN_RUN='before_name_updates'
3334
AVAHISCAN_RUN='before_name_updates'
3435
NBTSCAN_RUN='before_name_updates'
3536

docs/ADVISORY_EYES_ON_GLASS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ For Managed Service Providers (MSPs) and Network Operations Centers (NOC), "Eyes
44

55
![filters](./img/ADVISORIES/filters.png)
66

7+
> [!TIP]
8+
> If you are using Grafana check the `/metrics` endpoint that exposes **Prometheus-compatible metrics** for NetAlertX, including aggregate device counts and per-device status. See the [Metrics API endpoint](./API_METRICS.md) documentation for details.
9+
710
---
811

912
### 1. Configure Auto-Refresh for Live Monitoring

0 commit comments

Comments
 (0)