Missing Patch Tickets
Summary
This monitor will trigger a script to resolve any new or existing tickets generated by the Missing Patches detection solution. The script will only be initiated on machines that have three or fewer missing patches.
Dependencies
Auto Close - Missing Patch Tickets Autofix
Target
Global
Alert Template
Name: △ CUSTOM - Auto Close - Missing Patch Tickets
SQL Insert Query:
INSERT INTO `alerttemplate` (
`Name`, `Comment`, `Last_User`, `Last_Date`,
`GUID`
)
SELECT
'△ CUSTOM - Auto Close - Missing Patch Tickets' AS `Name`,
'△ CUSTOM - Auto Close - Missing Patch Tickets' AS `Comment`,
'PRONOC' AS `Last_User`,
(NOW()) AS `Last_Date`,
'40e61fa3-7efa-4efe-a8ae-76fe95604efa' AS `GUID`
WHERE
(
SELECT
COUNT(*)
FROM
alerttemplate
WHERE
GUID = '40e61fa3-7efa-4efe-a8ae-76fe95604efa'
) = '0';
INSERT INTO `alerttemplates` (
`AlertActionID`, `DayOfWeek`, `TimeStart`,
`TimeEnd`, `AlertAction`, `ContactID`,
`UserID`, `ScriptID`, `Trump`, `GUID`,
`WarningAction`
)
SELECT
(
SELECT
alertactionid
FROM
alerttemplate
WHERE
`GUID` = '40e61fa3-7efa-4efe-a8ae-76fe95604efa'
) AS `AlertActionid`,
'127' AS `DayOfWeek`,
'00:00:00' AS `TimeStart`,
'23:59:00' AS `TimeEnd`,
'512' AS `AlertAction`,
'-2' AS `ContactID`,
'0' AS `UserID`,
(
SELECT
Scriptid
FROM
lt_scripts
WHERE
scriptGUID = 'c9164787-d570-11ed-bf6a-000c295e5f21'
) AS `Scriptid`,
'0' AS `Trump`,
'2f6e8c31-b4fb-4ede-b20f-5f5ea75951db' AS `GUID`,
'512' AS `WarningAction`
WHERE
(
SELECT
COUNT(*)
FROM
alerttemplates
WHERE
GUID = '2f6e8c31-b4fb-4ede-b20f-5f5ea75951db'
) = '0';
Note: Ensure that the Auto Close - Missing Patch Tickets Autofix script is imported before creating the alert template.