Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since the last update, arp-scan sees the devices but does not update the interface #261

Closed
Walgo opened this issue Jun 21, 2023 · 22 comments
Labels
Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.

Comments

@Walgo
Copy link

Walgo commented Jun 21, 2023

Describe the issue
Since the last update, pialert sees the network but does not update the interface.
I'm sure I forgot something but I don't understand what ! thank you for your attention

Paste last few lines from pialert.log

08:34:27 Permissions check (All should be True)
08:34:27 ------------------------------------------------
08:34:27 /config/pialert.conf | READ | True
08:34:27 /config/pialert.conf | WRITE | True
08:34:27 /db/pialert.db | READ | True
08:34:27 /db/pialert.db | WRITE | True
08:34:27 ------------------------------------------------
08:34:27 [Setup] Attempting to fix permissions.
08:34:27 [Setup] Fix Failed. Execute this command manually inside of the container: sudo chmod a+rw -R /home/pi/pialert/db/pialert.db
08:34:27
08:34:27 [Setup] Attempting to fix permissions.
08:34:27 [Setup] Fix Failed. Execute this command manually inside of the container: sudo chmod a+rw -R /home/pi/pialert/config/pialert.conf
08:34:27
08:34:27 [Database] Opening DB
08:34:27 [upgradeDB] Re-creating Settings table
08:34:28 [upgradeDB] Re-creating Parameters table
08:34:31 [Config] reading config file
08:34:31 [Config] Plugins: Number of dynamically loaded plugins: 7
08:34:31 [Plugins] ---------------------------------------------
08:34:31 [Plugins] display_name: SNMP discovery
08:34:31 [Plugins] description: This plugin is used to discover devices via the arp table(s) of a RFC1213 compliant router or switch.
08:34:31 [Plugins] ---------------------------------------------
08:34:31 [Plugins] display_name: Rogue DHCP
08:34:31 [Plugins] description: This plugin is to use NMAP to monitor for rogue DHCP servers.
08:34:32 [Plugins] ---------------------------------------------
08:34:32 [Plugins] display_name: Un-Discoverable Devices
08:34:32 [Plugins] description: This plugin is to import undiscoverable devices from a file.
08:34:32 [Plugins] ---------------------------------------------
08:34:32 [Plugins] display_name: DHCP Leases
08:34:32 [Plugins] description: This plugin is to import devices from dhcp.leases files.
08:34:32 [Plugins] ---------------------------------------------
08:34:32 [Plugins] display_name: Website monitor
08:34:32 [Plugins] description: This plugin is to monitor status changes of services or websites.
08:34:33 [Plugins] ---------------------------------------------
08:34:33 [Plugins] display_name: Services (NMAP)
08:34:33 [Plugins] description: This plugin shows all services discovered by NMAP scans.
08:34:33 [Plugins] ---------------------------------------------
08:34:33 [Plugins] display_name: UniFi import
08:34:33 [Plugins] description: This plugin is used to import devices from an UNIFI controller.
08:34:48 [API] Update API starting
08:34:48 [API] Updating table_settings.json file in /front/api
08:34:48 [Config] Imported new config
08:34:48 [API] Update API starting
08:34:48 [API] Updating table_devices.json file in /front/api
08:34:48 [API] Updating table_nmap_scan.json file in /front/api
08:34:48 [API] Updating table_pholus_scan.json file in /front/api
08:34:48 [API] Updating table_events_pending_alert.json file in /front/api
08:34:48 [API] Updating table_plugins_events.json file in /front/api
08:34:48 [API] Updating table_plugins_history.json file in /front/api
08:34:48 [API] Updating table_plugins_objects.json file in /front/api
08:34:48 [API] Updating table_language_strings.json file in /front/api
08:34:48 [API] Updating table_custom_endpoint.json file in /front/api
08:34:48 [Internet IP] Check Internet IP started
08:34:48 [Internet IP] - Retrieving Internet IP
08:34:48 [Internet IP] IP: 82.XXX.XXX.XXX
08:34:48 [Internet IP] Retrieving previous IP:
08:34:48 [Internet IP] 82.XXX.XXX.XXX
08:34:48 [Internet IP] No changes to perform
08:34:48 [DDNS] Skipping Dynamic DNS update
08:34:48 [PholusScan] Scan: Pholus for 600s (10.0min)
08:34:48 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
08:35:13 [PholusScan] Scan: Pholus SUCCESS
08:35:13 [MAIN] cycle:1
08:35:14 [Network Scan] Scan Devices:
08:35:14 [Network Scan] arp-scan start
08:35:26 [ARP Scan]Interface: eth0, type: EN10MB, MAC: b8:27:eb:80:e4:06, IPv4: 192.168.0.174
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.0.18 00:a2:f1:1e:8b:e0 (Unknown)
192.168.0.32 ba:34:88:00:1b:55 (Unknown: locally administered)
192.168.0.35 b8:27:eb:92:b5:00 Raspberry Pi Foundation
192.168.0.36 b8:27:eb:cd:0c:32 Raspberry Pi Foundation
192.168.0.31 a8:93:4a:94:d3:74 CHONGQING FUGUI ELECTRONICS CO.,LTD.
192.168.0.65 b8:27:eb:a3:82:e5 Raspberry Pi Foundation
192.168.0.82 3c:2a:f4:03:57:26 Brother Industries, LTD.
192.168.0.100 f0:2f:74:c7:15:c8 ASUSTek COMPUTER INC.
192.168.0.107 00:2a:2a:42:ff:2e (Unknown)
192.168.0.111 2c:4d:54:d7:88:a5 ASUSTek COMPUTER INC.
192.168.0.112 00:41:cb:77:1f:eb (Unknown)
192.168.0.124 00:24:d4:7d:2e:16 FREEBOX SAS
192.168.0.125 48:a9:8a:bc:91:dd Routerboard.com
192.168.0.126 14:dd:a9:07:f4:2c ASUSTek COMPUTER INC.
192.168.0.144 08:26:97:f4:3a:af Zyxel Communications Corporation
192.168.0.95 60:e3:27:25:fe:4b TP-LINK TECHNOLOGIES CO.,LTD.
192.168.0.154 00:de:54:60:a2:93 (Unknown)
192.168.0.160 08:26:97:f4:4d:b0 Zyxel Communications Corporation
192.168.0.170 5c:a6:e6:b7:63:f3 TP-Link Corporation Limited
192.168.0.254 34:27:92:47:b0:93 FREEBOX SAS

24 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 12.143 seconds (21.08 hosts/sec). 20 responded

08:35:26 [Network Scan] arp-scan ends
08:35:26 [Process Scan] Processing scan results
08:35:26 [Process Scan] Print Stats
08:35:26 [Scan Stats] Devices Detected.......: 2
08:35:26 [Scan Stats] arp-scan detected..: 0
08:35:26 [Scan Stats] Pi-hole detected...: +0
08:35:26 [Scan Stats] New Devices........: 0
08:35:26 [Scan Stats] Devices in this cycle..: 2
08:35:26 [Scan Stats] Down Alerts........: 0
08:35:26 [Scan Stats] New Down Alerts....: 0
08:35:26 [Scan Stats] New Connections....: 0
08:35:26 [Scan Stats] Disconnections.....: 0
08:35:26 [Scan Stats] IP Changes.........: 0
08:35:26 [Process Scan] Stats end
08:35:26 [Process Scan] Updating DB Info
08:35:26 [Process Scan] Sessions Events (connect / discconnect)
08:35:26 [Process Scan] Creating new devices
08:35:26 [Process Scan] Updating Devices Info
08:35:26 [Process Scan] Resolve devices names
08:35:26 [Update Device Name] Trying to resolve devices without name
08:35:26 [Update Device Name] Pholus entries from prev scans: 16
08:35:26 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
08:35:26 [Update Device Name] Names Not Found : 1
08:35:26 [Process Scan] Voiding false (ghost) disconnections
08:35:26 [Process Scan] Pairing session events (connection / disconnection)
08:35:26 [Process Scan] Creating sessions snapshot
08:35:26 [Process Scan] Inserting scan results into Online_History
08:35:26 [Process Scan] Skipping repeated notifications
08:35:26 [Skip Repeated Notifications] Skip Repeated start
08:35:26 [Skip Repeated Notifications] Skip Repeated end
08:35:26 [Notification] Check if something to report
08:35:26 [Notification] Open text Template
08:35:26 [Notification] Open html Template
08:35:26 [Notification] included sections: ['internet', 'new_devices', 'down_devices', 'events']
08:35:26 [Notification] Internet sections done.
08:35:26 [Notification] New Devices sections done.
08:35:26 [Notification] Down Devices sections done.
08:35:26 [Notification] Events sections done.
08:35:26 [Notification] No changes to report
08:35:26 [Notification] Notifications changes: 0
08:35:26 [MAIN] cycle:cleanup
08:35:26 [DB Cleanup] Upkeep Database:
08:35:26 [DB Cleanup] Online_History: Delete all but keep latest 150 entries
08:35:26 [DB Cleanup] Optimize Database
08:35:26 [DB Cleanup] Events: Delete all older than 90 days
08:35:26 [DB Cleanup] Plugin Events History: Delete all older than 90 days
08:35:26 [DB Cleanup] Pholus_Scan: Delete all older than 7 days
08:35:26 [DB Cleanup] Pholus_Scan: Delete all duplicates
08:35:26 Nmap_Scan: Delete all duplicates
08:35:26 Shrink Database
08:35:26 [MAIN] Last action: cleanup
08:35:26 [MAIN] cycle:
08:35:26 [MAIN] Process: Wait
08:35:32 [API] Update API starting
08:35:32 [API] Updating table_pholus_scan.json file in /front/api
08:35:32 [MAIN] waiting to start next loop
08:35:37 [API] Update API starting
08:35:37 [Process Scan] Processing scan results
08:35:37 [Process Scan] Print Stats
08:35:37 [Scan Stats] Devices Detected.......: 0
08:35:37 [Scan Stats] arp-scan detected..: 0
08:35:37 [Scan Stats] Pi-hole detected...: +0
08:35:37 [Scan Stats] New Devices........: 0
08:35:37 [Scan Stats] Devices in this cycle..: 0
08:35:37 [Scan Stats] Down Alerts........: 0
08:35:37 [Scan Stats] New Down Alerts....: 0
08:35:37 [Scan Stats] New Connections....: 0
08:35:37 [Scan Stats] Disconnections.....: 0
08:35:37 [Scan Stats] IP Changes.........: 0
08:35:37 [Process Scan] Stats end
08:35:37 [Process Scan] Updating DB Info
08:35:37 [Process Scan] Sessions Events (connect / discconnect)
08:35:37 [Process Scan] Creating new devices
08:35:37 [Process Scan] Updating Devices Info
08:35:37 [Process Scan] Resolve devices names
08:35:37 [Update Device Name] Trying to resolve devices without name
08:35:37 [Update Device Name] Pholus entries from prev scans: 6
08:35:38 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
08:35:38 [Update Device Name] Names Not Found : 1
08:35:38 [Process Scan] Voiding false (ghost) disconnections
08:35:38 [Process Scan] Pairing session events (connection / disconnection)
08:35:38 [Process Scan] Creating sessions snapshot
08:35:38 [Process Scan] Inserting scan results into Online_History
08:35:38 [Process Scan] Skipping repeated notifications
08:35:38 [Skip Repeated Notifications] Skip Repeated start
08:35:38 [Skip Repeated Notifications] Skip Repeated end
08:35:38 [MAIN] Process: Wait
08:35:43 [API] Update API starting
08:35:43 [MAIN] waiting to start next loop
08:35:48 [API] Update API starting
08:35:48 [MAIN] waiting to start next loop
08:35:54 [API] Update API starting


