mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Completing the graph extension
Known issues: - some small translations are not yet completed in gaph extension - some small translations are not yet completed in entire frontend Modification within the fork: - enforce only one scancycle (crontab and frontend) - if not already done, then sqlite3 must be installed - DB must be patched via install/pialert_patch_DB.sh, otherwise the scan will run into an error
This commit is contained in:
@@ -456,7 +456,7 @@ def execute_arpscan (pRetries):
|
||||
# arp-scan for larger Networks like /16
|
||||
# otherwise the system starts multiple processes. the 15min cronjob isn't necessary.
|
||||
# the scan is about 4min on a /16 network
|
||||
arpscan_args = ['sudo', 'arp-scan', '--ignoredups', '--bandwidth=512k', '--retry=3', SCAN_SUBNETS]
|
||||
arpscan_args = ['sudo', 'arp-scan', '--ignoredups', '--bandwidth=512k', '--retry=2', SCAN_SUBNETS]
|
||||
|
||||
# Default arp-scan
|
||||
# arpscan_args = ['sudo', 'arp-scan', SCAN_SUBNETS, '--ignoredups', '--retry=' + str(pRetries)]
|
||||
@@ -701,12 +701,15 @@ def print_scan_stats ():
|
||||
sql.execute("SELECT * FROM Devices")
|
||||
History_All = sql.fetchall()
|
||||
History_All_Devices = len(History_All)
|
||||
sql.execute("SELECT * FROM Devices WHERE dev_Archived = 1")
|
||||
History_Archived = sql.fetchall()
|
||||
History_Archived_Devices = len(History_Archived)
|
||||
sql.execute("SELECT * FROM CurrentScan")
|
||||
History_Online = sql.fetchall()
|
||||
History_Online_Devices = len(History_Online)
|
||||
History_Offline_Devices = History_All_Devices - History_Online_Devices
|
||||
sql.execute ("INSERT INTO Online_History (Scan_Date, Online_Devices, Down_Devices, All_Devices) "+
|
||||
"VALUES ( ?, ?, ?, ?)", (startTime, History_Online_Devices, History_Offline_Devices, History_All_Devices ) )
|
||||
History_Offline_Devices = History_All_Devices - History_Archived_Devices - History_Online_Devices
|
||||
sql.execute ("INSERT INTO Online_History (Scan_Date, Online_Devices, Down_Devices, All_Devices, Archived_Devices) "+
|
||||
"VALUES ( ?, ?, ?, ?, ?)", (startTime, History_Online_Devices, History_Offline_Devices, History_All_Devices, History_Archived_Devices ) )
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def create_new_devices ():
|
||||
|
||||
Reference in New Issue
Block a user