Compare commits

...

9 Commits

Author SHA1 Message Date
jokob-sk
1bd6723ab9 DOCS: pihole DB troubleshooting permissions #1330
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
Code checks / lint (push) Has been cancelled
Code checks / docker-tests (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-12-07 21:53:46 +11:00
jokob-sk
73c8965637 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-12-07 21:41:09 +11:00
jokob-sk
dc7ff8317c DOCS: pihole DB troubleshooting permissions #1330
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-12-07 21:40:40 +11:00
Jokob @NetAlertX
cd1ce2a3d8 Merge pull request #1333 from KihtrakRaknas/patch-2
Remove dev branch from docker compose file
2025-12-07 09:27:38 +00:00
Karthik Sankar
c6de72467e Update Docker image tag in documentation
Remove -dev
2025-12-07 03:39:47 -05:00
Jokob @NetAlertX
6ee9064676 Merge pull request #1332 from adamoutler/patch-7
Some checks failed
Code checks / docker-tests (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
Code checks / lint (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Change copy command to install with permissions
2025-12-07 00:02:45 +00:00
Adam Outler
2c75285148 Coderabit nitpick. 2025-12-06 13:05:47 +00:00
Adam Outler
ecb5c1455b Add missing field to initial db 2025-12-06 13:01:47 +00:00
Adam Outler
17f495c444 Change copy command to install with permissions 2025-12-06 13:01:10 +00:00
4 changed files with 48 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ services:
netalertx:
#use an environmental variable to set host networking mode if needed
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
read_only: true # Make the container filesystem read-only

View File

@@ -1,7 +1,6 @@
## Overview
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
@@ -9,3 +8,44 @@ A plugin allowing for importing devices from the PiHole database. This is an imp
- `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_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.

View File

@@ -7,8 +7,8 @@ if [ ! -f "${NETALERTX_CONFIG}/app.conf" ]; then
>&2 echo "ERROR: Failed to create config directory ${NETALERTX_CONFIG}"
exit 1
}
cp /app/back/app.conf "${NETALERTX_CONFIG}/app.conf" || {
>&2 echo "ERROR: Failed to copy default config to ${NETALERTX_CONFIG}/app.conf"
install -m 600 -o ${NETALERTX_USER} -g ${NETALERTX_GROUP} /app/back/app.conf "${NETALERTX_CONFIG}/app.conf" || {
>&2 echo "ERROR: Failed to deploy default config to ${NETALERTX_CONFIG}/app.conf"
exit 2
}
RESET=$(printf '\033[0m')

View File

@@ -97,8 +97,9 @@ CREATE TABLE Devices (
devSite TEXT,
devSSID TEXT,
devSyncHubNode TEXT,
devSourcePlugin TEXT
, "devCustomProps" TEXT);
devSourcePlugin TEXT,
devFQDN TEXT,
"devCustomProps" TEXT);
CREATE TABLE IF NOT EXISTS "Settings" (
"setKey" TEXT,
"setName" TEXT,