**Paste your `pialert.conf` (remove personal info)**

#-----------------AUTOGENERATED FILE-----------------#

Generated: 2022-12-30_22-19-40

Config file for the LAN intruder detection app:

https://github.com/jokob-sk/Pi.Alert

#-----------------AUTOGENERATED FILE-----------------#

General

#---------------------------

Scan using interface eth0

SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0']

Scan multiple interfaces (eth1 and eth0):

SCAN_SUBNETS = [ '192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0' ]

SCAN_SUBNETS=['192.168.0.0/24 --interface=eth0']
PRINT_LOG=False
TIMEZONE='Europe/Paris'
PIALERT_WEB_PROTECTION=False
PIALERT_WEB_PASSWORD='8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92'
INCLUDED_SECTIONS=['internet','new_devices','down_devices','events']
SCAN_CYCLE_MINUTES=5
DAYS_TO_KEEP_EVENTS=90

Used for generating links in emails. Make sure not to add a trailing slash!

REPORT_DASHBOARD_URL='http://pi.alert'

Email

#---------------------------
REPORT_MAIL=False
SMTP_SERVER='smtp.gmail.com'
SMTP_PORT=587
REPORT_TO='[email protected]'
REPORT_FROM='Pi.Alert [email protected]'
SMTP_SKIP_LOGIN=False
SMTP_USER='[email protected]'
SMTP_PASS='password'
SMTP_SKIP_TLS=False

Webhooks

#---------------------------
REPORT_WEBHOOK=False
WEBHOOK_URL='http://n8n.local:5555/webhook-test/aaaaaaaa-aaaa-aaaa-aaaaa-aaaaaaaaaaaa'
WEBHOOK_PAYLOAD='json' # webhook payload data format for the "body > attachements > text" attribute
# in https://github.com/jokob-sk/Pi.Alert/blob/main/docs/webhook_json_sample.json
# supported values: 'json', 'html' or 'text'
# e.g.: for discord use 'html'
WEBHOOK_REQUEST_METHOD='GET'

Apprise

#---------------------------
REPORT_APPRISE=False
APPRISE_HOST='http://localhost:8000/notify'
APPRISE_URL='mailto://smtp-relay.sendinblue.com:587?from=[email protected]&name=apprise&user=[email protected]&pass=password&to=[email protected]'

NTFY

#---------------------------
REPORT_NTFY=False
NTFY_HOST='https://ntfy.sh'
NTFY_TOPIC='replace_my_secure_topicname_91h889f28'
NTFY_USER='user'
NTFY_PASSWORD='passw0rd'

PUSHSAFER

#---------------------------
REPORT_PUSHSAFER=False
PUSHSAFER_TOKEN='ApiKey'

MQTT

#---------------------------
REPORT_MQTT=False
MQTT_BROKER='192.168.1.2'
MQTT_PORT=1883
MQTT_USER='mqtt'
MQTT_PASSWORD='passw0rd'
MQTT_QOS=0
MQTT_DELAY_SEC=2

DynDNS

#---------------------------
DDNS_ACTIVE=False
DDNS_DOMAIN='your_domain.freeddns.org'
DDNS_USER='dynu_user'
DDNS_PASSWORD='A0000000B0000000C0000000D0000000'
DDNS_UPDATE_URL='https://api.dynu.com/nic/update?'

PiHole

#---------------------------

if enabled you need to map '/etc/pihole/pihole-FTL.db' in docker-compose.yml

PIHOLE_ACTIVE=False

if enabled you need to map '/etc/pihole/dhcp.leases' in docker-compose.yml

DHCP_ACTIVE=False

Pholus

#---------------------------
PHOLUS_ACTIVE=False
PHOLUS_TIMEOUT=120
PHOLUS_FORCE=False
PHOLUS_DAYS_DATA=7
PHOLUS_RUN='once'
PHOLUS_RUN_TIMEOUT=600
PHOLUS_RUN_SCHD='0 4 * * *'

#-------------------IMPORTANT INFO-------------------#

This file is ingested by a python script, so if

modified it needs to use python syntax

#-------------------IMPORTANT INFO-------------------#


**Paste your `docker-compose.yml` and `.env` (remove personal info)**

`docker-compose.yml` 

version: "3"
services:
pialert:
container_name: pialert
image: "jokobsk/pi.alert:latest"
network_mode: "host"
restart: always
volumes:
- /home/eric/pialert/config:/home/pi/pialert/config
- /home/eric/pialert/db:/home/pi/pialert/db
- /home/eric/log:/home/pi/pialert/front/log
environment:
- TZ=Europe/Paris
- HOST_USER_ID=1001
- HOST_USER_GID=1001
- PORT=20211


`.env` 

paste_here


**Screenshots**
If applicable, add screenshots to help explain your problem.
![image](https://github.com/jokob-sk/Pi.Alert/assets/137160247/900905e6-a66e-4c9d-8fed-9a352743171f)


@Walgo Walgo changed the title Since the last update, pialert sees the network but does not update the interface Since the last update, arp-scan sees the devices but does not update the interface Jun 21, 2023
@jokob-sk
Copy link
Owner

Hi there,

Could you please give an example of what is happening?

Also, can you please try clearing your cache, trying a different browser to make sure it's not browser related?

If above doesn't help, try recreating the container after you backup your data via the CSV export feature.

Thanks,
J

@jokob-sk jokob-sk added the Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. label Jun 21, 2023
@Walgo
Copy link
Author

Walgo commented Jun 21, 2023

Thx Jokob-sk for your reply.

Ok ! I'v tried with Edge, same result !
About recreating the container, the last is this morning old with the command: docker rmi -f pialert to erase the image and the docker command:

docker run -d --rm --network=host -v /home/eric/pialert/config:/home/pi/pialert/config -v /home/eric/pialert/db:/home/pi/pialert/db -v /home/eric/pialert/log:/home/pi/pialert/front/log -v /home/eric/pialert/front/api:/home/pi/pialert/front/api -e TZ=Europe/Paris -e PORT=20211 jokobsk/pi.alert:latest

to download again and enable. Then, stop and the docker compose command !
Perhaps the log with the debug option would be better ?
Fyi, same problem with the 3.5.7 version (i've tried)

Thanks,

Walgo

@Walgo
Copy link
Author

Walgo commented Jun 21, 2023

I forgot your question... sorry
"Could you please give an example of what is happening?"

Only 2 devices are selected with the good and same subnet enabled (192.168.0.0/24) and 20 devices are waiting to be selected by stats. I had no problem whith the 23.04.01. but the image is no longer available. Possibly, could you give me a link to download the 23.04.01 again ? (to try again this old version)
About RPI it is a buster version.

@jokob-sk
Copy link
Owner

Hi,

Thanks for the details!

Could you please explain what you mean by:

" 20 devices are waiting to be selected by stats."

Can you please try:

  • exporting the devices CSV,
  • removing the container and temporary volumes,
  • starting with a clean DB
  • and reimporting the CSV?

Please backup everything and start with an empty DB (use your old config, that should work).

You can try some of the older dev builds, but I suggest trying the above at first.
https://hub.docker.com/r/jokobsk/pi.alert_dev/tags?page=3

@Walgo
Copy link
Author

Walgo commented Jun 22, 2023

Hi Jokob,

The two devices recognized are, the link with internet and the raspberry hosting Pialert (192.168.0.174) subnet 192.168.0.0/24
image

The log print the selected devices of the subnet.

image

The arp-scan sees 20 devices but they are not selected in stats

image

After the import of devices.csv
image

and the following

image

Ok, i try the last dev version !

i'll keep you posted !

Thanks a lot !

Walgo

jokob-sk added a commit that referenced this issue Jun 23, 2023
@jokob-sk
Copy link
Owner

Thanks, @Walgo for the additional information, your last message was very helpful!

I found 2 probable causes o this behavior and tried to fix them (maybe missing db.commit, maybe incorrect value in a variable). Can you please test this? Grab the latest dev build here:

https://registry.hub.docker.com/r/jokobsk/pi.alert_dev

If you still have issues, please share a few lines from your logs while your LOG_LEVEL is set to debug around the entry containing the string [ARP Scan] Detected devices in conf:, for example:

07:52:43 [ARP Scan] Detected devices:25
07:52:43 [ARP Scan] Detected devices in conf:25

Thanks!
j

@Walgo
Copy link
Author

Walgo commented Jun 23, 2023

Hi Jokob,

Same problem !

Here is the log from "jokobsk/pi.alert_dev:latest" downloaded the 06/24/2023 at 00:05 local time

00:28:23 [API] Updating table_custom_endpoint.json file in /front/api
00:28:23 [updateState] changing state to: "Process: Start"
00:28:23 [updateState] changing state to: "Run: Plugins"
00:28:23 [Plugins] Check if any plugins need to be executed on run type: schedule
00:28:23 [updateState] changing state to: "Scan: Internet IP"
00:28:23 [Internet IP] Check Internet IP started
00:28:23 [Internet IP] - Retrieving Internet IP
00:28:23 [Internet IP] IP: XX.XXX.XXX.XXX
00:28:23 [Internet IP] Retrieving previous IP:
00:28:23 [Internet IP] 0.0.0.0
00:28:23 [Internet IP] New internet IP: XX.XXX.XXX.XXX
00:28:23 [DDNS] Skipping Dynamic DNS update
00:28:23 [updateState] changing state to: "Scan: Pholus"
00:28:23 [PholusScan] Scan: Pholus for 600s (10.0min)
00:28:23 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
00:28:44 [PholusScan] Scan: Pholus SUCCESS
00:28:44 [MAIN] cycle:1
00:28:44 [updateState] changing state to: "Scan: Network"
00:28:44 [Network Scan] Scan Devices:
00:28:44 [Network Scan] arp-scan start
00:28:44 [ARP Scan] - arpscan command: sudo arp-scan --ignoredups --retry=6 ['192.168.0.0/24', '--interface=eth0']
00:28:57 [ARP Scan]Interface: eth0, type: EN10MB, MAC: b8:27:eb:80:e4:06, IPv4: 192.168.0.174
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.0.18 00:a2:f1:1e:8b:e0 (Unknown)
192.168.0.32 ba:34:88:00:1b:55 (Unknown: locally administered)
192.168.0.31 a8:93:4a:94:d3:74 CHONGQING FUGUI ELECTRONICS CO.,LTD.
192.168.0.35 b8:27:eb:92:b5:00 Raspberry Pi Foundation
192.168.0.36 b8:27:eb:cd:0c:32 Raspberry Pi Foundation
192.168.0.65 b8:27:eb:a3:82:e5 Raspberry Pi Foundation
192.168.0.82 3c:2a:f4:03:57:26 Brother Industries, LTD.
192.168.0.100 f0:2f:74:c7:15:c8 ASUSTek COMPUTER INC.
192.168.0.107 00:2a:2a:42:ff:2e (Unknown)
192.168.0.111 2c:4d:54:d7:88:a5 ASUSTek COMPUTER INC.
192.168.0.112 00:41:cb:77:1f:eb (Unknown)
192.168.0.124 00:24:d4:7d:2e:16 FREEBOX SAS
192.168.0.95 60:e3:27:25:fe:4b TP-LINK TECHNOLOGIES CO.,LTD.
192.168.0.144 08:26:97:f4:3a:af Zyxel Communications Corporation
192.168.0.154 00:de:54:60:a2:93 (Unknown)
192.168.0.160 08:26:97:f4:4d:b0 Zyxel Communications Corporation
192.168.0.170 5c:a6:e6:b7:63:f3 TP-Link Corporation Limited
192.168.0.254 34:27:92:47:b0:93 FREEBOX SAS

21 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 12.177 seconds (21.02 hosts/sec). 18 responded

00:28:57 [ARP Scan] on Interface Completed with results:
00:28:57 [ARP Scan] Completed found 0 devices
00:28:57 [Network Scan] arp-scan ends
00:28:57 [updateState] changing state to: "Run: Plugins"
00:28:57 [Plugins] Check if any plugins need to be executed on run type: always_after_scan
00:28:57 [Plugins] ---------------------------------------------
00:28:57 [Plugins] display_name: Website monitor
00:28:57 [Plugins] CMD: python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}
00:28:57 [Plugins] Timeout: 10
00:28:57 ['Internet']
00:28:57 https://nuage.junglelaw.nethttps://aescudoc.aesculape.euhttps://doc.naturilys.fr
00:28:57 [Plugins]: Pre-Resolved CMD: python3/home/pi/pialert/front/plugins/website_monitor/script.pyurls={urls}
00:28:57 [Plugins] Executing: python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}
00:28:57 [Plugins] Resolved : ['python3', '/home/pi/pialert/front/plugins/website_monitor/script.py', 'urls=https://nuage.junglelaw.net,https://aescudoc.aesculape.eu,https://doc.naturilys.fr']
00:28:59 [Plugins]: SUCCESS, received 3 entries
00:28:59 [Plugins] Processing : WEBMON
00:28:59 [Plugins] Existing objects : 0
00:28:59 [Plugins] New and existing events : 3
00:28:59 [API] Update API starting
00:28:59 [Database] - get_table_as_json - Query: SELECT * FROM Plugins_Events
00:28:59 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
00:28:59 [API] Updating table_plugins_events.json file in /front/api
00:28:59 [Database] - get_table_as_json - Query: SELECT * FROM Plugins_Objects
00:28:59 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
00:28:59 [API] Updating table_plugins_objects.json file in /front/api
00:28:59 [MAIN] start processig scan results
00:28:59 [Process Scan] Processing scan results
00:28:59 [ARP Scan] Detected devices:0
00:28:59 [ARP Scan] Detected devices in conf:0
00:28:59 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174
00:28:59 [Process Scan] Print Stats
00:28:59 [Scan Stats] Devices Detected.......: 2
00:28:59 [Scan Stats] arp-scan detected..: 0
00:28:59 [Scan Stats] Pi-hole detected...: +0
00:28:59 [Scan Stats] New Devices........: 1
00:28:59 [Scan Stats] Devices in this cycle..: 1
00:28:59 [Scan Stats] Down Alerts........: 0
00:28:59 [Scan Stats] New Down Alerts....: 0
00:28:59 [Scan Stats] New Connections....: 0
00:28:59 [Scan Stats] Disconnections.....: 0
00:28:59 [Scan Stats] IP Changes.........: 0
00:28:59 [Process Scan] Stats end
00:28:59 [Process Scan] Updating DB Info
00:28:59 [Process Scan] Sessions Events (connect / discconnect)
00:28:59 [Events] - 1 - Devices down
00:28:59 [Events] - 2 - New Connections
00:28:59 [Events] - 3 - Disconnections
00:28:59 [Events] - 4 - IP Changes
00:28:59 [Events] - Events end

