Skip to content

Commit

Permalink
MKDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Feb 8, 2025
1 parent cd8124a commit 0fe903e
Show file tree
Hide file tree
Showing 41 changed files with 424 additions and 271 deletions.
74 changes: 74 additions & 0 deletions .github/ISSUE_TEMPLATE/setup-help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Setup help
description: 'When submitting an issue enable LOG_LEVEL="trace" and re-search first.'
labels: ['Setup 📥']
body:
- type: checkboxes
attributes:
label: Did I research?
description: Please confirm you checked the usual places before opening a setup support request.
options:
- label: I have searched the docs https://jokob-sk.github.io/NetAlertX/
required: true
- label: I have searched the existing open and closed issues
required: true
- label: I confirm my SCAN_SUBNETS is configured and tested as per https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md
required: true
- type: checkboxes
attributes:
label: The issue occurs in the following browsers. Select at least 2.
description: This step helps me understand if this is a cache or browser-specific issue.
options:
- label: "Firefox"
- label: "Chrome"
- label: "Other (unsupported) - PRs welcome"
- label: "N/A - This is an issue with the backend"
- type: textarea
attributes:
label: What I want to do
description: Describe what you want to achieve.
placeholder: |
validations:
required: false
- type: textarea
attributes:
label: Relevant settings you changed
description: |
Paste a screenshot or setting values of the settings you changed.
validations:
required: false
- type: textarea
attributes:
label: docker-compose.yml
description: |
Paste your `docker-compose.yml`
render: python
validations:
required: false
- type: dropdown
attributes:
label: What installation are you running?
options:
- Production (netalertx)
- Dev (netalertx-dev)
- Home Assistant (addon)
validations:
required: true
- type: textarea
attributes:
label: app.log
description: |
Logs with debug enabled (https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md) ⚠
***Generally speaking, all bug reports should have logs provided.***
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
Additionally, any additional info? Screenshots? References? Anything that will give us more context about the issue you are encountering!
You can use `tail -100 /app/log/app.log` in the container if you have trouble getting to the log files.
validations:
required: false
- type: checkboxes
attributes:
label: Debug enabled
description: I confirm I enabled `debug`
options:
- label: I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.
required: true
4 changes: 3 additions & 1 deletion .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
python-version: '3.9'

