mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Compare commits
5 Commits
6ee9064676
...
1bd6723ab9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bd6723ab9 | ||
|
|
73c8965637 | ||
|
|
dc7ff8317c | ||
|
|
cd1ce2a3d8 | ||
|
|
c6de72467e |
@@ -17,7 +17,7 @@ services:
|
|||||||
netalertx:
|
netalertx:
|
||||||
#use an environmental variable to set host networking mode if needed
|
#use an environmental variable to set host networking mode if needed
|
||||||
container_name: netalertx # The name when you docker contiainer ls
|
container_name: netalertx # The name when you docker contiainer ls
|
||||||
image: ghcr.io/jokob-sk/netalertx-dev:latest
|
image: ghcr.io/jokob-sk/netalertx:latest
|
||||||
network_mode: ${NETALERTX_NETWORK_MODE:-host} # Use host networking for ARP scanning and other services
|
network_mode: ${NETALERTX_NETWORK_MODE:-host} # Use host networking for ARP scanning and other services
|
||||||
|
|
||||||
read_only: true # Make the container filesystem read-only
|
read_only: true # Make the container filesystem read-only
|
||||||
|
|||||||
@@ -2,10 +2,50 @@
|
|||||||
|
|
||||||
A plugin allowing for importing devices from the PiHole database. This is an import plugin using an SQLite database as a source.
|
A plugin allowing for importing devices from the PiHole database. This is an import plugin using an SQLite database as a source.
|
||||||
|
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
- You need to specify the following settings:
|
- You need to specify the following settings:
|
||||||
- `PIHOLE_RUN` is used to enable the import by setting it e.g. to `schedule` or `once` (pre-set to `disabled`)
|
- `PIHOLE_RUN` is used to enable the import by setting it e.g. to `schedule` or `once` (pre-set to `disabled`)
|
||||||
- `PIHOLE_RUN_SCHD` is to configure how often the plugin is executed if `PIHOLE_RUN` is set to `schedule` (pre-set to every 30 min)
|
- `PIHOLE_RUN_SCHD` is to configure how often the plugin is executed if `PIHOLE_RUN` is set to `schedule` (pre-set to every 30 min)
|
||||||
- `PIHOLE_DB_PATH` setting must match the location of your PiHole database (pre-set to `/etc/pihole/pihole-FTL.db`)
|
- `PIHOLE_DB_PATH` setting must match the location of your PiHole database (pre-set to `/etc/pihole/pihole-FTL.db`)
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Permission problems:
|
||||||
|
|
||||||
|
NetAlertX cannot read Pi-hole DB (`/etc/pihole/pihole-FTL.db`) due to permissions:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Plugins] ⚠ ERROR: ATTACH DATABASE failed with SQL ERROR: unable to open database: /etc/pihole/pihole-FTL.db
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Solution:
|
||||||
|
|
||||||
|
1. **Mount full Pi-hole directory (read-only):**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
- /etc/pihole:/etc/pihole:ro
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Add NetAlertX to Pi-hole group:**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
group_add:
|
||||||
|
- 1001 # check with `getent group pihole`
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verify:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it netalertx id
|
||||||
|
# groups=1001,... ✅ pihole group included
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Notes:
|
||||||
|
|
||||||
|
* Avoid mounting single DB files.
|
||||||
|
* Keep mount read-only (`:ro`) to protect Pi-hole data.
|
||||||
|
* Use `group_add` instead of chmod.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user