Thanks to you !!

@jokob-sk
Copy link
Owner

Hi,

Thanks for the quick reply and details!

Could you please ssh into the container and run:

sudo arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth1

And also

sudo arp-scan --ignoredups --retry=6  192.168.1.0/24 --interface=eth0

And post the output?

What I think is happening is, that there is an error that is not visible in pialert logs and the output you see in this screen comes actually from the error log:

https://github.com/jokob-sk/Pi.Alert/blob/3d1178bd16a351ad523a023cbf43c913ae75827c/pialert/scanners/arpscan.py#L53

The second line in this screenshot that starts with [ARP Scan]:

image

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 1, 2023

closing for now as no reply for a week, will reopen if needed

@jokob-sk jokob-sk closed this as completed Jul 1, 2023
@Walgo
Copy link
Author

Walgo commented Jul 3, 2023

Hi Jokob-sk,

Sorry !

your demand !

arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth1
pcap_activate: eth1: No such device exists
(SIOCGIFHWADDR: No such device)

arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth0
Interface: eth0, type: EN10MB, MAC: b8:27:eb:80:e4:06, IPv4: 192.168.0.174
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.1.88 00:41:cb:77:1f:eb (Unknown)

My subnet is 192.168.0.0/24 so ! with the same command !

arp-scan --ignoredups --retry=6 192.168.0.0/24 --interface=eth1
pcap_activate: eth1: No such device exists
(SIOCGIFHWADDR: No such device)

arp-scan --ignoredups --retry=6 192.168.0.0/24 --interface=eth0
Interface: eth0, type: EN10MB, MAC: b8:27:eb:80:e4:06, IPv4: 192.168.0.174
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.0.18 00:a2:f1:1e:8b:e0 (Unknown)
192.168.0.32 ba:34:88:00:1b:55 (Unknown: locally administered)
192.168.0.35 b8:27:eb:92:b5:00 Raspberry Pi Foundation
192.168.0.31 a8:93:4a:94:d3:74 CHONGQING FUGUI ELECTRONICS CO.,LTD.
192.168.0.36 b8:27:eb:cd:0c:32 Raspberry Pi Foundation
192.168.0.65 b8:27:eb:a3:82:e5 Raspberry Pi Foundation
192.168.0.77 64:80:99:95:ea:cf Intel Corporate
192.168.0.55 9c:9c:1f:9d:d5:5a Espressif Inc.
192.168.0.82 3c:2a:f4:03:57:26 Brother Industries, LTD.
192.168.0.100 f0:2f:74:c7:15:c8 ASUSTek COMPUTER INC.
192.168.0.107 00:2a:2a:42:ff:2e (Unknown)
192.168.0.111 2c:4d:54:d7:88:a5 ASUSTek COMPUTER INC.
192.168.0.112 00:41:cb:77:1f:eb (Unknown)
192.168.0.124 00:24:d4:7d:2e:16 FREEBOX SAS
192.168.0.83 5c:cf:7f:f7:bf:b2 Espressif Inc.
192.168.0.144 08:26:97:f4:3a:af Zyxel Communications Corporation
192.168.0.95 60:e3:27:25:fe:4b TP-LINK TECHNOLOGIES CO.,LTD.
192.168.0.154 00:de:54:60:a2:93 (Unknown)
192.168.0.160 08:26:97:f4:4d:b0 Zyxel Communications Corporation
192.168.0.170 5c:a6:e6:b7:63:f3 TP-Link Corporation Limited
192.168.0.254 34:27:92:47:b0:93 FREEBOX SAS

24 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 12.179 seconds (21.02 hosts/sec). 21 responded

@jokob-sk jokob-sk reopened this Jul 4, 2023
jokob-sk added a commit that referenced this issue Jul 4, 2023
jokob-sk added a commit that referenced this issue Jul 4, 2023
jokob-sk added a commit that referenced this issue Jul 4, 2023
@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2023

Hi there,

Thanks for the details!

Can you grab the latest dev build here and test this again? I added a few more debug outputs. Please look for the string [ARP Scan] Found: Devices including duplicates in your logs and paste the logs around that entry.

https://registry.hub.docker.com/r/jokobsk/pi.alert_dev

It should also generate log files for arp-scan results with the name arp_scan_output_0.txt. Can you post them too?

Thanks!

@Walgo
Copy link
Author

Walgo commented Jul 5, 2023

Hi Jokob,

The arp_scan_output_0.txt is empty.

The log file, hope that helps !

Regards
Walgo

09:47:34 

09:47:34 Permissions check (All should be True)
09:47:34 ------------------------------------------------
09:47:34   /config/pialert.conf |  READ  | True
09:47:34   /config/pialert.conf |  WRITE | True
09:47:34   /db/pialert.db       |  READ  | True
09:47:34   /db/pialert.db       |  WRITE | True
09:47:34 ------------------------------------------------
09:47:34 [Setup] Attempting to fix permissions.
09:47:35 [Setup] Fix Failed. Execute this command manually inside of the container: sudo chmod a+rw -R /home/pi/pialert/db/pialert.db
09:47:35 
09:47:35 [Setup] Attempting to fix permissions.
09:47:35 [Setup] Fix Failed. Execute this command manually inside of the container: sudo chmod a+rw -R /home/pi/pialert/config/pialert.conf
09:47:35 
09:47:35 [Database] Opening DB
09:47:35 [upgradeDB] Re-creating Settings table
09:47:35 [upgradeDB] Re-creating Parameters table
09:47:35 [Config] reading config file
09:47:35 [Config] Plugins: Number of dynamically loaded plugins: 7
09:47:35 [Plugins] ---------------------------------------------
09:47:35 [Plugins] display_name: SNMP discovery
09:47:35 [Plugins] description: This plugin is used to discover devices via the arp table(s) of a RFC1213 compliant router or switch.
09:47:35 [Plugins] ---------------------------------------------
09:47:35 [Plugins] display_name: Rogue DHCP
09:47:35 [Plugins] description: This plugin is to use NMAP to monitor for rogue DHCP servers.
09:47:36 [Plugins] ---------------------------------------------
09:47:36 [Plugins] display_name: Un-Discoverable Devices
09:47:36 [Plugins] description: This plugin is to import undiscoverable devices from a file.
09:47:36 [Plugins] ---------------------------------------------
09:47:36 [Plugins] display_name: DHCP Leases
09:47:36 [Plugins] description: This plugin is to import devices from dhcp.leases files.
09:47:36 [Plugins] ---------------------------------------------
09:47:36 [Plugins] display_name: Website monitor
09:47:36 [Plugins] description: This plugin is to monitor status changes of services or websites.
09:47:37 [Plugins] ---------------------------------------------
09:47:37 [Plugins] display_name: Services (NMAP)
09:47:37 [Plugins] description: This plugin shows all services discovered by NMAP scans.
09:47:38 [Plugins] ---------------------------------------------
09:47:38 [Plugins] display_name: UniFi import
09:47:38 [Plugins] description: This plugin is used to import devices from an UNIFI controller.
09:47:41 [API] Update API starting
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:47:41 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:47:41 [API] Updating table_settings.json file in /front/api
09:47:41 [Config] Imported new config
09:47:41 [updateState] changing state to: "Run: Plugins"
09:47:41 [Plugins] Check if any plugins need to be executed on run type: once
09:47:41 [API] Update API starting
09:47:41 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:47:41 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:47:41 [API] Updating table_devices.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:47:41 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:47:41 [API] Updating table_nmap_scan.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:47:41 [Database] - get_table_as_json - returning 3811 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:47:41 [API] Updating table_pholus_scan.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:47:41 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:47:41 [API] Updating table_events_pending_alert.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:47:41 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:47:41 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:47:41 [API] Updating table_plugins_events.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:47:41 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:47:41 [API] Updating table_plugins_history.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:47:41 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:47:41 [API] Updating table_plugins_objects.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:47:41 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:47:41 [API] Updating table_language_strings.json file in /front/api
09:47:41 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:47:41 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:47:41 [API] Updating table_custom_endpoint.json file in /front/api
09:47:41 [updateState] changing state to: "Process: Start"
09:47:42 [updateState] changing state to: "Run: Plugins"
09:47:42 [Plugins] Check if any plugins need to be executed on run type: schedule
09:47:42 [Scheduler] - Scheduler run for WEBMON: NO
09:47:42 [updateState] changing state to: "Scan: Internet IP"
09:47:42 [Internet IP] Check Internet IP started
09:47:42 [Internet IP] - Retrieving Internet IP
09:47:42 [Internet IP] IP:      82.XXX.XXX.XXX
09:47:42 [Internet IP]    Retrieving previous IP:
09:47:42 [Internet IP]      82.XXX.XXX.XXX
09:47:42 [Internet IP]    No changes to perform
09:47:42 [DDNS]     Skipping Dynamic DNS update
09:47:42 [updateState] changing state to: "Scan: Pholus"
09:47:42 [PholusScan] Scan: Pholus for 600s (10.0min)
09:47:42 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
09:48:18 [PholusScan] Scan: Pholus SUCCESS
09:48:18 [MAIN] cycle:1
09:48:18 [updateState] changing state to: "Scan: Network"
09:48:18 [Network Scan] Scan Devices:
09:48:18 [Network Scan] arp-scan start
09:48:18 [ARP Scan] - arpscan command: sudo arp-scan --ignoredups --retry=6 ['192.168.0.0/24', '--interface=eth0']
09:48:31 [ARP Scan] Error: Interface: eth0, type: EN10MB, MAC: b8:27:eb:80:e4:06, IPv4: 192.168.0.174
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.0.18	00:a2:f1:1e:8b:e0	(Unknown)
192.168.0.32	ba:34:88:00:1b:55	(Unknown: locally administered)
192.168.0.35	b8:27:eb:92:b5:00	Raspberry Pi Foundation
192.168.0.36	b8:27:eb:cd:0c:32	Raspberry Pi Foundation
192.168.0.31	a8:93:4a:94:d3:74	CHONGQING FUGUI ELECTRONICS CO.,LTD.
192.168.0.65	b8:27:eb:a3:82:e5	Raspberry Pi Foundation
192.168.0.55	9c:9c:1f:9d:d5:5a	Espressif Inc.
192.168.0.77	64:80:99:95:ea:cf	Intel Corporate
192.168.0.82	3c:2a:f4:03:57:26	Brother Industries, LTD.
192.168.0.100	f0:2f:74:c7:15:c8	ASUSTek COMPUTER INC.
192.168.0.83	5c:cf:7f:f7:bf:b2	Espressif Inc.
192.168.0.107	00:2a:2a:42:ff:2e	(Unknown)
192.168.0.111	2c:4d:54:d7:88:a5	ASUSTek COMPUTER INC.
192.168.0.112	00:41:cb:77:1f:eb	(Unknown)
192.168.0.124	00:24:d4:7d:2e:16	FREEBOX SAS
192.168.0.95	60:e3:27:25:fe:4b	TP-LINK TECHNOLOGIES CO.,LTD.
192.168.0.154	00:de:54:60:a2:93	(Unknown)
192.168.0.160	08:26:97:f4:4d:b0	Zyxel Communications Corporation
192.168.0.170	5c:a6:e6:b7:63:f3	TP-Link Corporation Limited
192.168.0.254	34:27:92:47:b0:93	FREEBOX SAS