- name: Install MkDocs
run: pip install mkdocs mkdocs-material
run: |
pip install mkdocs mkdocs-material
pip install mkdocs-github-admonitions-plugin
- name: Deploy MkDocs
run: mkdocs gh-deploy --force
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ Proudly using [Weblate](https://hosted.weblate.org/projects/pialert/). Help out


<!--- --------------------------------------------------------------------- --->
[main]: ./docs/img/devices_split.png "Main screen"
[device_details]: ./docs/img/device_details.png "Screen 1"
[events]: ./docs/img/events.png "Screen 2"
[presence]: ./docs/img/presence.png "Screen 3"
[maintenance]: ./docs/img/maintenance.png "Screen 4"
[network]: ./docs/img/network.png "Screen 5"
[settings]: ./docs/img/settings.png "Screen 6"
[showcase]: ./docs/img/showcase.gif "Screen 6"
[help_faq]: ./docs/img/help_faq.png "Screen 7"
[sync_hub]: ./docs/img/sync_hub.png "Screen 8"
[notification_center]: ./docs/img/notification_center.png "Screen 8"
[sent_reports_text]: ./docs/img/sent_reports_text.png "Screen 8"
[device_nmap]: ./docs/img/device_nmap.png "Screen 9"
[report1]: ./docs/img/report_sample.png "Report sample 1"
[main_dark]: /docs/img/1_devices_dark.jpg "Main screen dark"
[maintain_dark]: /docs/img/5_maintain.jpg "Maintain screen dark"
[follow_star]: /docs/img/Follow_Releases_and_Star.gif "Follow and Star"
[main]: ../img/devices_split.png "Main screen"
[device_details]: ../img/device_details.png "Screen 1"
[events]: ../img/events.png "Screen 2"
[presence]: ../img/presence.png "Screen 3"
[maintenance]: ../img/maintenance.png "Screen 4"
[network]: ../img/network.png "Screen 5"
[settings]: ../img/settings.png "Screen 6"
[showcase]: ../img/showcase.gif "Screen 6"
[help_faq]: ../img/help_faq.png "Screen 7"
[sync_hub]: ../img/sync_hub.png "Screen 8"
[notification_center]: ../img/notification_center.png "Screen 8"
[sent_reports_text]: ../img/sent_reports_text.png "Screen 8"
[device_nmap]: ../img/device_nmap.png "Screen 9"
[report1]: ../img/report_sample.png "Report sample 1"
[main_dark]: ./img/1_devices_dark.jpg "Main screen dark"
[maintain_dark]: ./img/5_maintain.jpg "Maintain screen dark"
[follow_star]: ./img/Follow_Releases_and_Star.gif "Follow and Star"

2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ services:
- ${APP_DATA_LOCATION}/netalertx/dhcp_samples/pihole_dhcp_full.leases:/etc/pihole/dhcp.leases
- ${APP_DATA_LOCATION}/netalertx/dhcp_samples/pihole_dhcp_2.leases:/etc/pihole/dhcp2.leases
- ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db
- ${DEV_LOCATION}/mkdocs.yml:/app/mkdocs.yml
- ${DEV_LOCATION}/docs:/app/docs
- ${DEV_LOCATION}/server:/app/server
- ${DEV_LOCATION}/test:/app/test
- ${DEV_LOCATION}/dockerfiles:/app/dockerfiles
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
| [📑 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)
|----------------------| ----------------------| ----------------------| ----------------------| ----------------------|

<a href="https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/GENERAL/github_social_image.jpg" target="_blank">
<img src="https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/GENERAL/github_social_image.jpg" width="1000px" />
<a href="https://raw.githubusercontent.com/jokob-sk/NetAlertX/main./img/GENERAL/github_social_image.jpg" target="_blank">
<img src="https://raw.githubusercontent.com/jokob-sk/NetAlertX/main./img/GENERAL/github_social_image.jpg" width="1000px" />
</a>

Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and screenshots 📷.
Expand Down
6 changes: 4 additions & 2 deletions docs/AUTHELIA.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(DRAFT) Authelia support

## Authelia support

> [!WARNING]
>
> This is community contributed content and work in progress. Contributions are welcome.
```yaml
theme: dark
Expand Down
8 changes: 4 additions & 4 deletions docs/BACKUPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To decide on a backup strategy, check where the data is stored:

### Core Configuration

The core application configuration is in the `app.conf` file (See [Settings System](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SETTINGS_SYSTEM.md) for details), such as:
The core application configuration is in the `app.conf` file (See [Settings System](./SETTINGS_SYSTEM.md) for details), such as:

- Notification settings
- Scanner settings
Expand All @@ -37,7 +37,7 @@ The core device data is backed up to the `devices_<timestamp>.csv` or `devices.c

### Historical data

Historical data is stored in the `app.db` database (See [Database overview](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DATABASE.md) for details). This data includes:
Historical data is stored in the `app.db` database (See [Database overview](./DATABASE.md) for details). This data includes:

- Plugin objects
- Plugin historical entries
Expand All @@ -50,7 +50,7 @@ The safest approach to backups is to backup all of the above, by taking regular

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)
![Backup and Restore Section in Maintenance](./img/BACKUPS/Maintenance_Backup_Restore.png)

### Scenario 1: Full backup

Expand Down Expand Up @@ -81,6 +81,6 @@ Even with a corrupted database you can recover what I would argue is 99% of the

