Fix down alerts and improve txt template
This commit is contained in:
@@ -1184,6 +1184,11 @@ def email_reporting ():
|
|||||||
(
|
(
|
||||||
SELECT dev_MAC FROM Devices WHERE dev_AlertEvents = 0
|
SELECT dev_MAC FROM Devices WHERE dev_AlertEvents = 0
|
||||||
)""")
|
)""")
|
||||||
|
sql.execute ("""UPDATE Events SET eve_PendingAlertEmail = 0
|
||||||
|
WHERE eve_PendingAlertEmail = 1 AND eve_EventType = 'Device Down' AND eve_MAC IN
|
||||||
|
(
|
||||||
|
SELECT dev_MAC FROM Devices WHERE dev_AlertDeviceDown = 0
|
||||||
|
)""")
|
||||||
|
|
||||||
# Open text Template
|
# Open text Template
|
||||||
template_file = open(PIALERT_BACK_PATH + '/report_template.txt', 'r')
|
template_file = open(PIALERT_BACK_PATH + '/report_template.txt', 'r')
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
Report Date: <REPORT_DATE>
|
Report Date: <REPORT_DATE>
|
||||||
Scan Cycle: <SCAN_CYCLE>
|
|
||||||
Server: <SERVER_NAME>
|
Server: <SERVER_NAME>
|
||||||
|
<SECTION_NEW_DEVICES>
|
||||||
<SECTION_INTERNET>
|
|
||||||
Internet
|
|
||||||
----------------------
|
|
||||||
<TABLE_INTERNET>
|
|
||||||
</SECTION_INTERNET><SECTION_NEW_DEVICES>
|
|
||||||
New Devices
|
New Devices
|
||||||
----------------------
|
----------------------
|
||||||
<TABLE_NEW_DEVICES>
|
<TABLE_NEW_DEVICES>
|
||||||
@@ -18,4 +12,8 @@ Devices Down
|
|||||||
Events
|
Events
|
||||||
----------------------
|
----------------------
|
||||||
<TABLE_EVENTS>
|
<TABLE_EVENTS>
|
||||||
</SECTION_EVENTS>
|
</SECTION_EVENTS><SECTION_INTERNET>
|
||||||
|
Internet
|
||||||
|
----------------------
|
||||||
|
<TABLE_INTERNET>
|
||||||
|
</SECTION_INTERNET>
|
||||||
Reference in New Issue
Block a user