24 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 12.137 seconds (21.09 hosts/sec). 20 responded

09:48:31 [ARP Scan] on Interface Completed with results: 
09:48:31 [ARP Scan] Found: Devices including duplicates 0
09:48:31 [ARP Scan] Found: Devices without duplicates 0
09:48:31 [Network Scan] arp-scan ends
09:48:31 [updateState] changing state to: "Run: Plugins"
09:48:31 [Plugins] Check if any plugins need to be executed on run type: always_after_scan
09:48:31 [MAIN] start processig scan results
09:48:31 [Process Scan]  Processing scan results
09:48:31 [ARP Scan] Detected devices:0
09:48:31 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174
09:48:31 [Process Scan] Print Stats
09:48:31 [Scan Stats]    Devices Detected.......: 2
09:48:31 [Scan Stats]        arp-scan detected..: 0
09:48:31 [Scan Stats]        Pi-hole detected...: +0
09:48:31 [Scan Stats]        New Devices........: 0
09:48:31 [Scan Stats]    Devices in this cycle..: 2
09:48:31 [Scan Stats]        Down Alerts........: 0
09:48:31 [Scan Stats]        New Down Alerts....: 0
09:48:31 [Scan Stats]        New Connections....: 0
09:48:31 [Scan Stats]        Disconnections.....: 0
09:48:31 [Scan Stats]        IP Changes.........: 0
09:48:31 [Process Scan] Stats end
09:48:31 [Process Scan] Updating DB Info
09:48:31 [Process Scan] Sessions Events (connect / discconnect)
09:48:31 [Events] - 1 - Devices down
09:48:31 [Events] - 2 - New Connections
09:48:31 [Events] - 3 - Disconnections
09:48:31 [Events] - 4 - IP Changes
09:48:31 [Events] - Events end
09:48:31 [Process Scan] Creating new devices
09:48:31 [New Devices] New devices - 1 Events
09:48:31 [New Devices] Insert Connection into session table
09:48:31 [New Devices] 2 Create devices
09:48:31 [New Devices] 3 Pi-hole Events
09:48:31 [New Devices] 4 Pi-hole Create devices
09:48:31 [New Devices] 5 DHCP Leases Events
09:48:31 [New Devices] 6 DHCP Leases Create devices
09:48:31 [New Devices] New Devices end
09:48:31 [Process Scan] Updating Devices Info
09:48:31 [Update Devices] 1 Last Connection
09:48:31 [Update Devices] 2 Clean no active devices
09:48:31 [Update Devices] - 3 LastIP & Vendor
09:48:31 [Update Devices] - 4 Unknown Name
09:48:31 [Update Devices] - 5 Vendor
09:48:31 [Update Devices] Update devices end
09:48:31 [Process Scan] Resolve devices names
09:48:31 [updateState] changing state to: "Scan: Pholus"
09:48:31 [PholusScan] Scan: Pholus for 120s (2.0min)
09:48:31 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
09:49:15 [PholusScan] Scan: Pholus SUCCESS
09:49:16 [Update Device Name] Trying to resolve devices without name
09:49:16 [Update Device Name] Pholus entries from prev scans: 1255
09:49:16 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
09:49:16 [Update Device Name] Names Not Found         : 1
09:49:16 [Process Scan] Voiding false (ghost) disconnections
09:49:16 [Void Ghost Con] - 1 Connect ghost events
09:49:16 [Void Ghost Con] - 2 Paired events
09:49:16 [Void Ghost Con] - 3 Disconnect ghost events
09:49:16 [Void Ghost Con] Void Ghost Connections end
09:49:16 [Process Scan] Pairing session events (connection / disconnection) 
09:49:16 [Pair Session] - 1 Connections / New Devices
09:49:16 [Pair Session] - 2 Disconnections
09:49:16 [Pair Session] Pair session end
09:49:16 [Process Scan] Creating sessions snapshot
09:49:16 [Sessions Snapshot] - 1 Clean
09:49:16 [Sessions Snapshot] - 2 Insert
09:49:16 [Sessions Snapshot] Sessions end
09:49:16 [Process Scan] Inserting scan results into Online_History
09:49:16 [Database] - Read One: SELECT count(*) FROM CurrentScan params: ()
09:49:16 [Database] - Read All: SELECT Query: SELECT count(*) FROM CurrentScan params: ()
09:49:16 [Database] - Read All: SELECT Query: SELECT * FROM Devices params: ()
09:49:16 [Database] - Read All: SELECT Query: SELECT * FROM Devices WHERE dev_Archived = 1 params: ()
09:49:16 [Database] - Read All: SELECT Query: SELECT * FROM CurrentScan params: ()
09:49:16 [Process Scan] Skipping repeated notifications
09:49:16 [Skip Repeated Notifications] Skip Repeated start
09:49:16 [Skip Repeated Notifications] Skip Repeated end
09:49:16 [Notification] Check if something to report
09:49:16 [Notification] Open text Template
09:49:16 [Notification] Open html Template
09:49:16 [Notification] included sections: ['internet', 'new_devices', 'down_devices', 'events']
09:49:16 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC,  eve_IP as IP, eve_DateTime as Datetime, eve_EventType as "Event Type", eve_AdditionalInfo as "More info" FROM Events
                        WHERE eve_PendingAlertEmail = 1 AND eve_MAC = 'Internet'
                        ORDER BY eve_DateTime
09:49:16 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'IP', 'Datetime', 'Event Type', 'More info']
09:49:16 [Notification] Internet sections done.
09:49:16 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC, eve_DateTime as Datetime, dev_LastIP as IP, eve_EventType as "Event Type", dev_Name as "Device name", dev_Comments as Comments  FROM Events_Devices
                        WHERE eve_PendingAlertEmail = 1
                        AND eve_EventType = 'New Device'
                        ORDER BY eve_DateTime
09:49:16 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'Datetime', 'IP', 'Event Type', 'Device name', 'Comments']
09:49:16 [Notification] New Devices sections done.
09:49:16 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC, eve_DateTime as Datetime, dev_LastIP as IP, eve_EventType as "Event Type", dev_Name as "Device name", dev_Comments as Comments  FROM Events_Devices
                        WHERE eve_PendingAlertEmail = 1
                        AND eve_EventType = 'Device Down'
                        ORDER BY eve_DateTime
09:49:16 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'Datetime', 'IP', 'Event Type', 'Device name', 'Comments']
09:49:16 [Notification] Down Devices sections done.
09:49:16 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC, eve_DateTime as Datetime, dev_LastIP as IP, eve_EventType as "Event Type", dev_Name as "Device name", dev_Comments as Comments  FROM Events_Devices
                        WHERE eve_PendingAlertEmail = 1
                        AND eve_EventType IN ('Connected','Disconnected',
                            'IP Changed')
                        ORDER BY eve_DateTime
