Skip to main content

Online Status Alerting - Autofix - Update Ticket + Email EDF

Summary

This script will run as an auto-fix for the Online Status Alerting - Machine Back Online and Online Status Alerting - Machine Restarted monitor sets. It uses the system properties Email_Connector_email_Address and Status_To_Change_To for the email connector's email address and the ticket status to which the client wants to change.

The script changes the status of the ticket if the EDF "Online Alert Ticket ID" at the computer level is filled with a Ticket ID, or if the Email ID is filled in the EDF "Online Alert E-mail." It will change the status along with a message. Users can also provide a reason for the notification by filling in the reason in the EDF "Online Alert Reason."

Additionally, filling out the "Online Alert Scripts" will run a list of scripts after the machine comes back online.

Sample Run

The script is designed to run from the Online Status Alerting - Machine Back Online and Online Status Alerting - Machine Restarted monitor sets only and should not be executed manually against any machine, except for the first time to set the environment.

After importing the script, it should either be debugged or run against any computer in the environment with 1 in the user parameter SetEnvironment, along with the other user parameters Email_Connector_email_Address and Status_To_Change_To.

NOTE: The user parameters Email_Connector_email_Address and Status_To_Change_To are required to be filled only by running the script for the first time after importing it. This sets the system properties on its first run.

Image

Dependencies

System Properties

  • Status_To_Change_To: The ticket status the client wants to change to.
  • Email_Connector_email_Address: The email address of the email connector.

User Parameters

Parameter NameExampleRequiredDescription
SetEnvironment1True for first run onlySet it to 1 for the first run after importing the script. This will create the System Properties needed for the solution.
Email_Connector_email_Addressabc@xyz.comTrue for first run onlyThe email address of the email connector. This will help link the email system with ticketing. THIS SHOULD BE USED ONLY WITH SetEnvironment = 1.
Status_To_Change_ToRequeuedTrue for first run onlyThe ticket status the client wants to change to. THIS SHOULD BE USED ONLY WITH SetEnvironment = 1.

Variables

NameDescription
SubjectEmail Subject
BodyEmail Content
TicketIDTicket ID specified in the Computer EDF "Online Alert Ticket ID" for which the user wants to change the status in Manage.
ReasonReason specified in the Computer EDF "Online Alert Reason"
EmailEmail ID of the recipient who wants to be notified via email if the machine comes back online.
ScriptIDsThe scripts to run against the machine after it comes back online.
Email_Connector_email_AddressThe email address of the email connector.
Status_To_Change_ToThe ticket status the client wants to change to.

Script States

StateExampleRequiredDescription
Restarted_Machine_Notification_Uptime4846TrueStores the current uptime of the computer for the machines with the Online Alert Restarted Machine flag set.

Output

  • Email
  • Ticket status change to the desired status as per configuration done in the system property "Status_To_Change_To."