This project provides scripts to create and manage ServiceNow tickets from Visual TOM.
To avoid too many isolated tickets, the script checks if a ticket already exists for the object name and is not closed.
If it does, it will create a child ticket with the new information.
If not, it will create a new ticket.
If provided, the script will add the output and error logs as attachments to the ticket.
No Support and No Warranty are provided by Absyss SAS for this project and related material. The use of this project's files is at your own risk.
Absyss SAS assumes no liability for damage caused by the usage of any of the files offered here via this Github repository.
Consultings days can be requested to help for the implementation.
- Visual TOM 7.2.1f or greater (lower versions may work but without log attachment)
- ServiceNow instance with REST API enabled
- Custom field in ServiceNow to store the Visual TOM object name (Jobs, Applications, Agents, etc.)
- Python 3.10 or greater or PowerShell 7.0 or greater
The script can be customized to fit your needs for the ServiceNow fields. You can find the fields in the REST API explorer of your ServiceNow instance (https://YOUR-INSTANCE.service-now.com/now/nav/ui/classic/params/target/%24restapi.do).
You can choose between the PowerShell script or the Python script depending on your environment.
You need to replace FULL_PATH_TO_SCRIPT, BUSINESS_SERVICE, ASSIGNMENT_GROUP, CATEGORY and CALLER_ID by your values.
- Edit the config.ps1 file with your ServiceNow credentials and specific field names
- Create an alarm in Visual TOM to trigger the script (example below for a job to be adapted)
powershell.exe -file FULL_PATH_TO_SCRIPT\ServiceNow_CreateTicket.ps1 -businessService "BUSINESS_SERVICE" -shortDescription "Job {VT_JOB_FULLNAME} has failed" -assignmentGroup "ASSIGNMENT_GROUP" -category "CATEGORY" -callerId "absyss.vtom" -objectName "{VT_JOB_FULLNAME}" -outAttachmentName "{VT_JOB_LOG_OUT_NAME}" -outAttachmentFile "{VT_JOB_LOG_OUT_FILE}" -errorAttachmentName "{VT_JOB_LOG_ERR_NAME}" -errorAttachmentFile "{VT_JOB_LOG_ERR_FILE}"- Edit the config.py file with your ServiceNow credentials and specific field name
- Create an alarm in Visual TOM to trigger the script (example below for a job to be adapted)
python3 FULL_PATH_TO_SCRIPT/ServiceNow_CreateTicket.py --businessService BUSINESS_SERVICE --shortDescription "Job {VT_JOB_FULLNAME} has failed" --assignmentGroup ASSIGNMENT_GROUP --category CATEGORY --callerId "absyss.vtom" --objectName {VT_JOB_FULLNAME} --outAttachmentName {VT_JOB_LOG_OUT_NAME} --outAttachmentFile {VT_JOB_LOG_OUT_FILE} --errorAttachmentName {VT_JOB_LOG_ERR_NAME} --errorAttachmentFile {VT_JOB_LOG_ERR_FILE}This project is licensed under the Apache 2.0 License - see the LICENSE file for details
Absyss SAS has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.