Compare commits

..

42 Commits

Author SHA1 Message Date
Anonymous
c8ff0d79d1 Translated using Weblate (Ukrainian)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 97.7% (734 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-01-11 04:36:15 +01:00
Anonymous
61cf87f0d6 Translated using Weblate (Catalan)
Currently translated at 98.1% (737 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-01-11 04:36:14 +01:00
Anonymous
75bbc8bcf3 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 88.2% (663 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-01-11 04:36:14 +01:00
Anonymous
5582c0bf5e Translated using Weblate (Polish)
Currently translated at 88.9% (668 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-01-11 04:36:14 +01:00
Anonymous
8278a92b11 Translated using Weblate (Italian)
Currently translated at 98.2% (738 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-01-11 04:36:14 +01:00
Anonymous
d5ac00a307 Translated using Weblate (Russian)
Currently translated at 98.2% (738 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-01-11 04:36:13 +01:00
Anonymous
2b02596b17 Translated using Weblate (Norwegian Bokmål)
Currently translated at 88.0% (661 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/nb_NO/
2025-01-11 04:36:13 +01:00
Anonymous
2a736f3c19 Translated using Weblate (French)
Currently translated at 97.7% (734 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-01-11 04:36:13 +01:00
Anonymous
0b5c0b198a Translated using Weblate (Spanish)
Currently translated at 96.9% (728 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-01-11 04:36:12 +01:00
Anonymous
2d0a461724 Translated using Weblate (German)
Currently translated at 89.7% (674 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-01-11 04:36:12 +01:00
jokob-sk
74c6faccc7 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-11 11:29:17 +11:00
jokob-sk
89a154e224 Docs 2025-01-11 11:29:02 +11:00
Hosted Weblate
8b84e4b325 Merge branch 'origin/main' into Weblate. 2025-01-11 01:24:14 +01:00
Massimo Pissarello
e55002a9b0 Translated using Weblate (Italian)
Currently translated at 100.0% (745 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-01-11 01:24:12 +01:00
jokob-sk
b4e741568b Extending Maintenance w/ app.conf (im/ex)port 2025-01-11 11:23:32 +11:00
jokob-sk
711e0012cb sort by port #949 2025-01-11 07:54:51 +11:00
jokob-sk
ea2e8459b5 sort by port #949 2025-01-11 07:51:43 +11:00
jokob-sk
16d06e8a74 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
docker / docker_dev (push) Has been cancelled
2025-01-10 07:49:04 +11:00
jokob-sk
9625c36d12 devStaticIp to multi edit #947 2025-01-10 07:48:35 +11:00
Safeguard
f47858d773 Translated using Weblate (Russian)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 100.0% (745 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-01-09 15:53:40 +01:00
jokob-sk
ac2ce85f33 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-01-09 22:16:08 +11:00
jokob-sk
e887a11755 docs, cleanup 2025-01-09 22:15:58 +11:00
Anonymous
73f432c786 Translated using Weblate (Ukrainian)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 99.3% (740 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-01-09 08:26:03 +01:00
Anonymous
9c95a79e07 Translated using Weblate (Catalan)
Currently translated at 99.8% (744 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-01-09 08:26:03 +01:00
Anonymous
f0bbd37812 Translated using Weblate (Portuguese (Brazil))
Currently translated at 33.0% (246 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_BR/
2025-01-09 08:26:03 +01:00
Anonymous
7b0777b805 Translated using Weblate (Italian)
Currently translated at 99.8% (744 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-01-09 08:26:03 +01:00
Safeguard
b8dce59138 Translated using Weblate (Russian)
Currently translated at 99.5% (742 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-01-09 08:26:03 +01:00
Anonymous
f1d79074ec Translated using Weblate (Russian)
Currently translated at 99.5% (742 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-01-09 08:26:03 +01:00
Anonymous
4156bc1669 Translated using Weblate (French)
Currently translated at 99.3% (740 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-01-09 08:26:02 +01:00
Anonymous
00c4dd86c6 Translated using Weblate (Spanish)
Currently translated at 98.5% (734 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-01-09 08:26:02 +01:00
Anonymous
979ce8fd75 Translated using Weblate (German)
Currently translated at 91.2% (680 of 745 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-01-09 08:26:02 +01:00
jokob-sk
ede926beee docs, cleanup 2025-01-09 14:41:56 +11:00
jokob-sk
e1f91ddf17 docs, social posts, s6 setup improvements #945 2025-01-09 14:22:39 +11:00
jokob-sk
e9539962c9 cron s6 rollback #945
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-09 09:23:29 +11:00
jokob-sk
87d18a9067 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-01-09 08:35:14 +11:00
jokob-sk
2302cd9a31 s6 setup improvements #945 2025-01-09 08:35:09 +11:00
jokob-sk
babe0eab53 Merge pull request #944 from kpolszewski/mtscan-readme-update
better readme for the MikroTik plugin
2025-01-09 08:16:22 +11:00
kpolszewski
7c878690ef better readme for the MikroTik plugin 2025-01-08 19:15:32 +01:00
jokob-sk
b29dcbfa98 CHECKMK script
Some checks failed
docker / docker_dev (push) Waiting to run
🤖Automation - Update Sponsors Table / update-table (push) Has been cancelled
2025-01-08 23:32:14 +11:00
jokob-sk
8d9c48166b Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-01-08 23:00:07 +11:00
jokob-sk
540f8e850b DUMMY as new device source plugin 2025-01-08 23:00:03 +11:00
github-actions[bot]
8316d8e741 [🤖Automation] Update README with sponsors information 2025-01-08 11:53:43 +00:00
47 changed files with 575 additions and 539 deletions

32
.github/workflows/social_post_on_release.yml vendored Executable file
View File

@@ -0,0 +1,32 @@
name: 📧 Twitter and Discord Posts
on:
release:
types: [published]
jobs:
post-release:
runs-on: ubuntu-latest
steps:
- name: Wait for 15 minutes
run: sleep 900 # 15 minutes delay
# Post to Twitter
- name: Post to Twitter
uses: gr2m/twitter-together@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
with:
tweet: |
🎉 New release: **${{ github.event.release.name }}** is live! 🚀
Check it out here: ${{ github.event.release.html_url }}
# Post to Discord
- name: Post to Discord
run: |
curl -X POST -H "Content-Type: application/json" \
-d '{"content": "🎉 New release: **${{ github.event.release.name }}** is live! 🚀\nCheck it out here: ${{ github.event.release.html_url }}"}' \
${{ secrets.DISCORD_WEBHOOK_URL }}

View File

@@ -1,29 +0,0 @@
name: 🤖Automation - Update Sponsors Table
on:
schedule:
- cron: '50 11 * * *' # Set your preferred schedule (UTC)
jobs:
update-table:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r update_sponsors_requirements.txt # If you have any Python dependencies
- name: Update Sponsors Table
run: |
python update_sponsors.py
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -3,9 +3,9 @@
[![GitHub Release](https://img.shields.io/github/v/release/jokob-sk/NetAlertX?color=0aa8d2&logoColor=fff&logo=GitHub&style=for-the-badge)](https://github.com/jokob-sk/NetAlertX/releases)
[![Discord](https://img.shields.io/discord/1274490466481602755?color=0aa8d2&logoColor=fff&logo=Discord&style=for-the-badge)](https://discord.gg/NczTUTWyRr)
# 🖧🔍 Network scanner & notification framework
# NetAlertX - Network, presence scanner and alert framework
Get visibility of what's going on on your WIFI/LAN network. Schedule scans for devices, port changes and get alerts if unknown devices or changes are found. Write your own [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) with auto-generated UI and in-build notification system. Build out and easily maintain your network source of truth (NSoT).
Get visibility of what's going on on your WIFI/LAN network and enable presence detection of important devices. Schedule scans for devices, port changes and get alerts if unknown devices or changes are found. Write your own [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) with auto-generated UI and in-build notification system. Build out and easily maintain your network source of truth (NSoT).
| [📑 Docker guide](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md) | [🚀 Releases](https://github.com/jokob-sk/NetAlertX/releases) | [📚 Docs](https://github.com/jokob-sk/NetAlertX/tree/main/docs) | [🔌 Plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) | [🤖 Ask AI](https://gurubase.io/g/netalertx)
@@ -13,8 +13,6 @@ Get visibility of what's going on on your WIFI/LAN network. Schedule scans for d
![showcase][showcase]
Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and screenshots 📷.
<details>
<summary>📷 Click for more screenshots</summary>
@@ -23,73 +21,58 @@ Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and scree
| ![presence][presence] | ![maintenance][maintenance] | ![settings][settings] |
| ![sync_hub][sync_hub] | ![report1][report1] | ![device_nmap][device_nmap] |
</details>
<details>
<summary>❓ Why use Net<b>Alert</b><sup>x</sup>?</summary>
<hr>
Most of us don't know what's going on on our home network, but we want our family and data to be safe. _Command-line tools_ are great, but the output can be _hard to understand_ and action if you are not a network specialist.
Net<b>Alert</b><sup>x</sup> gives you peace of mind. _Visualize and immediately report 📬_ what is going on in your network - this is the first step to enhance your _network security 🔐_.
Net<b>Alert</b><sup>x</sup> combines several network and other scanning tools 🔍 with notifications 📧 into one user-friendly package 📦.
Set up a _kill switch ☠_ for your network via a smart plug with the available [Home Assistant](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md) integration. Implement custom automations with the [CSV device Exports 📤](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/csv_backup), [Webhooks](https://github.com/jokob-sk/NetAlertX/blob/main/docs/WEBHOOK_N8N.md), or [API endpoints](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md) features.
Extend the app if you want to create your own scanner [Plugin](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) and handle the results and notifications in Net<b>Alert</b><sup>x</sup>.
Looking forward to your contributions if you decide to share your work with the community ❤.
Head to [https://netalertx.com/](https://netalertx.com/) for even more gifs and screenshots 📷.
</details>
## Scan Methods, Notifications, Integration, Extension system
## 📦 Features
| Features | Details |
|-------------|-------------|
| 🔍 | The app scans your network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: **arp-scan**, **Pi-hole - DB import**, **Pi-hole - DHCP leases import**, **Generic DHCP leases import**. **UNIFI controller import**, **SNMP-enabled router import**. Check the [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) docs for more info on individual scans. |
|📧 | Send notifications to more than 80+ services, including Telegram via [Apprise](https://hub.docker.com/r/caronc/apprise), or use [Pushsafer](https://www.pushsafer.com/), [Pushover](https://www.pushover.net/), or [NTFY](https://ntfy.sh/). |
|🧩 | Feed your data and device changes into [Home Assistant](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md), read [API endpoints](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md), or use [Webhooks](https://github.com/jokob-sk/NetAlertX/blob/main/docs/WEBHOOK_N8N.md) to setup custom automation flows. |
| | Build your own scanners with the [Plugin system](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) |
### Scanners
The app scans your network for **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: **arp-scan**, **Pi-hole - DB import**, **Pi-hole - DHCP leases import**, **Generic DHCP leases import**, **UNIFI controller import**, **SNMP-enabled router import**. Check the [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) docs for a full lits of avaliable plugins.
### Notification gateways
Send notifications to more than 80+ services, including Telegram via [Apprise](https://hub.docker.com/r/caronc/apprise), or use native [Pushsafer](https://www.pushsafer.com/), [Pushover](https://www.pushover.net/), or [NTFY](https://ntfy.sh/) publishers.
### Integrations and Plugins
Feed your data and device changes into [Home Assistant](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md), read [API endpoints](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md), or use [Webhooks](https://github.com/jokob-sk/NetAlertX/blob/main/docs/WEBHOOK_N8N.md) to setup custom automation flows. You can also
build your own scanners with the [Plugin system](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) in as little as [15 minutes](https://www.youtube.com/watch?v=cdbxlwiWhv8).
## Installation & Documentation
## 📚 Documentation
<!--- --------------------------------------------------------------------- --->
Supported browsers: Chrome, Firefox
| Docs | Link |
|-------------|-------------|
| 📥🐳 | [Docker instructions](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md)
| 📥🗄️ | [HW install (experimental 🧪)](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HW_INSTALL.md) |
| 📥🟧 | [Unraid App](https://unraid.net/community/apps) |
| 📚 | [All Documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/README.md) (App Usage and Configuration) |
> Other Alternatives
>
> - Check out [leiweibau's on HW installed fork](https://github.com/leiweibau/Pi.Alert/) (maintained)
> - [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
> - [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
> - [NetBox](https://netboxlabs.com/) - Network management software (Commercial)
- [[Installation] Docker](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md)
- [[Installation] Bare metal](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HW_INSTALL.md)
- [[Installation] Unraid App](https://unraid.net/community/apps)
- [[Setup] Usage and Configuration](https://github.com/jokob-sk/NetAlertX/blob/main/docs/README.md)
- [[Development] API docs](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md)
- [[Development] Custom Plugins](https://github.com/jokob-sk/NetAlertX/blob/main/docs/PLUGINS_DEV.md)
## 🔔 Get notified what's new
## 📃 Everything else
<!--- --------------------------------------------------------------------- --->
### 📧 Get notified what's new
Get notified about a new release, what new functionality you can use and about breaking changes.
![Follow and star][follow_star]
### ⭐ Sponsors
### 🔀 Other Alternative Apps
[![GitHub Sponsors](https://img.shields.io/github/sponsors/jokob-sk?style=social)](https://github.com/sponsors/jokob-sk)
- [PiAlert by leiweibau](https://github.com/leiweibau/Pi.Alert/) (maintained, bare-metal install)
- [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
- [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
- [NetBox](https://netboxlabs.com/) - Network management software (Commercial)
Thank you to all the wonderful people who are sponsoring this project (private sponsors are hidden).
### 💙 Donations
<!-- SPONSORS-LIST DO NOT MODIFY BELOW -->
| All Sponsors |
|---|
<!-- SPONSORS-LIST DO NOT MODIFY ABOVE -->
Thank you to everyone who appreciates this tool and donates.
<details>
<summary>Click for more ways to donate</summary>
@@ -106,26 +89,20 @@ Thank you to all the wonderful people who are sponsoring this project (private s
</details>
### 🙏Contributors
### 🏗 Contributors
This project would be nothing without the amazing work of the community, with special thanks to:
> [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert) (the original creator of PiAlert), [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and much more), [Macleykun](https://github.com/Macleykun) (Help with Dockerfile clean-up), [vladaurosh](https://github.com/vladaurosh) for Alpine re-base help, [Final-Hawk](https://github.com/Final-Hawk) (Help with NTFY, styling and other fixes), [TeroRERO](https://github.com/terorero) (Spanish translations), [Data-Monkey](https://github.com/Data-Monkey), (Split-up of the python.py file and more), [cvc90](https://github.com/cvc90) (Spanish translation and various UI work) to name a few. Check out all the [amazing contributors](https://github.com/jokob-sk/NetAlertX/graphs/contributors).
## Everything else
<!--- --------------------------------------------------------------------- --->
### 🌍 Translations
Proudly using [Weblate](https://hosted.weblate.org/projects/pialert/).
Proudly using [Weblate](https://hosted.weblate.org/projects/pialert/). Help out and suggest languages in the [online portal of Weblate](https://hosted.weblate.org/projects/pialert/core/).
<a href="https://hosted.weblate.org/engage/pialert/">
<img src="https://hosted.weblate.org/widget/pialert/core/multi-auto.svg" alt="Translation status" />
</a>
Help out and suggest languages in the [online portal of Weblate](https://hosted.weblate.org/projects/pialert/core/).
### License
> GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans)

View File

@@ -5,8 +5,8 @@ LOG_FILE="${INSTALL_DIR}/log/execution_queue.log"
# Check if there are any entries with cron_restart_backend
if grep -q "cron_restart_backend" "$LOG_FILE"; then
# Kill all python processes and restart the server
pkill -f "python " && (python ${INSTALL_DIR}/server > /dev/null 2>&1 &) && echo 'done'
# Kill all python processes (restart handled by s6 overlay)
pkill -f "python " && echo 'done'
# Remove all lines containing cron_restart_backend from the log file
sed -i '/cron_restart_backend/d' "$LOG_FILE"

View File

@@ -4,7 +4,7 @@
[![Discord](https://img.shields.io/discord/1274490466481602755?color=0aa8d2&logoColor=fff&logo=Discord&style=for-the-badge)](https://discord.gg/NczTUTWyRr)
# NetAlertX 🖧🔍 Network scanner & notification framework
# NetAlertX - Network scanner & notification framework
| [📑 Docker guide](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md) | [🚀 Releases](https://github.com/jokob-sk/NetAlertX/releases) | [📚 Docs](https://github.com/jokob-sk/NetAlertX/tree/main/docs) | [🔌 Plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) | [🤖 Ask AI](https://gurubase.io/g/netalertx)
|----------------------| ----------------------| ----------------------| ----------------------| ----------------------|

View File

@@ -13,13 +13,14 @@ sed -i "/^user/c\user = nginx" /etc/php83/php-fpm.d/www.conf
sed -i "/^group/c\group = www-data" /etc/php83/php-fpm.d/www.conf
# s6 overlay setup
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,php-fpm/dependencies.d,nginx/dependencies.d}
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,php-fpm/dependencies.d,nginx/dependencies.d,$APP_NAME/dependencies.d}
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,crond/dependencies.d,php-fpm/dependencies.d,nginx/dependencies.d,$APP_NAME/dependencies.d}
echo "oneshot" > /etc/s6-overlay/s6-rc.d/SetupOneshot/type
echo "longrun" > /etc/s6-overlay/s6-rc.d/crond/type
echo "longrun" > /etc/s6-overlay/s6-rc.d/php-fpm/type
echo "longrun" > /etc/s6-overlay/s6-rc.d/nginx/type
echo "longrun" > /etc/s6-overlay/s6-rc.d/$APP_NAME/type
echo -e "${INSTALL_DIR}/dockerfiles/init.sh" > /etc/s6-overlay/s6-rc.d/SetupOneshot/up
echo -e "#!/bin/execlineb -P\n/usr/sbin/crond -f -d 8" > /etc/s6-overlay/s6-rc.d/crond/run
echo -e "#!/bin/execlineb -P\n/usr/sbin/php-fpm83 -F" > /etc/s6-overlay/s6-rc.d/php-fpm/run
echo -e '#!/bin/execlineb -P\nnginx -g "daemon off;"' > /etc/s6-overlay/s6-rc.d/nginx/run
echo -e '#!/bin/execlineb -P
@@ -33,8 +34,7 @@ echo -e '#!/bin/execlineb -P
" }' > /etc/s6-overlay/s6-rc.d/$APP_NAME/run
echo -e "python ${INSTALL_DIR}/server" >> /etc/s6-overlay/s6-rc.d/$APP_NAME/run
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,php-fpm,nginx} /etc/s6-overlay/s6-rc.d/{php-fpm,nginx}/dependencies.d/SetupOneshot
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,php-fpm,nginx,$APP_NAME} /etc/s6-overlay/s6-rc.d/{php-fpm,nginx,$APP_NAME}/dependencies.d/SetupOneshot
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,crond,php-fpm,nginx,$APP_NAME} /etc/s6-overlay/s6-rc.d/{crond,php-fpm,nginx,$APP_NAME}/dependencies.d/SetupOneshot
touch /etc/s6-overlay/s6-rc.d/nginx/dependencies.d/php-fpm
touch /etc/s6-overlay/s6-rc.d/$APP_NAME/dependencies.d/nginx

View File

@@ -124,7 +124,7 @@ The response will be in JSON format, similar to the following:
## API Endpoint: JSON files
These API endpoint are static files, that are periodically updated.
This API endpoint retrieves static files, that are periodically updated.
Endpoint URL: `php/server/query_json.php?file=<file name>`
Host: `same as front end (web ui)`
@@ -144,10 +144,8 @@ You can access the following files:
| File name | Description |
|----------------------|----------------------|
| `notification_text.txt` | The plain text version of the last notification. |
| `notification_text.html` | The full HTML of the last email notification. |
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json)). |
| `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
| `table_devices.json` | All of the available Devices detected by the app. |
| `table_plugins_events.json` | The list of the unprocessed (pending) notification events (plugins_events DB table). |
| `table_plugins_history.json` | The list of notification events history. |
| `table_plugins_objects.json` | The content of the plugins_objects table. Find more info on the [Plugin system here](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins)|
@@ -156,7 +154,6 @@ You can access the following files:
| `table_settings.json` | The content of the settings table. |
| `app_state.json` | Contains the current application state. |
Current/latest state of the aforementioned files depends on your settings.
### JSON Data format
@@ -224,27 +221,27 @@ Example JSON of the `table_devices.json` endpoint with two Devices (database row
## API Endpoint: /log files
To retrieve files from the `/app/log` folder.
This API endpoint retrieves files from the `/app/log` folder.
Endpoint URL: `php/server/query_logs.php?file=<file name>`
Host: `same as front end (web ui)`
Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
| File | Description |
|--------------------------|--------------------------------------------------|
| `IP_changes.log` | Logs of IP address changes |
| `app.log` | Main application log |
| `app.php_errors`.log | PHP error log |
| `app_front.log` | Frontend application log |
| `app_nmap.log` | Logs of Nmap scan results |
| `db_is_locked.log` | Logs when the database is locked |
| `execution_queue.log` | Logs of execution queue activities |
| `plugins/` | Directory for plugin-related files (not accessible) |
| `report_output.html` | HTML report output |
| `report_output.json` | JSON format report output |
| `report_output.txt` | Text format report output |
| `stderr.log` | Logs of standard error output |
| `stdout.log` | Logs of standard output |
| File | Description |
|--------------------------|---------------------------------------------------------------|
| `IP_changes.log` | Logs of IP address changes |
| `app.log` | Main application log |
| `app.php_errors.log` | PHP error log |
| `app_front.log` | Frontend application log |
| `app_nmap.log` | Logs of Nmap scan results |
| `db_is_locked.log` | Logs when the database is locked |
| `execution_queue.log` | Logs of execution queue activities |
| `plugins/` | Directory for temporary plugin-related files (not accessible) |
| `report_output.html` | HTML report output |
| `report_output.json` | JSON format report output |
| `report_output.txt` | Text format report output |
| `stderr.log` | Logs of standard error output |
| `stdout.log` | Logs of standard output |
## API Endpoint: /config files

View File

@@ -48,7 +48,9 @@ Historical data is stored in the `app.db` database (See [Database overview](http
The safest approach to backups is to backup all of the above, by taking regular file system backups (I use [Kopia](https://github.com/kopia/kopia)).
Arguably, the most time is spent setting up the device list, so if only one file is kept I'd recommend to have a latest backup of the `devices_<timestamp>.csv` or `devices.csv` file, followed by the `app.conf` file.
Arguably, the most time is spent setting up the device list, so if only one file is kept I'd recommend to have a latest backup of the `devices_<timestamp>.csv` or `devices.csv` file, followed by the `app.conf` file. You can also download `app.conf` and `devices.csv` file in the Maintenance section:
![Backup and Restore Section in Maintenance](/docs/img/BACKUPS/Maintenance_Backup_Restore.png)
### Scenario 1: Full backup

View File

@@ -74,7 +74,7 @@ Sometimes specific log sections are needed to debug issues. The Devices and Curr
### unable to resolve host
* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface` as outlined in the instructions above.
* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface`. See teh [subnets docs for details](/docs/SUBNETS.md).
### Invalid JSON
@@ -95,4 +95,4 @@ The link above will probably break in time too. Go to https://packages.debian.or
### Only Router and own device show up
Make sure that the subnet and interface in SCAN_SUBNETS are the correct ones. If your device/NAS has multiple ethernet ports, you probably need to change eth0 to something else!
Make sure that the subnet and interface in `SCAN_SUBNETS` are correct. If your device/NAS has multiple ethernet ports, you probably need to change `eth0` to something else.

View File

@@ -2,7 +2,6 @@
The Main Info section is where most of the device identifiable information is stored and edited. Some of the information is autodetected via various plugins. Initial values for most of the fields can be specified in the `NEWDEV` plugin.
> [!NOTE]
>
> You can multi-edit devices by selecting them in the main Devices view, from the Mainetence section, or via the CSV Export functionality under Maintenance. More info can be found in the [Devices Bulk-editing docs](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICES_BULK_EDITING.md).
@@ -10,12 +9,11 @@ The Main Info section is where most of the device identifiable information is st
![Main Info](/docs/img/DEVICE_MANAGEMENT/DeviceManagement_MainInfo.png)
## Main Info
- **MAC**: MAC addres of the device. Not editable, unless creating a new dummy device.
- **Last IP**: IP addres of the device. Not editable, unless creating a new dummy device.
- **Name**: Friendly device name. Autodetected via various 🆎 Name discovery [plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md).
- **Name**: Friendly device name. Autodetected via various 🆎 Name discovery [plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md). The app attaches `(IP match)` if the name is discovered via an IP match and not MAC match which could mean the name could be incorrect as IPs might change.
- **Icon**: Partially autodetected. Select an existing or [add a custom icon](https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md). You can also auto-apply the same icon on all devices of the same type.
- **Owner**: Device owner (The list is self-populated with existing owners and you can add custom values).
- **Type**: Select a device type from the dropdown list (`Smartphone`, `Tablet`,

View File

@@ -38,7 +38,7 @@ Copying the HTML code from [Font Awesome](https://fontawesome.com/search?o=r&m=f
> [!NOTE]
> If you want to mass-apply an icon to all devices of the same device type (Field: Type), you can click the mass-copy button (next to the "+" button). A confirmation prompt is displayed. If you proceed, icons of all devices set to the same device type as the current device, will be overwritten with the current device's icon.
- The blue dropdown contains all icons already used in the app for device icons. You need to navigate away or refresh the page once you add a new icon.
- The dropdown contains all icons already used in the app for device icons. You might need to navigate away or refresh the page once you add a new icon.
## 🌟 Pro Font Awesome icons

View File

@@ -1,87 +0,0 @@
# Pi.Alert Version History
<!--- --------------------------------------------------------------------- --->
| Version | Description |
| ------- | --------------------------------------------------------------- |
| v3.00 | Major set of New features & Enhancements |
| v2.70 | New features & Usability improvements in the web prontal |
| v2.61 | Bug fixing |
| v2.60 | Improved the compability of installation process (Ubuntu) |
| v2.56 | Bug fixing |
| v2.55 | Bug fixing |
| v2.52 | Bug fixing |
| v2.51 | Bug fixing |
| v2.50 | First public release |
# 🆕 2022+ [Newest Release notes](https://github.com/jokob-sk/NetAlertX/issues/138)
## Pi.Alert v3.02
<!--- --------------------------------------------------------------------- --->
**PENDING UPDATE DOC**
- Fixed: UNIQUE constraint failed with Local MAC #114
## Pi.Alert v3.01
<!--- --------------------------------------------------------------------- --->
**PENDING UPDATE DOC**
- Fixed: Problem with local MAC & IP (raspberry) #106
## Pi.Alert v3.00
<!--- --------------------------------------------------------------------- --->
**PENDING UPDATE DOC**
- `arp-scan` config options: interface, several subnets. #101 #15
- Next/previos button while editing devices #66 #37
- Internet presence/sessions monitoring #63
- Logical delete / archive / hide Device #93
- Flag to mark device with random MAC's #87
- New Device Types predefined in combobox #92
- Ask before leave the page with unsaved changes #104
- Option to don't mark devices as new during installation #94
- Uninstall script #62
- Fixed: Error updating name of devices w/o IP #97
- Fixed: Deleted devices reappear #84
- Fixed: Device running Pi.Alert must be marked as "on-line" #76
- Fixed: Incorrect calculation of presence hours #102
- Fixed: Problem redirect to homepage clicking in logo #103
## Pi.Alert v2.70
<!--- --------------------------------------------------------------------- --->
- Added Client names resolution #43
- Added Check to mark devices as "known" #16
- Remember "Show XXX entries" dropdown value #16 #26
- Remember "sorting" in devices #16
- Remember "Device panel " in device detail #16
- Added "All" option to "Show x Entries" option #16
- Added optional Location field (Door, Basement, etc.) to devices #16
- "Device updated successfully" message now is not modal #16
- Now is possible to delete Devices #16
- Added Device Type Singleboard Computer (SBC) #16
- Allowed to use " in device name #42
## Pi.Alert v2.60
<!--- --------------------------------------------------------------------- --->
- `pialert.conf` moved from `back` to `config` folder
- `pialert.conf` splitted in two files: `pialert.conf` and `version.conf`
- Added compatibility with Python 3 (default version installed with Ubuntu)
- Added compatibility in the Installation guide with Ubuntu server
- Eliminated some unnecessary packages from the installation
### License
GPL 3.0
[Read more here](../LICENSE.txt)
### Contact
Always use the Issue tracker for the correct fork, for example:
[jokob-sk/NetAlertX](https://github.com/jokob-sk/NetAlertX/issues). Please also follow the guidelines on:
- [Pull Request guidelines](https://github.com/jokob-sk/NetAlertX/tree/main/docs#-pull-requests-prs)
- 🙏 [Feature request guidelines](https://github.com/jokob-sk/NetAlertX/tree/main/docs#-feature-requests)
- 🐛 [Issue guidelines](https://github.com/jokob-sk/NetAlertX/tree/main/docs#-submitting-an-issue-or-bug)

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -209,26 +209,38 @@ $db->close();
</div>
</div>
<div class="tab-pane" id="tab_BackupRestore">
<div class="db_info_table">
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnExportCSV" onclick="ExportCSV()"><?= lang('Maintenance_Tool_ExportCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ExportCSV_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportCSV" onclick="askImportCSV()"><?= lang('Maintenance_Tool_ImportCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportCSV_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportPastedCSV" onclick="askImportPastedCSV()"><?= lang('Maintenance_Tool_ImportPastedCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportPastedCSV_text');?></div>
</div>
</div>
<div class="db_info_table">
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnExportCSV" onclick="ExportCSV()"><?= lang('Maintenance_Tool_ExportCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ExportCSV_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportCSV" onclick="askImportCSV()"><?= lang('Maintenance_Tool_ImportCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportCSV_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportPastedCSV" onclick="askImportPastedCSV()"><?= lang('Maintenance_Tool_ImportPastedCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportPastedCSV_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnDownloadConfig" onclick="DownloadConfig()"><?= lang('Maintenance_Tool_DownloadConfig');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_DownloadConfig_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportPastedConfig" onclick="askImportPastedConfig()"><?= lang('Maintenance_Tool_ImportPastedConfig');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportPastedConfig_text');?></div>
</div>
</div>
</div>
<!-- ---------------------------Logging-------------------------------------------- -->
<div class="tab-pane" id="tab_Logging">
@@ -445,6 +457,44 @@ function restartBackend() {
})
}
// -----------------------------------------------------------
// Import pasted Config ASK
function askImportPastedConfig() {
// Add new icon as base64 string
showModalInput ('<i class="fa fa-square-plus pointer"></i> <?= lang('Maintenance_Tool_ImportConfig_noti');?>', '<?= lang('Maintenance_Tool_ImportPastedConfig_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'UploadConfig');
}
// -----------------------------------------------------------
// Upload Settings Config
function UploadConfig()
{
// alert("aaa")
appConf = $('#modal-input-textarea').val()
// encode for import
appConfBase64 = btoa(appConf)
// import
$.post('php/server/query_replace_config.php', { config: appConfBase64 }, function(msg) {
console.log(msg);
// showMessage(msg);
write_notification(`[Maintenance] Settings imported from backup: ${msg}`, 'interrupt');
});
}
// -----------------------------------------------------------
// Download Settings Config
function DownloadConfig()
{
// Execute
openInNewTab("php/server/query_config.php?file=app.conf&download=true")
}
// -----------------------------------------------------------
// Export CSV
function ExportCSV()

View File

@@ -81,7 +81,7 @@
settingsData = res["data"];
excludedColumns = ["NEWDEV_devMac", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devLastNotification", "NEWDEV_devStaticIP", "NEWDEV_devScan", "NEWDEV_devPresentLastScan", "NEWDEV_devCustomProps" ]
excludedColumns = ["NEWDEV_devMac", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devLastNotification", "NEWDEV_devScan", "NEWDEV_devPresentLastScan", "NEWDEV_devCustomProps" ]
const relevantColumns = settingsData.filter(set =>
set.setGroup === "NEWDEV" &&

View File

@@ -11,7 +11,11 @@
?>
<!-- ----------------------------------------------------------------------- -->
<script>
// show spinning icon
showSpinner()
</script>
<!-- Page ------------------------------------------------------------------ -->
@@ -484,6 +488,8 @@
return;
}
orderTopologyBy = createArray(getSetting("UI_TOPOLOGY_ORDER"))
devicesListnew = rawData["data"].map(item => {
return {
"name": item[0],
@@ -497,13 +503,30 @@
"port": item[18]
};
}).sort((a, b) => {
// First sort by name alphabetically
const nameCompare = a.name.localeCompare(b.name);
if (nameCompare !== 0) {
// Helper to safely parse port into an integer; invalid ports become Infinity for sorting
const parsePort = (port) => {
const parsed = parseInt(port, 10);
return isNaN(parsed) ? Infinity : parsed;
};
switch (orderTopologyBy[0]) {
case "Name":
// First sort by name alphabetically
const nameCompare = a.name.localeCompare(b.name);
if (nameCompare !== 0) {
return nameCompare;
}
// If names are the same, sort by port numerically
return a.port - b.port;
}
// If names are the same, sort by port numerically
return parsePort(a.port) - parsePort(b.port);
case "Port":
// Sort by port numerically
return parsePort(a.port) - parsePort(b.port);
default:
// Default: Sort by rowid (as a fallback)
return a.rowid - b.rowid;
}
});
setCache('devicesListNew', JSON.stringify(devicesListnew));
@@ -885,9 +908,6 @@
}
}
// show spinning icon
showSpinner()
// init device names where macs are used
initDeviceNamesFromMACs();

View File

@@ -273,7 +273,8 @@ function setDeviceData() {
devFirstConnection,
devLastIP,
devGUID,
devCustomProps
devCustomProps,
devSourcePlugin
) VALUES (
'$mac',
'$name',
@@ -300,7 +301,8 @@ function setDeviceData() {
'$devFirstConnection',
'$ip',
'$devNewGuid',
'$devCustomProps'
'$devCustomProps',
'DUMMY'
)";
}

View File

@@ -11,8 +11,9 @@ require dirname(__FILE__).'/../server/init.php';
//------------------------------------------------------------------------------
// Handle incoming requests
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// Get query string parameter ?file=settings_table.json
// Get query string parameters ?file=settings_table.json&download=true
$file = isset($_GET['file']) ? $_GET['file'] : null;
$download = isset($_GET['download']) ? $_GET['download'] === 'true' : false;
// Check if file parameter is provided
if ($file) {
@@ -21,9 +22,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// Check if the file exists
if (file_exists($filePath)) {
// Send the response back to the client
header('Content-Type: text/plain');
echo file_get_contents($filePath);
// Handle download behavior
if ($download) {
// Force file download
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($filePath) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($filePath));
readfile($filePath);
exit;
} else {
// Display file content
header('Content-Type: text/plain');
echo file_get_contents($filePath);
}
} else {
// File not found response
http_response_code(404);

View File

@@ -28,10 +28,10 @@
<!-- To the right -->
<div class="pull-right no-hidden-xs">
| <a href="https://gurubase.io/g/netalertx" target="_blank" title="Ask AI"><i class="fa-regular fa-comment-dots fa-flip-horizontal"></i></a>
| <a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs#documentation-overview" target="_blank" title="Documentation"><i class="fa fa-book"></i></a>
| <a href="https://github.com/jokob-sk/NetAlertX/issues" target="_blank"><i class="fa-solid fa-bug" title="Report a bug"></i></a>
| <a href="https://discord.com/invite/NczTUTWyRr" target="_blank"><i class="fa-brands fa-discord" title="Join Discord"></i></a>
| <a href="https://gurubase.io/g/netalertx" class="pointer" target="_blank" title="Ask AI"><i class="fa-regular fa-comment-dots fa-flip-horizontal"></i></a>
| <a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs#documentation-overview" class="pointer" target="_blank" title="Documentation"><i class="fa fa-book"></i></a>
| <a href="https://github.com/jokob-sk/NetAlertX/issues" class="pointer" target="_blank"><i class="fa-solid fa-bug" title="Report a bug"></i></a>
| <a href="https://discord.com/invite/NczTUTWyRr" class="pointer" target="_blank"><i class="fa-brands fa-discord" title="Join Discord"></i></a>
| <?= lang('Maintenance_built_on');?>: <?php include 'php/templates/build.php'; ?>
| Version: <?php include 'php/templates/version.php'; ?>
|

View File

@@ -185,13 +185,13 @@
</li>
<!-- Clear cache & Reload -->
<li>
<a id="reload-button" href='#' role="button" span class='fa fa-repeat' onclick='clearCache()'></a>
<a id="reload-button" href='#' role="button" span onclick='clearCache()'>🔃</a>
</li>
<!-- Full Screen -->
<li>
<a id="fullscreen-button" href='#' role="button" span class='fa fa-arrows-alt' onclick='toggleFullscreen()'></a>
</li>
<!-- Full Screen -->
<!-- Notifications -->
<li>
<a id="notifications-button" href='userNotifications.php' role="button" span class='fa-solid fa-bell'></a>
<span id="unread-notifications-bell-count" title="" class="badge bg-red unread-notifications-bell" >0</span>

View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "",
"Maintenance_Status": "",
"Maintenance_Title": "",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "",
"Maintenance_Tool_ExportCSV_noti": "",
"Maintenance_Tool_ExportCSV_noti_text": "",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "",
"Maintenance_Tool_ImportCSV_noti_text": "",
"Maintenance_Tool_ImportCSV_text": "",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "",
"Maintenance_Tool_arpscansw_noti": "",
"Maintenance_Tool_arpscansw_noti_text": "",

6
front/php/templates/language/ca_ca.json Executable file → Normal file
View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Versió instal·lada",
"Maintenance_Status": "Estat",
"Maintenance_Title": "Eines de manteniment",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "CSV Exportació",
"Maintenance_Tool_ExportCSV_noti": "CSV Exportació",
"Maintenance_Tool_ExportCSV_noti_text": "Estàs segur que vols generar un fitxer CSV?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "CSV Importació",
"Maintenance_Tool_ImportCSV_noti_text": "Estàs segur que vols importar el fitxer CSV? Això <b> sobreescriurà</b> completament els dispositius de la seva base de dades.",
"Maintenance_Tool_ImportCSV_text": "Abans d'utilitzar aquesta funció, fes una còpia de seguretat, si us plau. Importa un CSV (comma separated value) el fitxer que conté la llista dels dispositius que inclouen les relacions de Xarxa entre Nodes i dispositius connectats. Per fer-ho col·loca el CSV el fitxer anomenat <b>devices.csv</b> a la vostra <b>/config</b> carpeta.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Importació CSV (Paste)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Estàs segur que vols importar el CSV copiat? Això <b> sobreescriurà</b> completament els dispositius de la base de dades.",
"Maintenance_Tool_ImportPastedCSV_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. Importar un fitxer CSV (comma separated value) que contingui la llista de dispositius, incloent les relacions de xarxa entre els nodes i els dispositius connectats.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Conmuta arp-Scan (on/off)",
"Maintenance_Tool_arpscansw_noti": "Conmuta arp-Scan on or off",
"Maintenance_Tool_arpscansw_noti_text": "Quan l'escàner ha estat canviat a off es queda off fins que és activat de bell nou.",

View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "",
"Maintenance_Status": "",
"Maintenance_Title": "",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "",
"Maintenance_Tool_ExportCSV_noti": "",
"Maintenance_Tool_ExportCSV_noti_text": "",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "",
"Maintenance_Tool_ImportCSV_noti_text": "",
"Maintenance_Tool_ImportCSV_text": "",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "",
"Maintenance_Tool_arpscansw_noti": "",
"Maintenance_Tool_arpscansw_noti_text": "",

6
front/php/templates/language/de_de.json Executable file → Normal file
View File

@@ -424,6 +424,8 @@
"Maintenance_Running_Version": "Installierte Version",
"Maintenance_Status": "Status",
"Maintenance_Title": "Wartungswerkzeuge",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "CSV Export",
"Maintenance_Tool_ExportCSV_noti": "CSV Export",
"Maintenance_Tool_ExportCSV_noti_text": "Sind Sie sich sicher, dass Sie die CSV-Datei erstellen wollen?",
@@ -432,9 +434,13 @@
"Maintenance_Tool_ImportCSV_noti": "CSV Import",
"Maintenance_Tool_ImportCSV_noti_text": "Sind Sie sich sicher, dass Sie die CSV-Datei importieren wollen? Dies wird <b>alle Geräte in der Datenbank überschreiben</b>.",
"Maintenance_Tool_ImportCSV_text": "Machen Sie ein Backup, bevor Sie diese Funk­tion nutzen. Importiere eine CSV-Datei (comma separated values) mit einer Liste aller Geräte und deren Beziehungen zwischen Netzwerkknoten und verbundenen Geräten. Um dies zu tun platziere die <b>devices.csv</b> benannte CSV-Datei in deinen <b>/config</b> Ordner.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "CSV-Import (Einfügen)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "ARP-Scan umschalten (ein/aus)",
"Maintenance_Tool_arpscansw_noti": "ARP-Scan ein- oder ausschalten",
"Maintenance_Tool_arpscansw_noti_text": "Wenn der Scan aus ist, bleibt er so lange aus bis er wieder aktiviert wird.",

View File

@@ -1,7 +1,7 @@
{
"API_CUSTOM_SQL_description": "You can specify a custom SQL query which will generate a JSON file and then expose it via the <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code> file endpoint</a>.",
"API_CUSTOM_SQL_name": "Custom endpoint",
"API_TOKEN_description": "API token to secure communication, you can generate one or enter any value. It's sent in the request header. Used in the <code>SYNC</code> plugin, GraphQL server.",
"API_TOKEN_description": "API token for secure communication. Generate one or enter any value. It's sent in the request header and used in the <code>SYNC</code> plugin, GraphQL server and other API endpoints. You can use the API endpoints to create custom integrations as descibed in the a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">API documentation</a>.",
"API_TOKEN_name": "API token",
"API_display_name": "API",
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
@@ -398,17 +398,23 @@
"Maintenance_Running_Version": "Installed version",
"Maintenance_Status": "Status",
"Maintenance_Title": "Maintenance tools",
"Maintenance_Tool_ExportCSV": "CSV Export",
"Maintenance_Tool_ExportCSV_noti": "CSV Export",
"Maintenance_Tool_DownloadConfig": "Settings Export",
"Maintenance_Tool_DownloadConfig_text": "Download a full backup of your Settings configuration stored in the <code>app.conf</code> file.",
"Maintenance_Tool_ExportCSV": "Devices Export (csv)",
"Maintenance_Tool_ExportCSV_noti": "Devices Export (csv)",
"Maintenance_Tool_ExportCSV_noti_text": "Are you sure you want to generate a CSV file?",
"Maintenance_Tool_ExportCSV_text": "Generate a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. You can also trigger this by accessing this URL <code>your NetAlertX url/php/server/devices.php?action=ExportCSV</code> or by enabling the <a href=\"settings.php#CSVBCKP_header\">CSV Backup</a> plugin.",
"Maintenance_Tool_ImportCSV": "CSV Import",
"Maintenance_Tool_ImportCSV_noti": "CSV Import",
"Maintenance_Tool_ExportCSV_text": "Generate a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. You can also trigger this by accessing this URL <code>your_NetAlertX_url/php/server/devices.php?action=ExportCSV</code> or by enabling the <a href=\"settings.php#CSVBCKP_header\">CSV Backup</a> plugin.",
"Maintenance_Tool_ImportCSV": "Devices Import (csv)",
"Maintenance_Tool_ImportCSV_noti": "Devices Import (csv)",
"Maintenance_Tool_ImportCSV_noti_text": "Are you sure you want to import the CSV file? This will completely <b>overwrite</b> the devices in your database.",
"Maintenance_Tool_ImportCSV_text": "Before using this function, please make a backup. Import a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. To do that place the CSV file named <b>devices.csv</b> into your <b>/config</b> folder.",
"Maintenance_Tool_ImportPastedCSV": "CSV Import (Paste)",
"Maintenance_Tool_ImportConfig_noti": "Settings Import (app.conf)",
"Maintenance_Tool_ImportPastedCSV": "Devices Import (csv) (paste)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Are you sure you want to import the pasted CSV? This will completely <b>overwrite</b> the devices in your database.",
"Maintenance_Tool_ImportPastedCSV_text": "Before using this function, please make a backup. Import a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices.",
"Maintenance_Tool_ImportPastedConfig": "Settings Import (paste)",
"Maintenance_Tool_ImportPastedConfig_noti_text": "Are you sure you want to import the pasted config settings? This will completely <b>overwrite</b> the <code>app.conf</code> file.",
"Maintenance_Tool_ImportPastedConfig_text": "Imports the <code>app.conf</code> file containing all the application Settings. You might want to download the current <code>app.conf</code> file first with the <b>Settings Export</b>.",
"Maintenance_Tool_arpscansw": "Toggle arp-Scan (on/off)",
"Maintenance_Tool_arpscansw_noti": "Toggle arp-Scan on or off",
"Maintenance_Tool_arpscansw_noti_text": "When the scan has been switched off it remains off until it is activated again.",
@@ -489,7 +495,7 @@
"Maintenance_themeselector_lable": "Select Skin",
"Maintenance_themeselector_text": "The change takes place on the server side, so it affects all devices in use.",
"Maintenance_version": "App updates",
"NETWORK_DEVICE_TYPES_description": "Which device types are allowed to be used as network devices in the Network view. The device type has to match exactly the <code>Type</code> setting on a specific device in Device details. Add it on teh Device via the <code>+</code> button. Do not remove existing types, only add new ones.",
"NETWORK_DEVICE_TYPES_description": "Which device types are allowed to be used as network devices in the Network view. The device type has to match exactly the <code>Type</code> setting on a specific device in Device details. Add it on the Device via the <code>+</code> button. Do not remove existing types, only add new ones.",
"NETWORK_DEVICE_TYPES_name": "Network device types",
"Navigation_About": "About",
"Navigation_Devices": "Devices",

6
front/php/templates/language/es_es.json Executable file → Normal file
View File

@@ -422,6 +422,8 @@
"Maintenance_Running_Version": "Versión instalada",
"Maintenance_Status": "Situación",
"Maintenance_Title": "Herramientas de mantenimiento",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Exportación CSV",
"Maintenance_Tool_ExportCSV_noti": "Exportación CSV",
"Maintenance_Tool_ExportCSV_noti_text": "¿Está seguro de que quiere generar un archivo CSV?",
@@ -430,9 +432,13 @@
"Maintenance_Tool_ImportCSV_noti": "Importación CSV",
"Maintenance_Tool_ImportCSV_noti_text": "¿Estás seguro de que quieres importar el archivo CSV? Esto <b>sobrescribirá</b> completamente los dispositivos en su base de datos.",
"Maintenance_Tool_ImportCSV_text": "Antes de usar esta función, haga una copia de seguridad. Importe un archivo CSV (valor separado por comas) que contiene la lista de dispositivos, incluidas las relaciones de red entre nodos de red y dispositivos conectados. Para hacer eso, coloque el archivo CSV llamado <b> devices.csv </b> en su carpeta <b>/config </b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Importar CSV (Pegar)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "¿Seguro que desea importar el CSV pegado? Esto <b>sobrescribirá</b> completamente los dispositivos en su base de datos.",
"Maintenance_Tool_ImportPastedCSV_text": "Antes de usar esta función, por favor haga una copia de seguridad. Importar un archivo CSV (valor separado por comas) que contiene la lista de Dispositivos incluyendo las relaciones de red entre los Nodos de red y los dispositivos conectados.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Activar arp-scan (on/off)",
"Maintenance_Tool_arpscansw_noti": "Activar arp-scan on or off",
"Maintenance_Tool_arpscansw_noti_text": "Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente.",

6
front/php/templates/language/fr_fr.json Executable file → Normal file
View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Version installée",
"Maintenance_Status": "État",
"Maintenance_Title": "Outils de maintenance",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Export en CSV",
"Maintenance_Tool_ExportCSV_noti": "Export en CSV",
"Maintenance_Tool_ExportCSV_noti_text": "Êtes-vous sûr de vouloir générer un fichier CSV?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "Import CSV",
"Maintenance_Tool_ImportCSV_noti_text": "Êtes-vous sûr de vouloir importer le fichier CSV? Cela <b>écrasera</b> complètement les appareils de votre base de données.",
"Maintenance_Tool_ImportCSV_text": "Avant d'utiliser cette fonctionnalité, il est recommandé de faire une sauvegarde. La fonctionnalité importe un fichier CSV (valeurs séparées par des virgules) contenant la liste des appareils, dont les liens réseau entre les nœuds du réseau et ces appareils. Pour cela, placer un fichier CSV nommé <b>devices.csv</b> dans votre répertoire <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Import CSV (coller)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Êtes-vous sûr de vouloir importer les CSV copié? Cela va complètement <b>remplacer</b> les appareils de votre base de données.",
"Maintenance_Tool_ImportPastedCSV_text": "Avant d'utiliser cette fonctionnalité, il est recommandé de faire une sauvegarde. Importe un fichier CSV (valeurs séparées par des virgules) contenant la liste des appareils, dont les liens réseaux entre les nœuds du réseau et les appareils connectés.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Basculer l'arp-Scan (activé/désactivé)",
"Maintenance_Tool_arpscansw_noti": "Activer ou désactiver l'arp-Scan",
"Maintenance_Tool_arpscansw_noti_text": "Une fois le scan désactivé, il reste désactivé jusqu'à ce qu'il soit réactivé.",

8
front/php/templates/language/it_it.json Executable file → Normal file
View File

@@ -1,7 +1,7 @@
{
"API_CUSTOM_SQL_description": "Puoi specificare una query SQL personalizzata che genererà un file JSON e quindi lo esporrà tramite l'<a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code>endpoint del file</a>.",
"API_CUSTOM_SQL_name": "Endpoint personalizzato",
"API_TOKEN_description": "Token API per proteggere la comunicazione, puoi generarne uno o inserire qualsiasi valore. Viene inviato nell'intestazione della richiesta. Usato nel plugin <code>SYNC</code>, server GraphQL.",
"API_TOKEN_description": "Token API per comunicazioni sicure. Generane uno o inserisci un valore qualsiasi. Viene inviato nell'intestazione della richiesta e utilizzato nel plugin <code>SYNC</code>, nel server GraphQL e in altri endpoint API. Puoi utilizzare gli endpoint API per creare integrazioni personalizzate come descritto nella a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">documentazione API</a>.",
"API_TOKEN_name": "Token API",
"API_display_name": "API",
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Versione installata",
"Maintenance_Status": "Stato",
"Maintenance_Title": "Strumenti di manutenzione",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Esporta CSV",
"Maintenance_Tool_ExportCSV_noti": "Esporta CSV",
"Maintenance_Tool_ExportCSV_noti_text": "Sei sicuro di voler generare un file CSV?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "Importa CSV",
"Maintenance_Tool_ImportCSV_noti_text": "Sei sicuro di voler importare il file CSV? Questa operazione <b>sovrascriverà</b> tutti i dispositivi presenti nel database.",
"Maintenance_Tool_ImportCSV_text": "Prima di utilizzare questa funzione, esegui un backup. Importa un file CSV (comma separated value) contenente la lista dei dispositivi incluse le relazioni di rete tra i nodi di rete e i dispositivi connessi. Per far ciò posiziona il file CSV denominato <b>devices.csv</b> nella cartella <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Importazione CSV (incolla)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Sei sicuro di voler importare il CSV incollato? Questo <b>sovrascriverà</b> completamente i dispositivi nel tuo database.",
"Maintenance_Tool_ImportPastedCSV_text": "Prima di utilizzare questa funzione, esegui un backup. Importa un file CSV (valori separati da virgole) contenente l'elenco dei dispositivi, comprese le relazioni di rete tra i nodi di rete e i dispositivi collegati.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Attiva/disattiva arp-Scan",
"Maintenance_Tool_arpscansw_noti": "Attiva o disattiva arp-Scan",
"Maintenance_Tool_arpscansw_noti_text": "Una volta disattivata la scansione rimane disattivata finché non viene nuovamente attivata.",

6
front/php/templates/language/nb_no.json Executable file → Normal file
View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Installert versjon",
"Maintenance_Status": "Status",
"Maintenance_Title": "Vedlikeholdsverktøy",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Eksporter CSV",
"Maintenance_Tool_ExportCSV_noti": "Eksporter CSV",
"Maintenance_Tool_ExportCSV_noti_text": "Er du sikker på at du vil generere en CSV-fil?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "Importer CSV",
"Maintenance_Tool_ImportCSV_noti_text": "Er du sikker på at du vil importere CSV-filen? Dette vil fullstendig overskrive enhetene i databasen din.",
"Maintenance_Tool_ImportCSV_text": "Før du bruker denne funksjonen, vennligst ta en sikkerhetskopi. Importer en CSV-fil (kommaseparert verdi) som inneholder listen over enheter, inkludert nettverksrelasjoner mellom nettverksnoder og tilkoblede enheter. For å gjøre det, plasser CSV-filen med navnet <b>devices.csv</b> i mappen <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Slå arp-Scan (på/av)",
"Maintenance_Tool_arpscansw_noti": "Slå arp-Scan på eller av",
"Maintenance_Tool_arpscansw_noti_text": "Når skanningen er slått av, forblir den slått av til den aktiveres igjen.",

6
front/php/templates/language/pl_pl.json Executable file → Normal file
View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Zainstalowana wersja",
"Maintenance_Status": "Status",
"Maintenance_Title": "Narzędzia konserwacyjne",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Eksport CSV",
"Maintenance_Tool_ExportCSV_noti": "Eksport CSV",
"Maintenance_Tool_ExportCSV_noti_text": "Jesteś pewien, że chcesz wygenerować plik CSV?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "Import CSV",
"Maintenance_Tool_ImportCSV_noti_text": "Jesteś pewien że chcesz zaimportować plik CSV? Nadpisze to wszystkie urządzenie w bazie danych.",
"Maintenance_Tool_ImportCSV_text": "Przed użyciem tej funkcji, wykonaj proszę kopię zapasową. Zaimportuj plik CSV (wartości oddzielone przecinkami) zawierający listę Urządzeń, w tym Relacji Sieci między sieciowymi węzłami i podłączonymi urządzeniami. By to zrobić umieść plik CSV nazwany <b>devices.csv</b> do twojego folderu <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Przełącz Skan-arp (wł/wył)",
"Maintenance_Tool_arpscansw_noti": "Przełącz Skan-arp na włączony lub wyłączony",
"Maintenance_Tool_arpscansw_noti_text": "Kiedy skan zostanie przełączony na wył zostaje wyłączony do czasu ponownej aktywacji.",

View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "",
"Maintenance_Status": "",
"Maintenance_Title": "",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "",
"Maintenance_Tool_ExportCSV_noti": "",
"Maintenance_Tool_ExportCSV_noti_text": "",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "",
"Maintenance_Tool_ImportCSV_noti_text": "",
"Maintenance_Tool_ImportCSV_text": "",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "",
"Maintenance_Tool_arpscansw_noti": "",
"Maintenance_Tool_arpscansw_noti_text": "",

16
front/php/templates/language/ru_ru.json Executable file → Normal file
View File

@@ -1,7 +1,7 @@
{
"API_CUSTOM_SQL_description": "Вы можете указать собственный SQL-запрос, который будет генерировать файл JSON, а затем предоставлять его через конечную точку файла <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code></a>.",
"API_CUSTOM_SQL_name": "Пользовательская конечная точка",
"API_TOKEN_description": "API-токен для защиты соединения. Вы можете сгенерировать его или ввести любое значение. Он отправляется в заголовке запроса. Используется в плагине <code>SYNC</code> и GraphQL сервере.",
"API_TOKEN_description": "API-токен для безопасной связи. Сгенерируйте его или введите любое значение. Он передается в заголовке запроса и используется в плагине <code>SYNC</code>, сервере GraphQL и других конечных точках API. Вы можете использовать конечные точки API для создания пользовательских интеграций, как описано в a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">документации по API</a>.",
"API_TOKEN_name": "API token",
"API_display_name": "API",
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
@@ -248,8 +248,8 @@
"Donations_Title": "Пожертвования",
"ENABLE_PLUGINS_description": "Включает функциональность <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins\">плагинов.</a> Загрузка плагинов требует больше аппаратных ресурсов, поэтому вы можете отключить их в маломощной системе.",
"ENABLE_PLUGINS_name": "Разрешить плагины",
"ENCRYPTION_KEY_description": "",
"ENCRYPTION_KEY_name": "",
"ENCRYPTION_KEY_description": "Ключ шифрования данных.",
"ENCRYPTION_KEY_name": "Ключ шифрования",
"Email_display_name": "Эл. почта",
"Email_icon": "<i class=\"fa fa-at\"></i>",
"Events_Loading": "Загрузка...",
@@ -285,7 +285,7 @@
"Events_Tablelenght": "Показать _MENU_ записей",
"Events_Tablelenght_all": "Все",
"Events_Title": "События",
"GRAPHQL_PORT_description": "Номер порта сервера GraphQL.",
"GRAPHQL_PORT_description": "Номер порта сервера GraphQL. Убедитесь, что порт уникален для всех ваших приложений на этом хосте и экземпляров NetAlertX.",
"GRAPHQL_PORT_name": "Порт GraphQL",
"Gen_Action": "Действия",
"Gen_Add": "Добавить",
@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Установленная версия",
"Maintenance_Status": "Статус",
"Maintenance_Title": "Инструменты обслуживания",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Экспорт CSV",
"Maintenance_Tool_ExportCSV_noti": "Экспорт CSV",
"Maintenance_Tool_ExportCSV_noti_text": "Вы уверены, что хотите создать файл CSV?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "Импорт CSV",
"Maintenance_Tool_ImportCSV_noti_text": "Вы уверены, что хотите импортировать файл CSV? Это полностью <b>перезапишет</b> устройства в вашей базе данных.",
"Maintenance_Tool_ImportCSV_text": "Прежде чем использовать эту функцию, сделайте резервную копию. Импортируйте файл CSV (значения, разделенные запятыми), содержащий список устройств, включая сетевые отношения между сетевыми узлами и подключенными устройствами. Для этого поместите файл CSV с именем <b>devices.csv</b> в папку <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Импорт CSV (вставка)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Вы уверены, что хотите импортировать вставленный CSV? Это полностью <b>перезапишет</b> устройства в вашей базе данных.",
"Maintenance_Tool_ImportPastedCSV_text": "Перед использованием этой функции, пожалуйста, создайте резервную копию. Импортируйте файл формата CSV (значения, разделенные запятыми), содержащий список устройств, включая сетевые связи между узлами сети и подключенными устройствами.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Переключить arp-скан (ВКЛ./ВЫКЛ.)",
"Maintenance_Tool_arpscansw_noti": "Включить или выключить arp-скан",
"Maintenance_Tool_arpscansw_noti_text": "Когда сканирование было выключено, оно остается выключенным до тех пор, пока не будет активировано снова.",
@@ -489,7 +495,7 @@
"Maintenance_themeselector_lable": "Выбрать Скин",
"Maintenance_themeselector_text": "Изменение происходит на стороне сервера, поэтому оно затрагивает все используемые устройства.",
"Maintenance_version": "Обновления приложения",
"NETWORK_DEVICE_TYPES_description": "Какие типы устройств разрешено использовать в качестве сетевых устройств в представлении «Сеть». Тип устройства должен точно соответствовать настройке <code>Тип</code> на конкретном устройстве в разделе «Сведения об устройстве». Не удаляйте существующие типы, а только добавляйте новые.",
"NETWORK_DEVICE_TYPES_description": "Какие типы устройств разрешено использовать в качестве сетевых устройств в представлении Сеть. Тип устройства должен точно соответствовать настройке <code>Type</code> для конкретного устройства в сведениях об устройстве. Добавьте его на устройство с помощью кнопки <code>+</code>. Не удаляйте существующие типы, а только добавляйте новые.",
"NETWORK_DEVICE_TYPES_name": "Типы сетевых устройств",
"Navigation_About": "О NetAlertX",
"Navigation_Devices": "Устройства",

View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Yüklenmiş sürüm",
"Maintenance_Status": "Durum",
"Maintenance_Title": "",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "",
"Maintenance_Tool_ExportCSV_noti": "",
"Maintenance_Tool_ExportCSV_noti_text": "Bir CSV dosyası oluşturmak istediğinize emin misiniz?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "",
"Maintenance_Tool_ImportCSV_noti_text": "",
"Maintenance_Tool_ImportCSV_text": "",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "",
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
"Maintenance_Tool_ImportPastedCSV_text": "",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "",
"Maintenance_Tool_arpscansw_noti": "",
"Maintenance_Tool_arpscansw_noti_text": "",

6
front/php/templates/language/uk_ua.json Executable file → Normal file
View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "Встановлена версія",
"Maintenance_Status": "Статус",
"Maintenance_Title": "Інструменти обслуговування",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Експорт CSV",
"Maintenance_Tool_ExportCSV_noti": "Експорт CSV",
"Maintenance_Tool_ExportCSV_noti_text": "Ви впевнені, що хочете створити файл CSV?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "Імпорт CSV",
"Maintenance_Tool_ImportCSV_noti_text": "Ви впевнені, що бажаєте імпортувати файл CSV? Це повністю <b>перезапише</b> пристрої у вашій базі даних.",
"Maintenance_Tool_ImportCSV_text": "Перед використанням цієї функції зробіть резервну копію. Імпортуйте файл CSV (значення, розділене комами), який містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Для цього помістіть файл CSV під назвою <b>devices.csv</b> у папку <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Імпорт CSV (вставити)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Ви впевнені, що бажаєте імпортувати вставлений CSV? Це повністю <b>перезапише</b> пристрої у вашій базі даних.",
"Maintenance_Tool_ImportPastedCSV_text": "Перед використанням цієї функції зробіть резервну копію. Імпортуйте файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеним пристроєм.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Перемикач arp-сканування (увімк./вимк.)",
"Maintenance_Tool_arpscansw_noti": "Увімкніть або вимкніть arp-Scan",
"Maintenance_Tool_arpscansw_noti_text": "Коли сканування було вимкнено, воно залишається вимкненим, доки не буде активовано знову.",

6
front/php/templates/language/zh_cn.json Executable file → Normal file
View File

@@ -398,6 +398,8 @@
"Maintenance_Running_Version": "安装版本",
"Maintenance_Status": "状态",
"Maintenance_Title": "维护工具",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "CSV 导出",
"Maintenance_Tool_ExportCSV_noti": "CSV 导出",
"Maintenance_Tool_ExportCSV_noti_text": "您确定要生成 CSV 文件吗?",
@@ -406,9 +408,13 @@
"Maintenance_Tool_ImportCSV_noti": "CSV 导入",
"Maintenance_Tool_ImportCSV_noti_text": "您确定要导入 CSV 文件吗?这将完全<b>覆盖</b>数据库中的设备。",
"Maintenance_Tool_ImportCSV_text": "在使用此功能之前,请先备份。导入一个 CSV逗号分隔值文件其中包含设备列表包括网络节点和连接设备之间的网络关系。为此请将名为 <b>devices.csv</b> 的 CSV 文件放入您的 <b>/config</b> 文件夹中。",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "CSV 导入(粘贴)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "您确定要导入粘贴的 CSV 吗?这将完全<b>覆盖</b>数据库中的设备。",
"Maintenance_Tool_ImportPastedCSV_text": "使用此功能前,请先备份。导入一个包含设备列表(包括网络节点和所连接设备之间的网络关系)的 CSV逗号分隔值文件。",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "切换 arp 扫描(开/关)",
"Maintenance_Tool_arpscansw_noti": "打开或关闭 arp 扫描",
"Maintenance_Tool_arpscansw_noti_text": "当扫描关闭时,它会保持关闭状态,直到再次激活为止。",

View File

@@ -1,7 +1,27 @@
## Overview
Plugin for device name discovery via the Mikrotik dhcp-server leases
The plugin uses the MikroTik API to discover devices by retrieving DHCP lease information.
### Prerequisites
- API must be enabled in `API > Interfaces` on your MikroTik router.
- A user must be created in `System > Users` on your MikroTik router. Read-only permissions are recommended for security.
### Usage
- Check the Settings page for details.
It is recommended to use this plugin in scheduled mode for continuous device discovery and monitoring.
In the Settings section of NetAlertX, provide the following parameters:
- **MTSCAN_MT_HOST**: IP address of the MikroTik router (default: `192.168.88.1`).
- **MTSCAN_MT_PORT**: Port for the MikroTik API (default: `8728`).
- **MTSCAN_MT_USER**: Username for the MikroTik router.
- **MTSCAN_MT_PASS**: Password for the MikroTik router.
### Device name resolution order
To assign a meaningful device name, the plugin resolves it in the following order:
- **Comment**: The `comment` field in the MikroTik router's DHCP lease configuration. This is useful for naming static leases of known devies.
- **Hostname**: The hostname provided by the device during DHCP negotiation.
- **"(unknown)"**: as the fallback name, allowing other plugins to resolve the device name later.

View File

@@ -34,6 +34,12 @@ Confirm SNMP enabled
show snmp
````
### Setup for (old) procurve switches
```
snmpwalk -v 2c -c XXXXXX -On -Ovq 192.168.45.58 .1.3.6.1.2.1.4.22.1.3.102
```
### Notes
- Only IPv4 supported.

View File

@@ -493,6 +493,34 @@
"string": "UI theme to use. System will auto switch between Light and Dark."
}
]
},
{
"function": "TOPOLOGY_ORDER",
"type": {
"dataType": "array",
"elements": [
{
"elementType": "select",
"elementOptions": [{ "multiple": "false", "orderable": "false" }],
"transformers": []
}
]
},
"default_value": "Name",
"options": ["Name","Port"],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Order by in Network"
}
],
"description": [
{
"language_code": "en_us",
"string": "Based on which value should the network topology view be ordered."
}
]
}
]
}

View File

@@ -13,15 +13,8 @@
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
<tr>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<img src="https://netalertx.com/favicon.ico" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" height="24pt" viewBox="0 0 30 30" width="24pt">
<g fill="#000000" stroke="none" transform="translate(0.000000,30) scale(0.02,-0.02)">
<path d="M605 1473 c-16 -3 -34 -9 -39 -14 -6 -5 -20 -9 -33 -9 -13 0 -23 -5 -23 -10 0 -5 -3 -9 -7 -8 -14 4 -53 -13 -53 -22 0 -5 -6 -7 -14 -4 -7 3 -27 -6 -44 -20 -16 -15 -34 -26 -39 -26 -6 0 -18 -10 -29 -21 -10 -12 -29 -25 -42 -30 -13 -5 -21 -13 -18 -18 3 -5 -4 -11 -15 -14 -12 -3 -18 -10 -15 -15 3 -5 -6 -14 -19 -20 -14 -7 -25 -18 -25 -27 0 -8 -5 -15 -12 -15 -9 0 -9 -3 -1 -11 9 -9 29 4 80 51 37 34 87 75 110 90 44 30 167 90 184 90 18 0 89 40 89 50 0 6 -1 9 -2 9 -2 -1 -16 -4 -33 -6z"></path>
<path d="M883 1454 c15 -8 55 -23 90 -34 82 -26 201 -97 257 -155 25 -25 58 -52 73 -59 l28 -12 -111 -98 -111 -97 -27 27 c-165 168 -463 163 -636 -10 l-36 -37 -58 49 c-175 149 -185 155 -200 135 -8 -10 -20 -32 -27 -49 -8 -17 -21 -36 -30 -44 -9 -7 -13 -21 -10 -31 4 -12 1 -21 -9 -25 -9 -4 -16 -11 -15 -18 1 -6 -3 -24 -9 -39 -7 -16 -10 -33 -6 -38 3 -5 0 -9 -6 -9 -7 0 -10 -7 -6 -15 3 -8 2 -15 -2 -15 -5 0 -8 -20 -7 -45 0 -25 -2 -45 -5 -45 -8 0 -5 -155 4 -207 4 -24 12 -45 17 -49 5 -3 9 -14 9 -25 0 -10 4 -27 10 -37 16 -29 43 -97 42 -104 -1 -5 3 -8 10 -8 6 0 9 -3 6 -6 -4 -3 1 -14 10 -23 31 -33 52 -61 52 -70 0 -5 8 -11 19 -14 14 -3 91 57 286 225 151 129 274 227 281 224 7 -3 130 -97 273 -210 160 -126 266 -203 275 -200 17 7 66 78 66 97 0 8 9 22 20 32 11 10 20 26 20 36 0 10 5 21 10 24 6 4 8 10 5 15 -6 10 14 50 30 62 6 5 5 8 -4 8 -11 0 -11 3 -1 15 7 8 9 15 4 15 -5 0 -2 5 6 10 11 7 12 10 2 10 -9 0 -11 7 -6 23 10 30 11 96 2 91 -5 -3 -8 -18 -8 -33 0 -15 -4 -31 -9 -36 -5 -6 -24 -53 -42 -105 -34 -102 -84 -199 -105 -207 -13 -5 -474 351 -474 367 0 5 31 37 70 71 38 35 72 69 75 77 10 26 -25 63 -81 88 -105 46 -254 24 -323 -50 -35 -37 -22 -67 54 -127 36 -28 65 -57 65 -64 0 -7 -10 -20 -22 -28 -13 -8 -117 -96 -233 -196 -116 -99 -215 -181 -221 -181 -10 0 -37 35 -76 100 -8 14 -29 65 -47 114 -27 76 -31 102 -32 190 -1 58 6 132 15 175 17 77 88 241 104 241 5 0 52 -34 103 -75 52 -42 104 -78 117 -81 21 -6 67 21 112 65 8 8 49 30 90 50 70 32 82 35 172 34 90 0 102 -3 170 -35 40 -20 90 -49 112 -67 21 -17 47 -31 57 -31 10 0 59 34 109 76 56 47 96 74 105 70 25 -9 124 -237 125 -287 0 -8 6 -23 13 -32 18 -26 10 129 -9 158 -8 13 -11 30 -8 40 5 13 4 16 -4 11 -8 -4 -12 0 -12 11 0 10 -7 27 -15 37 -8 10 -12 23 -9 27 3 5 0 9 -6 9 -6 0 -8 5 -5 10 3 6 2 10 -3 10 -5 0 -15 14 -22 30 -7 17 -16 30 -21 30 -5 0 -9 5 -9 11 0 7 -11 22 -25 35 -14 13 -25 25 -25 28 0 11 -50 55 -70 61 -11 3 -20 10 -20 15 0 13 -72 60 -81 54 -4 -2 -13 5 -19 16 -6 12 -21 20 -35 20 -14 0 -25 5 -25 10 0 6 -8 10 -19 10 -10 0 -35 7 -54 15 -20 8 -53 15 -74 15 l-38 -1 28 -15z m16 -545 c52 -26 60 -34 49 -44 -34 -33 -183 -155 -188 -155 -6 0 -161 119 -184 141 -12 11 14 33 79 64 75 37 162 35 244 -6z"></path>
<path d="M673 437 l-82 -72 89 -3 c50 -1 131 -1 181 0 l92 3 -95 73 c-53 39 -97 72 -99 71 -2 0 -41 -33 -86 -72z m125 -3 c31 -21 19 -34 -34 -34 -47 0 -57 13 -26 36 22 18 33 17 60 -2z"></path>
<path d="M369 175 c-23 -20 -48 -34 -56 -31 -7 3 -13 4 -13 2 0 -7 52 -38 67 -40 8 -1 24 -11 36 -21 12 -11 31 -21 41 -22 11 -2 25 -8 32 -14 7 -6 25 -12 41 -14 15 -2 29 -4 31 -6 1 -1 7 -3 12 -4 6 -1 11 -4 13 -5 20 -18 315 -13 351 6 16 8 36 14 45 14 9 0 21 4 27 8 5 5 35 19 66 31 31 13 71 36 87 52 17 16 36 29 43 29 7 0 0 12 -15 25 l-28 25 -369 0 -368 0 -43 -35z m741 -15 c0 -13 -99 -62 -193 -94 -101 -35 -201 -38 -317 -9 -147 37 -223 79 -183 102 24 14 693 15 693 1z"></path>
</g>
</svg>
</td>
</tr>
<tr>

View File

@@ -1,15 +1,10 @@
<!--
#---------------------------------------------------------------------------------#
# NetAlertX #
# NetAlertX #
# Open Source Network Guard / WIFI & LAN intrusion detector #
# #
# report_template.html - Back module. Template to email reporting in HTML format #
#---------------------------------------------------------------------------------#
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
#---------------------------------------------------------------------------------#
-->
<html>
@@ -21,57 +16,50 @@
<font face=sans-serif>
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
<tr>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
Net<b>Alert</b><sup>x</sup>
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" height="24pt" viewBox="0 0 30 30" width="24pt">
<g fill="#000000" stroke="none" transform="translate(0.000000,30) scale(0.02,-0.02)">
<path d="M605 1473 c-16 -3 -34 -9 -39 -14 -6 -5 -20 -9 -33 -9 -13 0 -23 -5 -23 -10 0 -5 -3 -9 -7 -8 -14 4 -53 -13 -53 -22 0 -5 -6 -7 -14 -4 -7 3 -27 -6 -44 -20 -16 -15 -34 -26 -39 -26 -6 0 -18 -10 -29 -21 -10 -12 -29 -25 -42 -30 -13 -5 -21 -13 -18 -18 3 -5 -4 -11 -15 -14 -12 -3 -18 -10 -15 -15 3 -5 -6 -14 -19 -20 -14 -7 -25 -18 -25 -27 0 -8 -5 -15 -12 -15 -9 0 -9 -3 -1 -11 9 -9 29 4 80 51 37 34 87 75 110 90 44 30 167 90 184 90 18 0 89 40 89 50 0 6 -1 9 -2 9 -2 -1 -16 -4 -33 -6z"></path>
<path d="M883 1454 c15 -8 55 -23 90 -34 82 -26 201 -97 257 -155 25 -25 58 -52 73 -59 l28 -12 -111 -98 -111 -97 -27 27 c-165 168 -463 163 -636 -10 l-36 -37 -58 49 c-175 149 -185 155 -200 135 -8 -10 -20 -32 -27 -49 -8 -17 -21 -36 -30 -44 -9 -7 -13 -21 -10 -31 4 -12 1 -21 -9 -25 -9 -4 -16 -11 -15 -18 1 -6 -3 -24 -9 -39 -7 -16 -10 -33 -6 -38 3 -5 0 -9 -6 -9 -7 0 -10 -7 -6 -15 3 -8 2 -15 -2 -15 -5 0 -8 -20 -7 -45 0 -25 -2 -45 -5 -45 -8 0 -5 -155 4 -207 4 -24 12 -45 17 -49 5 -3 9 -14 9 -25 0 -10 4 -27 10 -37 16 -29 43 -97 42 -104 -1 -5 3 -8 10 -8 6 0 9 -3 6 -6 -4 -3 1 -14 10 -23 31 -33 52 -61 52 -70 0 -5 8 -11 19 -14 14 -3 91 57 286 225 151 129 274 227 281 224 7 -3 130 -97 273 -210 160 -126 266 -203 275 -200 17 7 66 78 66 97 0 8 9 22 20 32 11 10 20 26 20 36 0 10 5 21 10 24 6 4 8 10 5 15 -6 10 14 50 30 62 6 5 5 8 -4 8 -11 0 -11 3 -1 15 7 8 9 15 4 15 -5 0 -2 5 6 10 11 7 12 10 2 10 -9 0 -11 7 -6 23 10 30 11 96 2 91 -5 -3 -8 -18 -8 -33 0 -15 -4 -31 -9 -36 -5 -6 -24 -53 -42 -105 -34 -102 -84 -199 -105 -207 -13 -5 -474 351 -474 367 0 5 31 37 70 71 38 35 72 69 75 77 10 26 -25 63 -81 88 -105 46 -254 24 -323 -50 -35 -37 -22 -67 54 -127 36 -28 65 -57 65 -64 0 -7 -10 -20 -22 -28 -13 -8 -117 -96 -233 -196 -116 -99 -215 -181 -221 -181 -10 0 -37 35 -76 100 -8 14 -29 65 -47 114 -27 76 -31 102 -32 190 -1 58 6 132 15 175 17 77 88 241 104 241 5 0 52 -34 103 -75 52 -42 104 -78 117 -81 21 -6 67 21 112 65 8 8 49 30 90 50 70 32 82 35 172 34 90 0 102 -3 170 -35 40 -20 90 -49 112 -67 21 -17 47 -31 57 -31 10 0 59 34 109 76 56 47 96 74 105 70 25 -9 124 -237 125 -287 0 -8 6 -23 13 -32 18 -26 10 129 -9 158 -8 13 -11 30 -8 40 5 13 4 16 -4 11 -8 -4 -12 0 -12 11 0 10 -7 27 -15 37 -8 10 -12 23 -9 27 3 5 0 9 -6 9 -6 0 -8 5 -5 10 3 6 2 10 -3 10 -5 0 -15 14 -22 30 -7 17 -16 30 -21 30 -5 0 -9 5 -9 11 0 7 -11 22 -25 35 -14 13 -25 25 -25 28 0 11 -50 55 -70 61 -11 3 -20 10 -20 15 0 13 -72 60 -81 54 -4 -2 -13 5 -19 16 -6 12 -21 20 -35 20 -14 0 -25 5 -25 10 0 6 -8 10 -19 10 -10 0 -35 7 -54 15 -20 8 -53 15 -74 15 l-38 -1 28 -15z m16 -545 c52 -26 60 -34 49 -44 -34 -33 -183 -155 -188 -155 -6 0 -161 119 -184 141 -12 11 14 33 79 64 75 37 162 35 244 -6z"></path>
<path d="M673 437 l-82 -72 89 -3 c50 -1 131 -1 181 0 l92 3 -95 73 c-53 39 -97 72 -99 71 -2 0 -41 -33 -86 -72z m125 -3 c31 -21 19 -34 -34 -34 -47 0 -57 13 -26 36 22 18 33 17 60 -2z"></path>
<path d="M369 175 c-23 -20 -48 -34 -56 -31 -7 3 -13 4 -13 2 0 -7 52 -38 67 -40 8 -1 24 -11 36 -21 12 -11 31 -21 41 -22 11 -2 25 -8 32 -14 7 -6 25 -12 41 -14 15 -2 29 -4 31 -6 1 -1 7 -3 12 -4 6 -1 11 -4 13 -5 20 -18 315 -13 351 6 16 8 36 14 45 14 9 0 21 4 27 8 5 5 35 19 66 31 31 13 71 36 87 52 17 16 36 29 43 29 7 0 0 12 -15 25 l-28 25 -369 0 -368 0 -43 -35z m741 -15 c0 -13 -99 -62 -193 -94 -101 -35 -201 -38 -317 -9 -147 37 -223 79 -183 102 24 14 693 15 693 1z"></path>
</g>
</svg>
</td>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 20px; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<img src="https://netalertx.com/favicon.ico" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
</td>
</tr>
<tr>
<td>
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
</tr>
</table>
</td>
<td>
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=200 valign=top style="padding: 10px">
<td height=200 valign=top style="padding: 10px">
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
<EVENTS_TABLE>
<PLUGINS_TABLE>
</td>
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
<EVENTS_TABLE>
<PLUGINS_TABLE>
</td>
</tr>
<tr>
<td>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">&copy;</span>2022
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
</td>
</tr>
</table>
</td>
<td>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">&copy;</span>2022
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>

View File

@@ -1,14 +1,9 @@
<!--
#---------------------------------------------------------------------------------#
# NetAlertX #
# NetAlertX #
# Open Source Network Guard / WIFI & LAN intrusion detector #
# #
# report_template_new_version - Back module. Template to email reporting in text #
#---------------------------------------------------------------------------------#
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
# report_template.html - Back module. Template to email reporting in HTML format #
#---------------------------------------------------------------------------------#
-->
@@ -21,61 +16,55 @@
<font face=sans-serif>
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
<tr>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
Net<b>Alert</b><sup>x</sup>
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" height="24pt" viewBox="0 0 30 30" width="24pt">
<g fill="#000000" stroke="none" transform="translate(0.000000,30) scale(0.02,-0.02)">
<path d="M605 1473 c-16 -3 -34 -9 -39 -14 -6 -5 -20 -9 -33 -9 -13 0 -23 -5 -23 -10 0 -5 -3 -9 -7 -8 -14 4 -53 -13 -53 -22 0 -5 -6 -7 -14 -4 -7 3 -27 -6 -44 -20 -16 -15 -34 -26 -39 -26 -6 0 -18 -10 -29 -21 -10 -12 -29 -25 -42 -30 -13 -5 -21 -13 -18 -18 3 -5 -4 -11 -15 -14 -12 -3 -18 -10 -15 -15 3 -5 -6 -14 -19 -20 -14 -7 -25 -18 -25 -27 0 -8 -5 -15 -12 -15 -9 0 -9 -3 -1 -11 9 -9 29 4 80 51 37 34 87 75 110 90 44 30 167 90 184 90 18 0 89 40 89 50 0 6 -1 9 -2 9 -2 -1 -16 -4 -33 -6z"></path>
<path d="M883 1454 c15 -8 55 -23 90 -34 82 -26 201 -97 257 -155 25 -25 58 -52 73 -59 l28 -12 -111 -98 -111 -97 -27 27 c-165 168 -463 163 -636 -10 l-36 -37 -58 49 c-175 149 -185 155 -200 135 -8 -10 -20 -32 -27 -49 -8 -17 -21 -36 -30 -44 -9 -7 -13 -21 -10 -31 4 -12 1 -21 -9 -25 -9 -4 -16 -11 -15 -18 1 -6 -3 -24 -9 -39 -7 -16 -10 -33 -6 -38 3 -5 0 -9 -6 -9 -7 0 -10 -7 -6 -15 3 -8 2 -15 -2 -15 -5 0 -8 -20 -7 -45 0 -25 -2 -45 -5 -45 -8 0 -5 -155 4 -207 4 -24 12 -45 17 -49 5 -3 9 -14 9 -25 0 -10 4 -27 10 -37 16 -29 43 -97 42 -104 -1 -5 3 -8 10 -8 6 0 9 -3 6 -6 -4 -3 1 -14 10 -23 31 -33 52 -61 52 -70 0 -5 8 -11 19 -14 14 -3 91 57 286 225 151 129 274 227 281 224 7 -3 130 -97 273 -210 160 -126 266 -203 275 -200 17 7 66 78 66 97 0 8 9 22 20 32 11 10 20 26 20 36 0 10 5 21 10 24 6 4 8 10 5 15 -6 10 14 50 30 62 6 5 5 8 -4 8 -11 0 -11 3 -1 15 7 8 9 15 4 15 -5 0 -2 5 6 10 11 7 12 10 2 10 -9 0 -11 7 -6 23 10 30 11 96 2 91 -5 -3 -8 -18 -8 -33 0 -15 -4 -31 -9 -36 -5 -6 -24 -53 -42 -105 -34 -102 -84 -199 -105 -207 -13 -5 -474 351 -474 367 0 5 31 37 70 71 38 35 72 69 75 77 10 26 -25 63 -81 88 -105 46 -254 24 -323 -50 -35 -37 -22 -67 54 -127 36 -28 65 -57 65 -64 0 -7 -10 -20 -22 -28 -13 -8 -117 -96 -233 -196 -116 -99 -215 -181 -221 -181 -10 0 -37 35 -76 100 -8 14 -29 65 -47 114 -27 76 -31 102 -32 190 -1 58 6 132 15 175 17 77 88 241 104 241 5 0 52 -34 103 -75 52 -42 104 -78 117 -81 21 -6 67 21 112 65 8 8 49 30 90 50 70 32 82 35 172 34 90 0 102 -3 170 -35 40 -20 90 -49 112 -67 21 -17 47 -31 57 -31 10 0 59 34 109 76 56 47 96 74 105 70 25 -9 124 -237 125 -287 0 -8 6 -23 13 -32 18 -26 10 129 -9 158 -8 13 -11 30 -8 40 5 13 4 16 -4 11 -8 -4 -12 0 -12 11 0 10 -7 27 -15 37 -8 10 -12 23 -9 27 3 5 0 9 -6 9 -6 0 -8 5 -5 10 3 6 2 10 -3 10 -5 0 -15 14 -22 30 -7 17 -16 30 -21 30 -5 0 -9 5 -9 11 0 7 -11 22 -25 35 -14 13 -25 25 -25 28 0 11 -50 55 -70 61 -11 3 -20 10 -20 15 0 13 -72 60 -81 54 -4 -2 -13 5 -19 16 -6 12 -21 20 -35 20 -14 0 -25 5 -25 10 0 6 -8 10 -19 10 -10 0 -35 7 -54 15 -20 8 -53 15 -74 15 l-38 -1 28 -15z m16 -545 c52 -26 60 -34 49 -44 -34 -33 -183 -155 -188 -155 -6 0 -161 119 -184 141 -12 11 14 33 79 64 75 37 162 35 244 -6z"></path>
<path d="M673 437 l-82 -72 89 -3 c50 -1 131 -1 181 0 l92 3 -95 73 c-53 39 -97 72 -99 71 -2 0 -41 -33 -86 -72z m125 -3 c31 -21 19 -34 -34 -34 -47 0 -57 13 -26 36 22 18 33 17 60 -2z"></path>
<path d="M369 175 c-23 -20 -48 -34 -56 -31 -7 3 -13 4 -13 2 0 -7 52 -38 67 -40 8 -1 24 -11 36 -21 12 -11 31 -21 41 -22 11 -2 25 -8 32 -14 7 -6 25 -12 41 -14 15 -2 29 -4 31 -6 1 -1 7 -3 12 -4 6 -1 11 -4 13 -5 20 -18 315 -13 351 6 16 8 36 14 45 14 9 0 21 4 27 8 5 5 35 19 66 31 31 13 71 36 87 52 17 16 36 29 43 29 7 0 0 12 -15 25 l-28 25 -369 0 -368 0 -43 -35z m741 -15 c0 -13 -99 -62 -193 -94 -101 -35 -201 -38 -317 -9 -147 37 -223 79 -183 102 24 14 693 15 693 1z"></path>
</g>
</svg>
</td>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 20px; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<img src="https://netalertx.com/favicon.ico" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
</td>
</tr>
<tr>
<td bgcolor=#2656f1 width=100% align=center style="padding: 20px 10px 10px 10px; font-size: 20px; font-weight: bold; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/NetAlertX/releases">🆕 New version available 🆕</a>
<td bgcolor=#2656f1 width=100% align=center style="padding: 10px 10px 10px 10px; font-size: 20px; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/NetAlertX/releases">New version available</a>
</td>
</tr>
<tr>
<td>
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
</tr>
</table>
</td>
<td>
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=200 valign=top style="padding: 10px">
<td height=200 valign=top style="padding: 10px">
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
<EVENTS_TABLE>
<PLUGINS_TABLE>
</td>
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
<EVENTS_TABLE>
<PLUGINS_TABLE>
</td>
</tr>
<tr>
<td>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">&copy;</span>2022
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
</td>
</tr>
</table>
</td>
<td>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">&copy;</span>2022
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>

24
scripts/checkmk/README.md Executable file
View File

@@ -0,0 +1,24 @@
# NetAlertX-New-Devices-Checkmk-Script
This script retrieves the list of all devices from NetAlertX by reading the `/app/api/table_devices.json` file within the "NetAlertX" Docker container. It then checks if there are any new devices (`devIsNew == 1`).
- If new devices are found, a warning state is reported.
- Otherwise, an OK state is returned.
## Checkmk Local Check Format
The script follows the Checkmk local check format:
```
<status> <service_name> <perfdata> <message>
```
For more details, see the [Checkmk Local Checks Documentation](https://docs.checkmk.com/latest/en/localchecks.html).
### Other info
- Date : 08-Jan-2025 - version 1.0
- Author: N/A
> [!NOTE]
> This is a community supplied script and not maintained.

74
scripts/checkmk/script.py Executable file
View File

@@ -0,0 +1,74 @@
YABin
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
NetAlertX-New-Devices-Checkmk-Script
Dieses Skript ruft die Liste aller Devices aus NetAlertX ab, indem es innerhalb
des Docker-Containers "NetAlertX" die Datei /app/api/table_devices.json ausliest.
Anschließend wird geprüft, ob neue Geräte vorhanden sind (devIsNew == 1).
Falls ja, wird ein Warning-Zustand gemeldet, sonst OK.
Checkmk-Local-Check-Format:
<status> <service_name> <perfdata> <message>
Siehe: https://docs.checkmk.com/latest/de/localchecks.html
"""
import subprocess
import json
def check_new_devices():
try:
# Rufe die JSON-Datei aus dem Docker-Container ab
result = subprocess.run(
['docker', 'exec', 'NetAlertX', 'cat', '/app/api/table_devices.json'],
capture_output=True,
text=True,
check=True
)
data_str = result.stdout
except subprocess.CalledProcessError as e:
# Wenn der Docker-Command fehlschlägt -> UNKNOWN (3)
print(f"3 NetAlertX_New_Devices - UNKNOWN - Docker command failed: {e}")
return
except Exception as e:
# Allgemeiner Fehler -> UNKNOWN
print(f"3 NetAlertX_New_Devices - UNKNOWN - Error while running docker command: {e}")
return
# JSON-Daten laden
try:
data = json.loads(data_str)
except json.JSONDecodeError as e:
# Wenn das JSON nicht gelesen werden kann -> UNKNOWN
print(f"3 NetAlertX_New_Devices - UNKNOWN - JSON decode error: {e}")
return
# Prüfen, ob das 'data'-Attribut vorhanden ist
if "data" not in data:
print("3 NetAlertX_New_Devices - UNKNOWN - Unexpected JSON format (no 'data' key).")
return
new_devices = []
for device in data["data"]:
# Prüfen, ob das Attribut 'devIsNew' existiert und == 1 ist
if "devIsNew" in device and device["devIsNew"] == 1:
new_devices.append(device)
# Wenn keine neuen Geräte gefunden
if len(new_devices) == 0:
# Status 0 = OK
print("0 NetAlertX_New_Devices - OK - No new devices found")
else:
# Status 1 = WARNING
device_list_str = ", ".join(
f"{dev.get('devName', 'UnknownName')}({dev.get('devMac', 'UnknownMAC')}) IP:{dev.get('devLastIP', 'UnknownIP')}"
for dev in new_devices
)
print(f"1 NetAlertX_New_Devices - WARNING - Found {len(new_devices)} new device(s): {device_list_str}")
if __name__ == "__main__":
check_new_devices()

View File

@@ -35,4 +35,8 @@ For each MAC or IP address provided, the script:
### Other info
- Date : 23-Dec-2024 - version 1.0
- Author: [laxduke](https://github.com/laxduke)
- Author: [laxduke](https://github.com/laxduke)
> [!NOTE]
> This is a community supplied script and not maintained.

View File

@@ -203,8 +203,13 @@ def get_plugins_configs(loadAll):
plugJson = json.loads(get_file_content(config_path))
# only laod plugin if needed
if loadAll or plugJson["unique_prefix"] in conf.LOADED_PLUGINS:
# Only load plugin if needed
# Fetch the list of enabled plugins from the config, default to an empty list if not set
enabledPlugins = getattr(conf, "LOADED_PLUGINS", [])
# Load all plugins if `loadAll` is True, the plugin is in the enabled list,
# or no specific plugins are enabled (enabledPlugins is empty)
if loadAll or plugJson["unique_prefix"] in enabledPlugins or enabledPlugins == []:
# Load the contents of the config.json file as a JSON object and append it to pluginsList
pluginsList.append(plugJson)

View File

@@ -1,161 +0,0 @@
import os
import requests
import base64
from datetime import datetime
def fetch_sponsors():
global headers
graphql_url = "https://api.github.com/graphql"
headers = {
"Authorization": f"Bearer {os.environ.get('GH_TOKEN')}",
"Accept": "application/vnd.github.v4+json",
}
# GraphQL query to fetch public sponsors
graphql_query = """
{
user(login: "jokob-sk") {
sponsorshipsAsMaintainer(first: 100, orderBy: {field: CREATED_AT, direction: ASC}, includePrivate: true) {
totalCount
pageInfo {
endCursor
}
nodes {
sponsorEntity {
... on User {
name
login
url
}
... on Organization {
name
url
login
}
}
createdAt
privacyLevel
tier {
monthlyPriceInCents
}
}
}
}
}
"""
response = requests.post(graphql_url, json={"query": graphql_query}, headers=headers)
data = response.json()
print(f"Debug GraphQL query result: {data}")
if "errors" in data:
print(f"GraphQL query failed: {data['errors']}")
return {"sponsors": []}
sponsorships = data["data"]["user"]["sponsorshipsAsMaintainer"]["nodes"]
sponsors = []
for sponsorship in sponsorships:
privacy_level = sponsorship["privacyLevel"]
# Only include sponsors with privacyLevel set to "PUBLIC"
if privacy_level == "PUBLIC":
sponsor_entity = sponsorship["sponsorEntity"]
created_at = datetime.strptime(sponsorship["createdAt"], "%Y-%m-%dT%H:%M:%SZ")
# Check if tier is not None before accessing its properties
tier = sponsorship.get("tier", {})
monthly_price = tier.get("monthlyPriceInCents") if tier else None
sponsor = {
"name": sponsor_entity.get("name"),
"login": sponsor_entity["login"],
"url": sponsor_entity["url"],
"created_at": created_at,
"privacy_level": privacy_level,
"monthly_price": monthly_price,
}
sponsors.append(sponsor)
print("Public Sponsors:")
print(sponsors)
return {"sponsors": sponsors}
def generate_sponsors_table(sponsors):
sponsors_table = "| All Sponsors |\n|---|\n"
for sponsor in sponsors:
sponsors_table += f"| [{sponsor['name'] or sponsor['login']}]({sponsor['url']}) |\n"
return sponsors_table
def update_readme(sponsors_table):
global headers
repo_owner = "jokob-sk"
repo_name = "NetAlertX"
# Update the README.md file in the GitHub repository
api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/contents/README.md"
# Fetch the current content of the README.md file
response = requests.get(api_url, headers=headers)
readme_data = response.json()
# Extract content from the dictionary
readme_content = base64.b64decode(readme_data['content']).decode()
# Find the start and end markers
start_marker = "<!-- SPONSORS-LIST DO NOT MODIFY BELOW -->"
end_marker = "<!-- SPONSORS-LIST DO NOT MODIFY ABOVE -->"
# Replace the content between markers with the generated sponsors table
start_index = readme_content.find(start_marker)
end_index = readme_content.find(end_marker, start_index + len(start_marker))
if start_index != -1 and end_index != -1:
updated_readme = (
readme_content[:start_index + len(start_marker)]
+ "\n"
+ sponsors_table
+ "\n"
+ readme_content[end_index:]
)
else:
print("Markers not found in README.md. Make sure they are correctly placed.")
return
updated_content_base64 = base64.b64encode(updated_readme.encode()).decode()
# Create a commit to update the README.md file
commit_message = "[🤖Automation] Update README with sponsors information"
commit_data = {
"message": commit_message,
"content": updated_content_base64,
"sha": readme_data["sha"],
"branch": "main", # Update the branch name as needed
}
commit_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/contents/README.md"
commit_response = requests.put(commit_url, headers=headers, json=commit_data)
if commit_response.status_code == 200:
print("README.md updated successfully in the GitHub repository.")
else:
print(f"Failed to update README.md. Status code: {commit_response.status_code}")
print(commit_response.json())
print("README.md updated successfully with the sponsors table.")
def main():
sponsors_data = fetch_sponsors()
sponsors = sponsors_data.get("sponsors", [])
sponsors_table = generate_sponsors_table(sponsors)
update_readme(sponsors_table)
if __name__ == "__main__":
main()

View File

@@ -1 +0,0 @@
requests>=2.0.0