mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Merge branch 'main' of https://github.com/jokob-sk/Pi.Alert
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device Vendor</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
@@ -54,6 +55,7 @@
|
||||
<td>New Device</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
@@ -62,6 +64,7 @@
|
||||
<td>New Device</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -83,6 +86,7 @@
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device Vendor</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
"IP": "192.168.1.1",
|
||||
"Event Type": "New Device",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null
|
||||
"Comments": null,
|
||||
"Device Vendor": null
|
||||
}],
|
||||
"down_devices": [],
|
||||
"events": [{
|
||||
@@ -33,14 +34,16 @@
|
||||
"IP": "192.168.1.92",
|
||||
"Event Type": "Disconnected",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null
|
||||
"Comments": null,
|
||||
"Device Vendor": null
|
||||
}, {
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Datetime": "2023-01-30 22:15:09",
|
||||
"IP": "192.168.1.150",
|
||||
"Event Type": "Disconnected",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null
|
||||
"Comments": null,
|
||||
"Device Vendor": null
|
||||
}],
|
||||
"ports": [{
|
||||
"new": {
|
||||
|
||||
@@ -184,7 +184,8 @@ def send_notifications (db):
|
||||
|
||||
if 'new_devices' in conf.INCLUDED_SECTIONS :
|
||||
# Compose New Devices Section
|
||||
sqlQuery = """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
|
||||
sqlQuery = """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, dev_Vendor as "Device Vendor"
|
||||
FROM Events_Devices
|
||||
WHERE eve_PendingAlertEmail = 1
|
||||
AND eve_EventType = 'New Device'
|
||||
ORDER BY eve_DateTime"""
|
||||
@@ -200,7 +201,8 @@ def send_notifications (db):
|
||||
|
||||
if 'down_devices' in conf.INCLUDED_SECTIONS :
|
||||
# Compose Devices Down Section
|
||||
sqlQuery = """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
|
||||
sqlQuery = """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, dev_Vendor as "Device Vendor"
|
||||
FROM Events_Devices
|
||||
WHERE eve_PendingAlertEmail = 1
|
||||
AND eve_EventType = 'Device Down'
|
||||
ORDER BY eve_DateTime"""
|
||||
@@ -216,7 +218,8 @@ def send_notifications (db):
|
||||
|
||||
if 'events' in conf.INCLUDED_SECTIONS :
|
||||
# Compose Events Section
|
||||
sqlQuery = """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
|
||||
sqlQuery = """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, dev_Vendor as "Device Vendor"
|
||||
FROM Events_Devices
|
||||
WHERE eve_PendingAlertEmail = 1
|
||||
AND eve_EventType IN ('Connected','Disconnected',
|
||||
'IP Changed')
|
||||
|
||||
Reference in New Issue
Block a user