09:49:16 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'Datetime', 'IP', 'Event Type', 'Device name', 'Comments']
09:49:16 [Notification] Events sections done.
09:49:16 [Notification] No changes to report
09:49:16 [Notification] Notifications changes: 0
09:49:16 [MAIN] cycle:cleanup
09:49:16 [DB Cleanup] Upkeep Database:
09:49:16 [DB Cleanup] Online_History: Delete all but keep latest 150 entries
09:49:16 [DB Cleanup] Optimize Database
09:49:16 [DB Cleanup] Events: Delete all older than 90 days
09:49:16 [DB Cleanup] Plugin Events History: Delete all older than 90 days
09:49:16 [DB Cleanup] Pholus_Scan: Delete all older than 7 days
09:49:16 [DB Cleanup] Pholus_Scan: Delete all duplicates
09:49:17     Nmap_Scan: Delete all duplicates
09:49:17     Shrink Database
09:49:17 [MAIN] Last action: cleanup
09:49:17 [MAIN] cycle:
09:49:17 [updateState] changing state to: "Process: Wait"
09:49:17 [MAIN] Process: Wait
09:49:22 [MAIN] Starting loop
09:49:22 [Import Config] checking config file 
09:49:22 [Import Config] lastImportedConfFile     :1687756872.739007
09:49:22 [Import Config] file modified time       :1687756872.739007
09:49:22 [Import Config] skipping config file import
09:49:22 [API] Update API starting
09:49:22 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:49:22 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:49:22 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:49:22 [Database] - get_table_as_json - returning 210 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:49:22 [API] Updating table_pholus_scan.json file in /front/api
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:49:22 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:49:22 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:49:22 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:49:22 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:49:22 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:49:22 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:49:22 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:49:22 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:49:22 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:49:22 [updateState] changing state to: "Process: Start"
09:49:22 [updateState] changing state to: "Run: Plugins"
09:49:22 [Plugins] Check if any plugins need to be executed on run type: schedule
09:49:22 [Scheduler] - Scheduler run for WEBMON: NO
09:49:22 [MAIN] start processig scan results
09:49:22 [Process Scan]  Processing scan results
09:49:22 [ARP Scan] Detected devices:0
09:49:22 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174
09:49:22 [Process Scan] Print Stats
09:49:22 [Scan Stats]    Devices Detected.......: 0
09:49:22 [Scan Stats]        arp-scan detected..: 0
09:49:22 [Scan Stats]        Pi-hole detected...: +0
09:49:22 [Scan Stats]        New Devices........: 0
09:49:22 [Scan Stats]    Devices in this cycle..: 0
09:49:22 [Scan Stats]        Down Alerts........: 0
09:49:22 [Scan Stats]        New Down Alerts....: 0
09:49:22 [Scan Stats]        New Connections....: 0
09:49:22 [Scan Stats]        Disconnections.....: 0
09:49:22 [Scan Stats]        IP Changes.........: 0
09:49:22 [Process Scan] Stats end
09:49:22 [Process Scan] Updating DB Info
09:49:22 [Process Scan] Sessions Events (connect / discconnect)
09:49:22 [Events] - 1 - Devices down
09:49:22 [Events] - 2 - New Connections
09:49:22 [Events] - 3 - Disconnections
09:49:22 [Events] - 4 - IP Changes
09:49:22 [Events] - Events end
09:49:22 [Process Scan] Creating new devices
09:49:22 [New Devices] New devices - 1 Events
09:49:22 [New Devices] Insert Connection into session table
09:49:22 [New Devices] 2 Create devices
09:49:22 [New Devices] 3 Pi-hole Events
09:49:22 [New Devices] 4 Pi-hole Create devices
09:49:22 [New Devices] 5 DHCP Leases Events
09:49:22 [New Devices] 6 DHCP Leases Create devices
09:49:22 [New Devices] New Devices end
09:49:22 [Process Scan] Updating Devices Info
09:49:22 [Update Devices] 1 Last Connection
09:49:22 [Update Devices] 2 Clean no active devices
09:49:22 [Update Devices] - 3 LastIP & Vendor
09:49:22 [Update Devices] - 4 Unknown Name
09:49:22 [Update Devices] - 5 Vendor
09:49:22 [Update Devices] Update devices end
09:49:22 [Process Scan] Resolve devices names
09:49:22 [updateState] changing state to: "Scan: Pholus"
09:49:22 [PholusScan] Scan: Pholus for 120s (2.0min)
09:49:22 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
09:49:54 [PholusScan] Scan: Pholus SUCCESS
09:49:56 [Update Device Name] Trying to resolve devices without name
09:49:56 [Update Device Name] Pholus entries from prev scans: 100
09:49:56 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
09:49:56 [Update Device Name] Names Not Found         : 1
09:49:56 [Process Scan] Voiding false (ghost) disconnections
09:49:56 [Void Ghost Con] - 1 Connect ghost events
09:49:56 [Void Ghost Con] - 2 Paired events
09:49:56 [Void Ghost Con] - 3 Disconnect ghost events
09:49:56 [Void Ghost Con] Void Ghost Connections end
09:49:56 [Process Scan] Pairing session events (connection / disconnection) 
09:49:56 [Pair Session] - 1 Connections / New Devices
09:49:56 [Pair Session] - 2 Disconnections
09:49:56 [Pair Session] Pair session end
09:49:56 [Process Scan] Creating sessions snapshot
09:49:56 [Sessions Snapshot] - 1 Clean
09:49:56 [Sessions Snapshot] - 2 Insert
09:49:56 [Sessions Snapshot] Sessions end
09:49:56 [Process Scan] Inserting scan results into Online_History
09:49:56 [Database] - Read One: SELECT count(*) FROM CurrentScan params: ()
09:49:56 [Database] - Read All: SELECT Query: SELECT count(*) FROM CurrentScan params: ()
09:49:56 [Database] - Read All: SELECT Query: SELECT * FROM Devices params: ()
09:49:56 [Database] - Read All: SELECT Query: SELECT * FROM Devices WHERE dev_Archived = 1 params: ()
09:49:56 [Database] - Read All: SELECT Query: SELECT * FROM CurrentScan params: ()
09:49:56 [Process Scan] Skipping repeated notifications
09:49:56 [Skip Repeated Notifications] Skip Repeated start
09:49:56 [Skip Repeated Notifications] Skip Repeated end
09:49:56 [updateState] changing state to: "Process: Wait"
09:49:56 [MAIN] Process: Wait
09:50:01 [MAIN] Starting loop
09:50:01 [Import Config] checking config file 
09:50:01 [Import Config] lastImportedConfFile     :1687756872.739007
09:50:01 [Import Config] file modified time       :1687756872.739007
09:50:01 [Import Config] skipping config file import
09:50:01 [API] Update API starting
09:50:01 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:50:01 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:50:01 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:50:01 [Database] - get_table_as_json - returning 236 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:50:01 [API] Updating table_pholus_scan.json file in /front/api
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:50:01 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:50:01 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:50:01 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:50:01 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:50:01 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:01 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:50:01 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:50:01 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:50:01 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:01 [MAIN] waiting to start next loop
09:50:06 [MAIN] Starting loop
09:50:06 [Import Config] checking config file 
09:50:06 [Import Config] lastImportedConfFile     :1687756872.739007
09:50:06 [Import Config] file modified time       :1687756872.739007
09:50:06 [Import Config] skipping config file import
09:50:07 [API] Update API starting
09:50:07 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:50:07 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:50:07 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:50:07 [Database] - get_table_as_json - returning 236 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:50:07 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:50:07 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:50:07 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:50:07 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:50:07 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:07 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:50:07 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:50:07 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:50:07 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:07 [MAIN] waiting to start next loop
09:50:12 [MAIN] Starting loop
09:50:12 [Import Config] checking config file 
09:50:12 [Import Config] lastImportedConfFile     :1687756872.739007
09:50:12 [Import Config] file modified time       :1687756872.739007
09:50:12 [Import Config] skipping config file import
09:50:12 [API] Update API starting
09:50:12 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:50:12 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:50:12 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:50:12 [Database] - get_table_as_json - returning 236 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:50:12 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:50:12 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:50:12 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:50:12 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:50:12 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:12 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:50:12 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:50:12 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:50:12 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:12 [MAIN] waiting to start next loop
09:50:17 [MAIN] Starting loop
09:50:17 [Import Config] checking config file 
09:50:17 [Import Config] lastImportedConfFile     :1687756872.739007
09:50:17 [Import Config] file modified time       :1687756872.739007
09:50:17 [Import Config] skipping config file import
09:50:18 [API] Update API starting
09:50:18 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:50:18 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:50:18 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:50:18 [Database] - get_table_as_json - returning 236 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:50:18 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:50:18 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:50:18 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:50:18 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:50:18 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:18 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:50:18 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:50:18 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:50:18 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:18 [MAIN] waiting to start next loop
09:50:23 [MAIN] Starting loop
09:50:23 [Import Config] checking config file 
09:50:23 [Import Config] lastImportedConfFile     :1687756872.739007
09:50:23 [Import Config] file modified time       :1687756872.739007
09:50:23 [Import Config] skipping config file import
09:50:23 [API] Update API starting
09:50:23 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:50:23 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:50:23 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:50:23 [Database] - get_table_as_json - returning 236 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:50:23 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:50:23 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:50:23 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:50:23 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:50:23 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:50:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:50:23 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:50:23 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:50:23 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:50:23 [updateState] changing state to: "Process: Start"
09:50:23 [updateState] changing state to: "Run: Plugins"
09:50:23 [Plugins] Check if any plugins need to be executed on run type: schedule
09:50:23 [Scheduler] - Scheduler run for WEBMON: NO
09:50:23 [MAIN] start processig scan results
09:50:23 [Process Scan]  Processing scan results
09:50:23 [ARP Scan] Detected devices:0
09:50:23 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174
09:50:23 [Process Scan] Print Stats
09:50:23 [Scan Stats]    Devices Detected.......: 0
09:50:23 [Scan Stats]        arp-scan detected..: 0
09:50:23 [Scan Stats]        Pi-hole detected...: +0
09:50:23 [Scan Stats]        New Devices........: 0
09:50:23 [Scan Stats]    Devices in this cycle..: 0
09:50:23 [Scan Stats]        Down Alerts........: 0
09:50:23 [Scan Stats]        New Down Alerts....: 0
09:50:23 [Scan Stats]        New Connections....: 0
09:50:23 [Scan Stats]        Disconnections.....: 0
09:50:23 [Scan Stats]        IP Changes.........: 0
09:50:23 [Process Scan] Stats end
09:50:23 [Process Scan] Updating DB Info
09:50:23 [Process Scan] Sessions Events (connect / discconnect)
09:50:23 [Events] - 1 - Devices down
09:50:23 [Events] - 2 - New Connections
09:50:23 [Events] - 3 - Disconnections
09:50:23 [Events] - 4 - IP Changes
09:50:23 [Events] - Events end
09:50:23 [Process Scan] Creating new devices
09:50:23 [New Devices] New devices - 1 Events
09:50:23 [New Devices] Insert Connection into session table
09:50:23 [New Devices] 2 Create devices
09:50:23 [New Devices] 3 Pi-hole Events
09:50:23 [New Devices] 4 Pi-hole Create devices
09:50:23 [New Devices] 5 DHCP Leases Events
09:50:23 [New Devices] 6 DHCP Leases Create devices
09:50:23 [New Devices] New Devices end
09:50:23 [Process Scan] Updating Devices Info
09:50:23 [Update Devices] 1 Last Connection
09:50:23 [Update Devices] 2 Clean no active devices
09:50:23 [Update Devices] - 3 LastIP & Vendor
09:50:23 [Update Devices] - 4 Unknown Name
09:50:23 [Update Devices] - 5 Vendor
09:50:23 [Update Devices] Update devices end
09:50:23 [Process Scan] Resolve devices names
09:50:23 [updateState] changing state to: "Scan: Pholus"
09:50:23 [PholusScan] Scan: Pholus for 120s (2.0min)
09:50:23 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
09:51:10 [PholusScan] Scan: Pholus SUCCESS
09:51:10 [Update Device Name] Trying to resolve devices without name
09:51:10 [Update Device Name] Pholus entries from prev scans: 110
09:51:10 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
09:51:10 [Update Device Name] Names Not Found         : 1
09:51:10 [Process Scan] Voiding false (ghost) disconnections
09:51:10 [Void Ghost Con] - 1 Connect ghost events
09:51:10 [Void Ghost Con] - 2 Paired events
09:51:10 [Void Ghost Con] - 3 Disconnect ghost events
09:51:10 [Void Ghost Con] Void Ghost Connections end
09:51:10 [Process Scan] Pairing session events (connection / disconnection) 
09:51:10 [Pair Session] - 1 Connections / New Devices
09:51:10 [Pair Session] - 2 Disconnections
09:51:10 [Pair Session] Pair session end
09:51:10 [Process Scan] Creating sessions snapshot
09:51:10 [Sessions Snapshot] - 1 Clean
09:51:10 [Sessions Snapshot] - 2 Insert
09:51:11 [Sessions Snapshot] Sessions end
09:51:11 [Process Scan] Inserting scan results into Online_History
09:51:11 [Database] - Read One: SELECT count(*) FROM CurrentScan params: ()
09:51:11 [Database] - Read All: SELECT Query: SELECT count(*) FROM CurrentScan params: ()
09:51:11 [Database] - Read All: SELECT Query: SELECT * FROM Devices params: ()
09:51:11 [Database] - Read All: SELECT Query: SELECT * FROM Devices WHERE dev_Archived = 1 params: ()
09:51:11 [Database] - Read All: SELECT Query: SELECT * FROM CurrentScan params: ()
09:51:11 [Process Scan] Skipping repeated notifications
09:51:11 [Skip Repeated Notifications] Skip Repeated start
09:51:11 [Skip Repeated Notifications] Skip Repeated end
09:51:11 [updateState] changing state to: "Process: Wait"
09:51:11 [MAIN] Process: Wait
09:51:16 [MAIN] Starting loop
09:51:16 [Import Config] checking config file 
09:51:16 [Import Config] lastImportedConfFile     :1687756872.739007
09:51:16 [Import Config] file modified time       :1687756872.739007
09:51:16 [Import Config] skipping config file import
09:51:16 [API] Update API starting
09:51:16 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:51:16 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:51:16 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:51:16 [Database] - get_table_as_json - returning 256 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:51:16 [API] Updating table_pholus_scan.json file in /front/api
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:51:16 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:51:16 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:51:16 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:51:16 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:51:16 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:16 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:51:16 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:51:16 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:51:16 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:51:16 [MAIN] waiting to start next loop
09:51:21 [MAIN] Starting loop
09:51:21 [Import Config] checking config file 
09:51:21 [Import Config] lastImportedConfFile     :1687756872.739007
09:51:21 [Import Config] file modified time       :1687756872.739007
09:51:21 [Import Config] skipping config file import
09:51:21 [API] Update API starting
09:51:21 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:51:21 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:51:21 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:51:21 [Database] - get_table_as_json - returning 256 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:51:21 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:51:21 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:51:21 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:51:21 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:51:21 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:21 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:51:21 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:51:21 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:51:21 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:51:21 [MAIN] waiting to start next loop
09:51:26 [MAIN] Starting loop
09:51:26 [Import Config] checking config file 
09:51:26 [Import Config] lastImportedConfFile     :1687756872.739007
09:51:26 [Import Config] file modified time       :1687756872.739007
09:51:26 [Import Config] skipping config file import
09:51:27 [API] Update API starting
09:51:27 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:51:27 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:51:27 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:51:27 [Database] - get_table_as_json - returning 256 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:51:27 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:51:27 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:51:27 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:51:27 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:51:27 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:51:27 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:51:27 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:51:27 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:51:27 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:51:27 [updateState] changing state to: "Process: Start"
09:51:27 [updateState] changing state to: "Run: Plugins"
09:51:27 [Plugins] Check if any plugins need to be executed on run type: schedule
09:51:27 [Scheduler] - Scheduler run for WEBMON: NO
09:51:27 [updateState] changing state to: "Scan: Internet IP"
09:51:27 [Internet IP] Check Internet IP started
09:51:27 [Internet IP] - Retrieving Internet IP
09:51:27 [Internet IP] IP:      82.XXX.XXX.XXX
09:51:27 [Internet IP]    Retrieving previous IP:
09:51:27 [Internet IP]      82.XXX.XXX.XXX
09:51:27 [Internet IP]    No changes to perform
09:51:27 [DDNS]     Skipping Dynamic DNS update
09:51:27 [MAIN] start processig scan results
09:51:27 [Process Scan]  Processing scan results
09:51:27 [ARP Scan] Detected devices:0
09:51:27 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174
09:51:27 [Process Scan] Print Stats
09:51:27 [Scan Stats]    Devices Detected.......: 0
09:51:27 [Scan Stats]        arp-scan detected..: 0
09:51:27 [Scan Stats]        Pi-hole detected...: +0
09:51:27 [Scan Stats]        New Devices........: 0
09:51:27 [Scan Stats]    Devices in this cycle..: 0
09:51:27 [Scan Stats]        Down Alerts........: 0
09:51:27 [Scan Stats]        New Down Alerts....: 0
09:51:27 [Scan Stats]        New Connections....: 0
09:51:27 [Scan Stats]        Disconnections.....: 0
09:51:27 [Scan Stats]        IP Changes.........: 0
09:51:27 [Process Scan] Stats end
09:51:27 [Process Scan] Updating DB Info
09:51:27 [Process Scan] Sessions Events (connect / discconnect)
09:51:27 [Events] - 1 - Devices down
09:51:27 [Events] - 2 - New Connections
09:51:27 [Events] - 3 - Disconnections
09:51:27 [Events] - 4 - IP Changes
09:51:27 [Events] - Events end
09:51:27 [Process Scan] Creating new devices
09:51:27 [New Devices] New devices - 1 Events
09:51:27 [New Devices] Insert Connection into session table
09:51:27 [New Devices] 2 Create devices
09:51:27 [New Devices] 3 Pi-hole Events
09:51:27 [New Devices] 4 Pi-hole Create devices
09:51:27 [New Devices] 5 DHCP Leases Events
09:51:27 [New Devices] 6 DHCP Leases Create devices
09:51:27 [New Devices] New Devices end
09:51:27 [Process Scan] Updating Devices Info
09:51:27 [Update Devices] 1 Last Connection
09:51:27 [Update Devices] 2 Clean no active devices
09:51:27 [Update Devices] - 3 LastIP & Vendor
09:51:27 [Update Devices] - 4 Unknown Name
09:51:27 [Update Devices] - 5 Vendor
09:51:27 [Update Devices] Update devices end
09:51:27 [Process Scan] Resolve devices names
09:51:27 [updateState] changing state to: "Scan: Pholus"
09:51:27 [PholusScan] Scan: Pholus for 120s (2.0min)
09:51:27 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24
09:52:16 [PholusScan] Scan: Pholus SUCCESS
09:52:16 [Update Device Name] Trying to resolve devices without name
09:52:16 [Update Device Name] Pholus entries from prev scans: 120
09:52:16 [Update Device Name] Names Found (DiG/Pholus): 0 (0/0)
09:52:16 [Update Device Name] Names Not Found         : 1
09:52:16 [Process Scan] Voiding false (ghost) disconnections
09:52:16 [Void Ghost Con] - 1 Connect ghost events
09:52:16 [Void Ghost Con] - 2 Paired events
09:52:16 [Void Ghost Con] - 3 Disconnect ghost events
09:52:16 [Void Ghost Con] Void Ghost Connections end
09:52:16 [Process Scan] Pairing session events (connection / disconnection) 
09:52:16 [Pair Session] - 1 Connections / New Devices
09:52:16 [Pair Session] - 2 Disconnections
09:52:16 [Pair Session] Pair session end
09:52:16 [Process Scan] Creating sessions snapshot
09:52:16 [Sessions Snapshot] - 1 Clean
09:52:17 [Sessions Snapshot] - 2 Insert
09:52:17 [Sessions Snapshot] Sessions end
09:52:17 [Process Scan] Inserting scan results into Online_History
09:52:17 [Database] - Read One: SELECT count(*) FROM CurrentScan params: ()
09:52:17 [Database] - Read All: SELECT Query: SELECT count(*) FROM CurrentScan params: ()
09:52:17 [Database] - Read All: SELECT Query: SELECT * FROM Devices params: ()
09:52:17 [Database] - Read All: SELECT Query: SELECT * FROM Devices WHERE dev_Archived = 1 params: ()
09:52:17 [Database] - Read All: SELECT Query: SELECT * FROM CurrentScan params: ()
09:52:17 [Process Scan] Skipping repeated notifications
09:52:17 [Skip Repeated Notifications] Skip Repeated start
09:52:17 [Skip Repeated Notifications] Skip Repeated end
09:52:17 [Notification] Check if something to report
09:52:17 [Notification] Open text Template
09:52:17 [Notification] Open html Template
09:52:17 [Notification] included sections: ['internet', 'new_devices', 'down_devices', 'events']
09:52:17 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC,  eve_IP as IP, eve_DateTime as Datetime, eve_EventType as "Event Type", eve_AdditionalInfo as "More info" FROM Events
                        WHERE eve_PendingAlertEmail = 1 AND eve_MAC = 'Internet'
                        ORDER BY eve_DateTime
