mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
More rename work
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
## Übersicht
|
||||
|
||||
Ein Plugin zum Importieren von Geräten aus dhcp.leases-Dateien.
|
||||
|
||||
### Verwendung
|
||||
|
||||
- Absolute Pfade der `dhcp.leases`-Dateien, welche importiert werden sollen, in der `DHCPLSS_paths_to_check`-Einstellung angeben.
|
||||
- Angegebene Pfade in der `DHCPLSS_paths_to_check`-Einstellung in der `docker-compose.yml`-Datei mapppen.
|
||||
|
||||
#### Beispiel
|
||||
|
||||
Auszug aus `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
...
|
||||
# mapping different dhcp.leases files
|
||||
- /first/location/dhcp.leases:/mnt/dhcp1.leases
|
||||
- /second/location/dhcp.leases:/mnt/dhcp2.leases
|
||||
...
|
||||
```
|
||||
|
||||
`DHCPLSS_paths_to_check`-Einstellung:
|
||||
|
||||
```python
|
||||
DHCPLSS_paths_to_check = ['/mnt/dhcp1.leases','/mnt/dhcp2.leases']
|
||||
```
|
||||
|
||||
### Notizen
|
||||
|
||||
- Keine spezifische Konfiguration benötigt.
|
||||
|
||||
- Dieses Plugin erwartet dhcp.leases-Dateien im **dhcp.leases**-Format, welches sich vom von PiHole genutzten Format unterscheidet. [dhcpd.leases(5) - Linux man page]( https://linux.die.net/man/5/dhcpd.leases#:~:text=This%20database%20is%20a%20free,file%20is%20the%20current%20one.)
|
||||
|
||||
Beispiel Dateiformat: _(nicht alle Zeilen werden benötigt)_
|
||||
|
||||
```text
|
||||
lease 192.168.79.15 {
|
||||
starts 0 2016/08/21 13:25:45;
|
||||
ends 0 2016/08/21 19:25:45;
|
||||
cltt 0 2016/08/21 13:25:45;
|
||||
binding state active;
|
||||
next binding state free;
|
||||
rewind binding state free;
|
||||
hardware ethernet 8c:1a:bf:11:00:ea;
|
||||
uid "\001\214\032\277\021\000\352";
|
||||
option agent.circuit-id 0:17;
|
||||
option agent.remote-id c0:a8:9:5;
|
||||
client-hostname "android-8182e21c852776e7";
|
||||
}
|
||||
```
|
||||
@@ -1,53 +0,0 @@
|
||||
## Descripción general
|
||||
|
||||
Un plugin que permite importar dispositivos desde archivos DHCP.leases.
|
||||
|
||||
### Uso
|
||||
|
||||
- Especifique las rutas completas de todos los archivos `dhcp.leases` que desea importar y observar en la configuración `DHCPLSS_paths_to_check`.
|
||||
- Asigne las rutas especificadas en la configuración `DHCPLSS_paths_to_check` en su archivo `docker-compose.yml`.
|
||||
|
||||
#### Ejemplo:
|
||||
|
||||
|
||||
Extracto `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
...
|
||||
# Mapeo de diferentes archivos dhcp.leases
|
||||
- /first/location/dhcp.leases:/mnt/dhcp1.leases
|
||||
- /second/location/dhcp.leases:/mnt/dhcp2.leases
|
||||
...
|
||||
```
|
||||
|
||||
Configuración `DHCPLSS_paths_to_check`:
|
||||
|
||||
```python
|
||||
DHCPLSS_paths_to_check = ['/mnt/dhcp1.leases','/mnt/dhcp2.leases']
|
||||
```
|
||||
|
||||
### Notas
|
||||
|
||||
- No se necesita ninguna configuración específica.
|
||||
|
||||
- Este complemento espera que los archivos dhcp.leases tengan el formato **dhcpd.leases**, que es diferente al formato que utiliza PiHole.
|
||||
[dhcpd.leases(5) - Linux man page]( https://linux.die.net/man/5/dhcpd.leases#:~:text=This%20database%20is%20a%20free,file%20is%20the%20current%20one.)
|
||||
|
||||
Formato de archivo de ejemplo: _(no todas las líneas son obligatorias)_
|
||||
|
||||
```
|
||||
lease 192.168.79.15 {
|
||||
starts 0 2016/08/21 13:25:45;
|
||||
ends 0 2016/08/21 19:25:45;
|
||||
cltt 0 2016/08/21 13:25:45;
|
||||
binding state active;
|
||||
next binding state free;
|
||||
rewind binding state free;
|
||||
hardware ethernet 8c:1a:bf:11:00:ea;
|
||||
uid "\001\214\032\277\021\000\352";
|
||||
option agent.circuit-id 0:17;
|
||||
option agent.remote-id c0:a8:9:5;
|
||||
client-hostname "android-8182e21c852776e7";
|
||||
}
|
||||
```
|
||||
@@ -9,7 +9,7 @@ import sys
|
||||
import chardet
|
||||
|
||||
sys.path.append("/home/pi/pialert/front/plugins")
|
||||
sys.path.append('/home/pi/pialert/pialert')
|
||||
sys.path.append('/home/pi/pialert/netalertx')
|
||||
|
||||
from plugin_helper import Plugin_Object, Plugin_Objects, handleEmpty, is_mac
|
||||
from logger import mylog
|
||||
|
||||
Reference in New Issue
Block a user