- upload the `app.conf` file into the mounted `/app/config/` folder as described in the [Setup documentation](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md#docker-paths).
- rename the `devices_<timestamp>.csv` to `devices.csv` and place it in the `/app/config` folder
- Restore the `devices.csv` backup via the [Maintenance section](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICES_BULK_EDITING.md)
- Restore the `devices.csv` backup via the [Maintenance section](./DEVICES_BULK_EDITING.md)


44 changes: 44 additions & 0 deletions docs/COMMON_ISSUES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### Loading...

Often if the application is misconfigured the `Loading...` dialog is continuously displayed. This is most likely caused by the backed failing to start. The **Maintenance -> Logs** section should give you more details on what's happenning. If there is no exception, check the Portainer log, or start the container in the foreground (without the `-d` parameter) to observe any exceptions. It's advisable to enable `trace` or `debug`. Check the [Debug tips](./DEBUG_TIPS.md) on detailed instructions.

### Incorrect SCAN_SUBNETS

One of the most common issues is not configuring `SCAN_SUBNETS` correctly. If this setting is misconfigured you will only see one or two devices in your devices list after a scan. Please read the [subnets docs](./SUBNETS.md) carefully to resolve this.

### Permissions

Make sure you [File permissions](./FILE_PERMISSIONS.md) are set correctly.

* If facing issues (AJAX errors, can't write to DB, empty screen, etc,) make sure permissions are set correctly, and check the logs under `/app/log`.
* To solve permission issues you can try setting the owner and group of the `app.db` by executing the following on the host system: `docker exec netalertx chown -R www-data:www-data /app/db/app.db`.
* If still facing issues, try to map the app.db file (⚠ not folder) to `:/app/db/app.db` (see [docker-compose Examples](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md#-docker-composeyml-examples) for details)

### Container restarts / crashes

* Check the logs for details. Often a required setting for a notification method is missing.

### unable to resolve host

* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface`. See the [subnets docs for details](./SUBNETS.md).

### Invalid JSON

Check the [Invalid JSON errors debug help](./DEBUG_INVALID_JSON.md) docs on how to proceed.

### sudo execution failing (e.g.: on arpscan) on a Raspberry Pi 4

> sudo: unexpected child termination condition: 0
Resolution based on [this issue](https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-1003657581)

```
wget ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.3-2_armhf.deb
sudo dpkg -i libseccomp2_2.5.3-2_armhf.deb
```

The link above will probably break in time too. Go to https://packages.debian.org/sid/armhf/libseccomp2/download to find the new version number and put that in the url.

### Only Router and own device show up

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.
4 changes: 2 additions & 2 deletions docs/CUSTOM_PROPERTIES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Custom Properties for Devices

![Custom Properties](/docs/img/CUSTOM_PROPERTIES/Device_Custom_Properties.png)
![Custom Properties](./img/CUSTOM_PROPERTIES/Device_Custom_Properties.png)

## Overview

Expand Down Expand Up @@ -41,7 +41,7 @@ Custom properties are structured as a list of objects, where each property inclu

## Usage on the Device Listing Page

![Custom Properties](/docs/img/CUSTOM_PROPERTIES/Device_Custom_Properties_vid.gif)
![Custom Properties](./img/CUSTOM_PROPERTIES/Device_Custom_Properties_vid.gif)

Visible properties (`CUSTPROP_show: true`) are displayed as interactive icons in the device listing. Each icon can perform one of the following actions based on the `CUSTPROP_type`:

Expand Down
22 changes: 11 additions & 11 deletions docs/DATABASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@



[screen1]: /docs/img/DATABASE/CurrentScan.png
[screen2]: /docs/img/DATABASE/Devices.png
[screen4]: /docs/img/DATABASE/Events.png
[screen6]: /docs/img/DATABASE/Online_History.png
[screen7]: /docs/img/DATABASE/Parameters.png
[screen10]: /docs/img/DATABASE/Plugins_Events.png
[screen11]: /docs/img/DATABASE/Plugins_History.png
[screen12]: /docs/img/DATABASE/Plugins_Language_Strings.png
[screen13]: /docs/img/DATABASE/Plugins_Objects.png
[screen15]: /docs/img/DATABASE/Sessions.png
[screen16]: /docs/img/DATABASE/Settings.png
[screen1]: ./img/DATABASE/CurrentScan.png
[screen2]: ./img/DATABASE/Devices.png
[screen4]: ./img/DATABASE/Events.png
[screen6]: ./img/DATABASE/Online_History.png
[screen7]: ./img/DATABASE/Parameters.png
[screen10]: ./img/DATABASE/Plugins_Events.png
[screen11]: ./img/DATABASE/Plugins_History.png
[screen12]: ./img/DATABASE/Plugins_Language_Strings.png
[screen13]: ./img/DATABASE/Plugins_Objects.png
[screen15]: ./img/DATABASE/Sessions.png
[screen16]: ./img/DATABASE/Settings.png

4 changes: 2 additions & 2 deletions docs/DEBUG_PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For a more in-depth overview on how plugins work check the [Plugins development
### Prerequisites

- Make sure you read and followed the specific plugin setup instructions.
- Ensure you have [debug enabled (see More Logging)](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md#1-more-logging-)
- Ensure you have [debug enabled (see More Logging)](./DEBUG_TIPS.md#1-more-logging-)

### Potential issues

Expand Down Expand Up @@ -75,7 +75,7 @@ In the above output notice the section logging how many events are produced by t

These values, if formatted correctly, will also show up in the UI:

![Plugins table](/docs/img/DEBUG_PLUGINS/plugin_objects_pihole.png)
![Plugins table](./img/DEBUG_PLUGINS/plugin_objects_pihole.png)


### Sharing application state
Expand Down
46 changes: 6 additions & 40 deletions docs/DEBUG_TIPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

Please follow tips 1 - 4 to get a more detailed error.

## 1. More Logging 📃
## 1. More Logging

When debugging an issue always set the highest log level:

`LOG_LEVEL='trace'`


## 2. Surfacing errors when container restarts 🔁
## 2. Surfacing errors when container restarts

Start the container via the **terminal** with a command similar to this one:

Expand All @@ -25,7 +24,7 @@ docker run --rm --network=host \

> ⚠ Please note, don't use the `-d` parameter so you see the error when the container crashes. Use this error in your issue description.
## 3. Check the _dev image and open issues
## 3. Check the _dev image and open issues

If possible, check if your issue got fixed in the `_dev` image before opening a new issue. The container is:

Expand All @@ -35,7 +34,7 @@ If possible, check if your issue got fixed in the `_dev` image before opening a
Please also search [open issues](https://github.com/jokob-sk/NetAlertX/issues).

## 4. Disable restart behavior 🛑
## 4. Disable restart behavior

To prevent a Docker container from automatically restarting in a Docker Compose file, specify the restart policy as `no`:

Expand All @@ -60,39 +59,6 @@ Sometimes specific log sections are needed to debug issues. The Devices and Curr
5. Open a new issue and post (redacted) output into the issue description (or send to the [email protected] email if sensitive data present).
6. Please set `LOG_LEVEL` to `debug` or lower.

## 📃Common issues

### Permissions

* If facing issues (AJAX errors, can't write to DB, empty screen, etc,) make sure permissions are set correctly, and check the logs under `/app/log`.
* To solve permission issues you can try setting the owner and group of the `app.db` by executing the following on the host system: `docker exec netalertx chown -R www-data:www-data /app/db/app.db`.
* If still facing issues, try to map the app.db file (⚠ not folder) to `:/app/db/app.db` (see [docker-compose Examples](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md#-docker-composeyml-examples) for details)

### Container restarts / crashes

* Check the logs for details. Often a required setting for a notification method is missing.

### unable to resolve host

* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface`. See teh [subnets docs for details](/docs/SUBNETS.md).

### Invalid JSON

Check the [Invalid JSON errors debug help](/docs/DEBUG_INVALID_JSON.md) docs on how to proceed.

### sudo execution failing (e.g.: on arpscan) on a Raspberry Pi 4

> sudo: unexpected child termination condition: 0
Resolution based on [this issue](https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-1003657581)

```
wget ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.3-2_armhf.deb
sudo dpkg -i libseccomp2_2.5.3-2_armhf.deb
```

The link above will probably break in time too. Go to https://packages.debian.org/sid/armhf/libseccomp2/download to find the new version number and put that in the url.

### Only Router and own device show up
## Common issues

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.
See [Common issues](./COMMON_ISSUES.md) for details.
Loading

0 comments on commit 0fe903e

Please sign in to comment.