09:52:17 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'IP', 'Datetime', 'Event Type', 'More info']
09:52:17 [Notification] Internet sections done.
09:52:17 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC, eve_DateTime as Datetime, dev_LastIP as IP, eve_EventType as "Event Type", dev_Name as "Device name", dev_Comments as Comments  FROM Events_Devices
                        WHERE eve_PendingAlertEmail = 1
                        AND eve_EventType = 'New Device'
                        ORDER BY eve_DateTime
09:52:17 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'Datetime', 'IP', 'Event Type', 'Device name', 'Comments']
09:52:17 [Notification] New Devices sections done.
09:52:17 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC, eve_DateTime as Datetime, dev_LastIP as IP, eve_EventType as "Event Type", dev_Name as "Device name", dev_Comments as Comments  FROM Events_Devices
                        WHERE eve_PendingAlertEmail = 1
                        AND eve_EventType = 'Device Down'
                        ORDER BY eve_DateTime
09:52:17 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'Datetime', 'IP', 'Event Type', 'Device name', 'Comments']
09:52:17 [Notification] Down Devices sections done.
09:52:17 [Database] - get_table_as_json - Query: SELECT eve_MAC as MAC, eve_DateTime as Datetime, dev_LastIP as IP, eve_EventType as "Event Type", dev_Name as "Device name", dev_Comments as Comments  FROM Events_Devices
                        WHERE eve_PendingAlertEmail = 1
                        AND eve_EventType IN ('Connected','Disconnected',
                            'IP Changed')
                        ORDER BY eve_DateTime
09:52:17 [Database] - get_table_as_json - returning 0 rows with columns: ['MAC', 'Datetime', 'IP', 'Event Type', 'Device name', 'Comments']
09:52:17 [Notification] Events sections done.
09:52:17 [Notification] No changes to report
09:52:17 [Notification] Notifications changes: 0
09:52:17 [MAIN] Last action: internet_IP
09:52:17 [MAIN] cycle:
09:52:17 [updateState] changing state to: "Process: Wait"
09:52:17 [MAIN] Process: Wait
09:52:22 [MAIN] Starting loop
09:52:22 [Import Config] checking config file 
09:52:22 [Import Config] lastImportedConfFile     :1687756872.739007
09:52:22 [Import Config] file modified time       :1687756872.739007
09:52:22 [Import Config] skipping config file import
09:52:23 [API] Update API starting
09:52:23 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:52:23 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:52:23 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:52:23 [Database] - get_table_as_json - returning 286 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:52:23 [API] Updating table_pholus_scan.json file in /front/api
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:52:23 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:52:23 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:52:23 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:52:23 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:52:23 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:52:23 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:52:23 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:52:23 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:52:23 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:52:23 [MAIN] waiting to start next loop
09:52:28 [MAIN] Starting loop
09:52:28 [Import Config] checking config file 
09:52:28 [Import Config] lastImportedConfFile     :1687756872.739007
09:52:28 [Import Config] file modified time       :1687756872.739007
09:52:28 [Import Config] skipping config file import
09:52:28 [API] Update API starting
09:52:28 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_DeviceType, dev_Vendor, dev_Group, 
                     dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_StaticIP, 
                     dev_PresentLastScan, dev_LastNotification, dev_NewDevice, 
                     dev_Network_Node_MAC_ADDR, dev_Network_Node_port,  
                     dev_Icon from Devices
09:52:28 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_MAC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Nmap_Scan
09:52:28 [Database] - get_table_as_json - returning 1 rows with columns: ['Index', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Pholus_Scan
09:52:28 [Database] - get_table_as_json - returning 286 rows with columns: ['Index', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Events where eve_PendingAlertEmail is not 0
09:52:28 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_MAC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_PendingAlertEmail', 'eve_PairEventRowid']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Settings
09:52:28 [Database] - get_table_as_json - returning 126 rows with columns: ['Code_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Group', 'Events']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Events
09:52:28 [Database] - get_table_as_json - returning 0 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_History ORDER BY 'Index' DESC
09:52:28 [Database] - get_table_as_json - returning 6 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Objects
09:52:28 [Database] - get_table_as_json - returning 3 rows with columns: ['Index', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateTimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Value4', 'Status', 'Extra', 'UserData', 'ForeignKey']
09:52:28 [Database] - get_table_as_json - Query: SELECT  * FROM Plugins_Language_Strings
09:52:28 [Database] - get_table_as_json - returning 132 rows with columns: ['Index', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
09:52:28 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev_PresentLastScan = 0
09:52:28 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_MAC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'dev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev_AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastScan', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR', 'dev_Network_Node_port', 'dev_Icon']
09:52:28 [updateState] changing state to: "Process: Start"
09:52:29 [updateState] changing state to: "Run: Plugins"
09:52:29 [Plugins] Check if any plugins need to be executed on run type: schedule
09:52:29 [Scheduler] - Scheduler run for WEBMON: NO
09:52:29 [MAIN] start processig scan results
09:52:29 [Process Scan]  Processing scan results
09:52:29 [ARP Scan] Detected devices:0
09:52:29 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174
09:52:29 [Process Scan] Print Stats
09:52:29 [Scan Stats]    Devices Detected.......: 0
09:52:29 [Scan Stats]        arp-scan detected..: 0
09:52:29 [Scan Stats]        Pi-hole detected...: +0
09:52:29 [Scan Stats]        New Devices........: 0
09:52:29 [Scan Stats]    Devices in this cycle..: 0
09:52:29 [Scan Stats]        Down Alerts........: 0
09:52:29 [Scan Stats]        New Down Alerts....: 0
09:52:29 [Scan Stats]        New Connections....: 0
09:52:29 [Scan Stats]        Disconnections.....: 0
09:52:29 [Scan Stats]        IP Changes.........: 0
09:52:29 [Process Scan] Stats end
09:52:29 [Process Scan] Updating DB Info
09:52:29 [Process Scan] Sessions Events (connect / discconnect)
09:52:29 [Events] - 1 - Devices down
09:52:29 [Events] - 2 - New Connections
09:52:29 [Events] - 3 - Disconnections
09:52:29 [Events] - 4 - IP Changes
09:52:29 [Events] - Events end
09:52:29 [Process Scan] Creating new devices
09:52:29 [New Devices] New devices - 1 Events
09:52:29 [New Devices] Insert Connection into session table
09:52:29 [New Devices] 2 Create devices
09:52:29 [New Devices] 3 Pi-hole Events
09:52:29 [New Devices] 4 Pi-hole Create devices
09:52:29 [New Devices] 5 DHCP Leases Events
09:52:29 [New Devices] 6 DHCP Leases Create devices
09:52:29 [New Devices] New Devices end
09:52:29 [Process Scan] Updating Devices Info
09:52:29 [Update Devices] 1 Last Connection
09:52:29 [Update Devices] 2 Clean no active devices
09:52:29 [Update Devices] - 3 LastIP & Vendor
09:52:29 [Update Devices] - 4 Unknown Name
09:52:29 [Update Devices] - 5 Vendor
09:52:29 [Update Devices] Update devices end
09:52:29 [Process Scan] Resolve devices names
09:52:29 [updateState] changing state to: "Scan: Pholus"
09:52:29 [PholusScan] Scan: Pholus for 120s (2.0min)
09:52:29 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24

jokob-sk added a commit that referenced this issue Jul 5, 2023
@jokob-sk
Copy link
Owner

jokob-sk commented Jul 5, 2023

Hi @Walgo !

Thanks for ongoing testing!

I've added even more debug details in the log, can you re-download the latest dev image and post the output again?

The output should contain:

[ARP Scan] Error type  :

BTW you can use ``` around code sections in your comments to make them more readable

Thansk in advance,
j

@Walgo
Copy link
Author

Walgo commented Jul 6, 2023

Hi, Jokob

Thank's for your hard work !

Here is the log with the "[ARP Scan] Error type :"

06:45:32 [MAIN] cycle:1 06:45:32 [updateState] changing state to: "Scan: Network" 06:45:32 [Network Scan] Scan Devices: 06:45:32 [Network Scan] arp-scan start 06:45:32 [ARP Scan] - arpscan command: sudo arp-scan --ignoredups --retry=6 ['192.168.0.0/24', '--interface=eth0'] 06:45:45 [ARP Scan] Error type : CalledProcessError 06:45:45 [ARP Scan] Error output: Interface: eth0, type: EN10MB, MAC: b8:27:eb:80:e4:06, IPv4: 192.168.0.174 Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan) 192.168.0.18 00:a2:f1:1e:8b:e0 (Unknown) 192.168.0.32 ba:34:88:00:1b:55 (Unknown: locally administered) 192.168.0.35 b8:27:eb:92:b5:00 Raspberry Pi Foundation 192.168.0.36 b8:27:eb💿0c:32 Raspberry Pi Foundation 192.168.0.31 a8:93:4a:94:d3:74 CHONGQING FUGUI ELECTRONICS CO.,LTD. 192.168.0.65 b8:27:eb:a3:82:e5 Raspberry Pi Foundation 192.168.0.82 3c:2a:f4:03:57:26 Brother Industries, LTD. 192.168.0.55 9c:9c:1f:9d:d5:5a Espressif Inc. 192.168.0.100 f0:2f:74:c7:15:c8 ASUSTek COMPUTER INC. 192.168.0.107 00:2a:2a:42:ff:2e (Unknown) 192.168.0.111 2c:4d:54:d7:88:a5 ASUSTek COMPUTER INC. 192.168.0.112 00:41:cb:77:1f:eb (Unknown) 192.168.0.83 5c:cf:7f:f7:bf:b2 Espressif Inc. 192.168.0.124 00:24:d4:7d:2e:16 FREEBOX SAS 192.168.0.144 08:26:97:f4:3a:af Zyxel Communications Corporation 192.168.0.95 60:e3:27:25:fe:4b TP-LINK TECHNOLOGIES CO.,LTD. 192.168.0.154 00🇩🇪54:60:a2:93 (Unknown) 192.168.0.160 08:26:97:f4:4d:b0 Zyxel Communications Corporation 192.168.0.170 5c:a6:e6:b7:63:f3 TP-Link Corporation Limited 192.168.0.254 34:27:92:47:b0:93 FREEBOX SAS

22 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.9.7: 256 hosts scanned in 12.154 seconds (21.06 hosts/sec). 20 responded

06:45:45 [ARP Scan] on Interface Completed with results: 06:45:45 [ARP Scan] Found: Devices including duplicates 0 06:45:45 [ARP Scan] Found: Devices without duplicates 0 06:45:45 [Network Scan] arp-scan ends 06:45:45 [updateState] changing state to: "Run: Plugins" 06:45:45 [Plugins] Check if any plugins need to be executed on run type: always_after_scan 06:45:45 [MAIN] start processig scan results 06:45:45 [Process Scan] Processing scan results 06:45:45 [ARP Scan] Detected devices:0 06:45:45 [Save Devices] Saving this IP into the CurrentScan table:192.168.0.174 06:45:45 [Process Scan] Print Stats 06:45:45 [Scan Stats] Devices Detected.......: 2 06:45:45 [Scan Stats] arp-scan detected..: 0 06:45:45 [Scan Stats] Pi-hole detected...: +0 06:45:45 [Scan Stats] New Devices........: 0 06:45:45 [Scan Stats] Devices in this cycle..: 2 06:45:45 [Scan Stats] Down Alerts........: 0 06:45:45 [Scan Stats] New Down Alerts....: 0 06:45:45 [Scan Stats] New Connections....: 0 06:45:45 [Scan Stats] Disconnections.....: 0 06:45:45 [Scan Stats] IP Changes.........: 0 06:45:45 [Process Scan] Stats end 06:45:45 [Process Scan] Updating DB Info 06:45:45 [Process Scan] Sessions Events (connect / discconnect) 06:45:45 [Events] - 1 - Devices down 06:45:45 [Events] - 2 - New Connections 06:45:45 [Events] - 3 - Disconnections 06:45:45 [Events] - 4 - IP Changes 06:45:45 [Events] - Events end 06:45:45 [Process Scan] Creating new devices 06:45:45 [New Devices] New devices - 1 Events 06:45:45 [New Devices] Insert Connection into session table 06:45:45 [New Devices] 2 Create devices 06:45:45 [New Devices] 3 Pi-hole Events 06:45:45 [New Devices] 4 Pi-hole Create devices 06:45:45 [New Devices] 5 DHCP Leases Events 06:45:45 [New Devices] 6 DHCP Leases Create devices 06:45:45 [New Devices] New Devices end 06:45:45 [Process Scan] Updating Devices Info 06:45:45 [Update Devices] 1 Last Connection 06:45:45 [Update Devices] 2 Clean no active devices 06:45:45 [Update Devices] - 3 LastIP & Vendor

Regards

Walgo

FYI : the result of ifconfig command in case of utility...

ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:77:08:0b:14 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.174 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 2a01:e0a:4a4:d940:1309:9778:74a0:ac13 prefixlen 64 scopeid 0x0
inet6 fe80::7745:7999:2c11:28a prefixlen 64 scopeid 0x20
ether b8:27:eb:80:e4:06 txqueuelen 1000 (Ethernet)
RX packets 8838045 bytes 4096926493 (3.8 GiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 2699967 bytes 290034128 (276.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Boucle locale)
RX packets 61514 bytes 2519736 (2.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 61514 bytes 2519736 (2.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

jokob-sk added a commit that referenced this issue Jul 6, 2023
@jokob-sk
Copy link
Owner

jokob-sk commented Jul 6, 2023

Alright - I disabled the try-catch statement of the LOG_LEVEL is set to debug.

Can you try to redownload the latest dev image?

This should mean that your container will crash/restart, but it should give use a good error message about what's happening.

Please run the container without the -d parameter, for example (use your values for paths etc.):

docker run --rm --network=host \
  -v local/path/pialert/config:/home/pi/pialert/config \
  -v local/path/pialert/db:/home/pi/pialert/db \
  -e TZ=Europe/Berlin \
  -e PORT=20211 \
  jokobsk/pi.alert_dev:latest

@Walgo
Copy link
Author

Walgo commented Jul 6, 2023

Ok ! i've removed the "-d" and downloaded again the latest dev image !

Here is the terminal log not the pialert.log

docker run --rm --network=host -v /home/eri c/pialert/config:/home/pi/pialert/config -v /home/eric/pialert/db:/home/pi/pia lert/db -v /home/eric/pialert/log:/home/pi/pialert/front/log -v /home/eric/p ialert/front/api:/home/pi/pialert/front/api -e TZ=Europe/Paris -e PORT=20211 jokobsk/pi.alert_dev:latest
Nothing to do here.
Starting nginx: nginx.
sudo: error in event loop: Operation not permitted
sudo: unexpected child termination condition: 0
sudo: error in event loop: Operation not permitted
sudo: unexpected child termination condition: 0
01:06:08

01:06:08 Permissions check (All should be True)
01:06:08 ------------------------------------------------
01:06:08 /config/pialert.conf | READ | True
01:06:08 /config/pialert.conf | WRITE | True
01:06:08 /db/pialert.db | READ | True
01:06:08 /db/pialert.db | WRITE | True
01:06:08 ------------------------------------------------
01:06:08 [Setup] Attempting to fix permissions.
01:06:08 [Setup] Fix Failed. Execute this command manually inside of the contain er: sudo chmod a+rw -R /home/pi/pialert/db/pialert.db
01:06:08
01:06:08 [Setup] Attempting to fix permissions.
01:06:08 [Setup] Fix Failed. Execute this command manually inside of the contain er: sudo chmod a+rw -R /home/pi/pialert/config/pialert.conf
01:06:08
01:06:08 [Database] Opening DB
01:06:08 [upgradeDB] Re-creating Settings table
01:06:08 [upgradeDB] Re-creating Parameters table
01:06:08 [Config] reading config file
01:06:08 [Config] Plugins: Number of dynamically loaded plugins: 7
01:06:08 [Plugins] ---------------------------------------------
01:06:08 [Plugins] display_name: SNMP discovery
01:06:08 [Plugins] description: This plugin is used to discover devices via the arp table(s) of a RFC1213 compliant router or switch.
01:06:09 [Plugins] ---------------------------------------------
01:06:09 [Plugins] display_name: Rogue DHCP
01:06:09 [Plugins] description: This plugin is to use NMAP to monitor for rogue DHCP servers.
01:06:09 [Plugins] ---------------------------------------------
01:06:09 [Plugins] display_name: Un-Discoverable Devices
01:06:09 [Plugins] description: This plugin is to import undiscoverable devices from a file.
01:06:09 [Plugins] ---------------------------------------------
01:06:09 [Plugins] display_name: DHCP Leases
01:06:09 [Plugins] description: This plugin is to import devices from dhcp.lease s files.
01:06:14 [Plugins] ---------------------------------------------
01:06:14 [Plugins] display_name: Website monitor
01:06:14 [Plugins] description: This plugin is to monitor status changes of serv ices or websites.
01:06:15 [Plugins] ---------------------------------------------
01:06:15 [Plugins] display_name: Services (NMAP)
01:06:15 [Plugins] description: This plugin shows all services discovered by NMA P scans.
01:06:15 [Plugins] ---------------------------------------------
01:06:15 [Plugins] display_name: UniFi import
01:06:15 [Plugins] description: This plugin is used to import devices from an UN IFI controller.
01:06:18 [API] Update API starting
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Settings
01:06:18 [Database] - get_table_as_json - returning 126 rows with columns: ['Cod e_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Gr oup', 'Events']
01:06:18 [API] Updating table_settings.json file in /front/api
01:06:18 [Config] Imported new config
01:06:18 [updateState] changing state to: "Run: Plugins"
01:06:18 [Plugins] Check if any plugins need to be executed on run type: once
01:06:18 [API] Update API starting
01:06:18 [Database] - get_table_as_json - Query: select dev_MAC, dev_Name, dev_D eviceType, dev_Vendor, dev_Group,
dev_FirstConnection, dev_LastConnection, dev_LastIP, dev_St aticIP,
dev_PresentLastScan, dev_LastNotification, dev_NewDevice,
dev_Network_Node_MAC_ADDR, dev_Network_Node_port,
dev_Icon from Devices
01:06:18 [Database] - get_table_as_json - returning 2 rows with columns: ['dev_M AC', 'dev_Name', 'dev_DeviceType', 'dev_Vendor', 'dev_Group', 'dev_FirstConnecti on', 'dev_LastConnection', 'dev_LastIP', 'dev_StaticIP', 'dev_PresentLastScan', 'dev_LastNotification', 'dev_NewDevice', 'dev_Network_Node_MAC_ADDR', 'dev_Netwo rk_Node_port', 'dev_Icon']
01:06:18 [API] Updating table_devices.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Nmap_Scan
01:06:18 [Database] - get_table_as_json - returning 1 rows with columns: ['Index ', 'MAC', 'Port', 'Time', 'State', 'Service', 'Extra']
01:06:18 [API] Updating table_nmap_scan.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Pholus_Scan
01:06:18 [Database] - get_table_as_json - returning 2277 rows with columns: ['In dex', 'Info', 'Time', 'MAC', 'IP_v4_or_v6', 'Record_Type', 'Value', 'Extra']
01:06:18 [API] Updating table_pholus_scan.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Events where eve _PendingAlertEmail is not 0
01:06:18 [Database] - get_table_as_json - returning 0 rows with columns: ['eve_M AC', 'eve_IP', 'eve_DateTime', 'eve_EventType', 'eve_AdditionalInfo', 'eve_Pendi ngAlertEmail', 'eve_PairEventRowid']
01:06:18 [API] Updating table_events_pending_alert.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Settings
01:06:18 [Database] - get_table_as_json - returning 126 rows with columns: ['Cod e_Name', 'Display_Name', 'Description', 'Type', 'Options', 'RegEx', 'Value', 'Gr oup', 'Events']
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Plugins_Events
01:06:18 [Database] - get_table_as_json - returning 0 rows with columns: ['Index ', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateT imeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Valu e4', 'Status', 'Extra', 'UserData', 'ForeignKey']
01:06:18 [API] Updating table_plugins_events.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Plugins_History ORDER BY 'Index' DESC
01:06:18 [Database] - get_table_as_json - returning 12 rows with columns: ['Inde x', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'Date TimeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Val ue4', 'Status', 'Extra', 'UserData', 'ForeignKey']
01:06:18 [API] Updating table_plugins_history.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Plugins_Objects
01:06:18 [Database] - get_table_as_json - returning 3 rows with columns: ['Index ', 'Plugin', 'Object_PrimaryID', 'Object_SecondaryID', 'DateTimeCreated', 'DateT imeChanged', 'Watched_Value1', 'Watched_Value2', 'Watched_Value3', 'Watched_Valu e4', 'Status', 'Extra', 'UserData', 'ForeignKey']
01:06:18 [API] Updating table_plugins_objects.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Plugins_Language _Strings
01:06:18 [Database] - get_table_as_json - returning 132 rows with columns: ['Ind ex', 'Language_Code', 'String_Key', 'String_Value', 'Extra']
01:06:18 [API] Updating table_language_strings.json file in /front/api
01:06:18 [Database] - get_table_as_json - Query: SELECT * FROM Devices WHERE dev PresentLastScan = 0
01:06:18 [Database] - get_table_as_json - returning 0 rows with columns: ['dev_M AC', 'dev_Name', 'dev_Owner', 'dev_DeviceType', 'dev_Vendor', 'dev_Favorite', 'd ev_Group', 'dev_Comments', 'dev_FirstConnection', 'dev_LastConnection', 'dev_Las tIP', 'dev_StaticIP', 'dev_ScanCycle', 'dev_LogEvents', 'dev_AlertEvents', 'dev
AlertDeviceDown', 'dev_SkipRepeated', 'dev_LastNotification', 'dev_PresentLastSc an', 'dev_NewDevice', 'dev_Location', 'dev_Archived', 'dev_Network_Node_MAC_ADDR ', 'dev_Network_Node_port', 'dev_Icon']
01:06:18 [API] Updating table_custom_endpoint.json file in /front/api
01:06:18 [updateState] changing state to: "Process: Start"
01:06:18 [updateState] changing state to: "Run: Plugins"
01:06:18 [Plugins] Check if any plugins need to be executed on run type: schedul e
01:06:18 [Scheduler] - Scheduler run for WEBMON: NO
01:06:18 [updateState] changing state to: "Scan: Internet IP"
01:06:18 [Internet IP] Check Internet IP started
01:06:18 [Internet IP] - Retrieving Internet IP
01:06:18 [Internet IP] IP: 82.xx
01:06:18 [Internet IP] Retrieving previous IP:
01:06:18 [Internet IP] 82.xx
01:06:18 [Internet IP] No changes to perform
01:06:18 [DDNS] Skipping Dynamic DNS update
01:06:18 [updateState] changing state to: "Scan: Pholus"
01:06:18 [PholusScan] Scan: Pholus for 600s (10.0min)
01:06:18 [PholusScan] Pholus scan on [interface] eth0 [mask] 192.168.0.0/24sudo: error in event loop: Operation not permitted
sudo: unexpected child termination condition: 0
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pi/pialert/pialert/main.py", line 314, in
sys.exit(main())
File "/home/pi/pialert/pialert/main.py", line 231, in main
p = multiprocessing.Process(target=scan_network(db))
File "/home/pi/pialert/pialert/networkscan.py", line 43, in scan_network
conf.arpscan_devices = execute_arpscan (conf.userSubnets)
File "/home/pi/pialert/pialert/scanners/arpscan.py", line 18, in execute_arpscan
arpscan_output += execute_arpscan_on_interface (interface)
File "/home/pi/pialert/pialert/scanners/arpscan.py", line 58, in execute_arpscan_on_interface
result = subprocess.check_output (arpscan_args, universal_newlines=True)
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo', 'arp-scan', '--ignoredups', '--retry=6', '192.168.0.0/24', '--interface=eth0']' returned non-zero exit status 1.

01:06:47 [PholusScan] Scan: Pholus SUCCESS
01:06:48 [MAIN] cycle:1
01:06:48 [updateState] changing state to: "Scan: Network"
01:06:48 [Network Scan] Scan Devices:
01:06:48 [Network Scan] arp-scan start
01:06:48 [ARP Scan] - arpscan command: sudo arp-scan --ignoredups --retry=6 ['192.168.0.0/24', '--interface=eth0']

and nothing else

Thank's

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 7, 2023

Thanks a lot!

The error message indicates that the sudo command used in the subprocess.check_output() call returned a non-zero exit status of 1. This typically happens when the sudo command encounters an error or when the user running the script does not have the necessary permissions to execute the command.

Can you verify when in the container, that executing this works fine?

sudo arp-scan --ignoredups --retry=6 192.168.0.0/24 --interface=eth0

Here are a few steps you can take to troubleshoot the issue:

  1. Make sure that the user running the script has the necessary permissions to execute the sudo command. Verify that the user is included in the sudoers file and has the appropriate privileges.

  2. Check if the sudo command itself is functioning correctly. You can try running a simple sudo command, such as sudo ls, to see if it executes without any errors.

  3. execute the following commands on the Raspberry PI host: [BUG] Fatal Python Error: pyinit_main: can't initialize time linuxserver/docker-papermerge#4 (comment)

  4. I also did run sudo apt update && sudo apt upgrade -y and rebooted the Pi.

Can you try to verify / remove the user mapping in your docker compose?

- TZ=Europe/Paris
- HOST_USER_ID=1001
- HOST_USER_GID=1001
- PORT=20211

@Walgo
Copy link
Author

Walgo commented Jul 8, 2023

Hi Jokob,

Thanks for your help !!!

FYI I test with pialert:latest image

Here are a few steps you can take to troubleshoot the issue:

_Make sure that the user running the script has the necessary permissions to execute the sudo command. Verify that the user is included in the sudoers file and has the appropriate privileges._

***** Verification OK !******

Check if the sudo command itself is functioning correctly. You can try running a simple sudo command, such as sudo ls, to see if it executes without any errors.

***** Verification OK !******

execute the following commands on the Raspberry PI host: 

[BUG] Fatal Python Error: pyinit_main: can't initialize time linuxserver/docker-papermerge#4 (comment)

wget ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.4-1+b3_armhf.deb
sudo dpkg -i libseccomp2_2.5.4-1+b3_armhf.deb

************************ Actions done !

I also did run sudo apt update && sudo apt upgrade -y and rebooted the Pi.

************** Actions done ! ****************

*********************** And... I think the winner is ...

Can you try to verify / remove the user mapping in your docker compose?

  • TZ=Europe/Paris
  • HOST_USER_ID=1001
  • HOST_USER_GID=1001
  • PORT=20211

I removed the user mapping HOST_USER_ID=1001 HOST_USER_GID=1001

And all is ok !!

I'm very happy ! I am going to restore the csv to finalise !

Thanks a lot for your help Jokob !

image

@Walgo Walgo closed this as completed Jul 8, 2023
@Walgo
Copy link
Author

Walgo commented Jul 8, 2023

Jokob it's great !

You're the best !
Regards

Walgo / Eric

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 8, 2023

Gload it's working :)

@crispybegs
Copy link

i have this exact same problem. removing the user mapping from the compose file doesn't seem to have fixed it for me at all. i just have the host machine and the router listed.

@jokob-sk
Copy link
Owner

Hey @crispybegs ,

Please try to follow the steps outlined in this post: https://github.com/jokob-sk/Pi.Alert/issues/261#issuecomment-1626350800

Thanks,
j

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.
Projects
None yet
Development

No branches or pull requests

3 participants