Skip to content

TheLastJediCoder/AutoBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoBot

This script will fetch the ServiceNow 'New' Incidents for specific assignment queue.
  1. It will keep them In-Progress.
  2. Check the descriptions of each incident and create parallel process for each type of issue.
  3. If Multiple Incidents for same issue it will create parent child reletionship.
  4. or If active incident found then resolve child Incidents by giving parent reference.
  5. It will check Active Incident track in start of the run and update the file if in resolved state.
  6. There are 5 types of issue resolved autmatically for windows servers
   1. Availability
   2. CPU Utilisation beyond threshold
   3. Memory Utilisation beyond threshold
   4. Diskspace Utilisation beyond threshold
   5. Service stopped
It will check current status of the server for respective issue.
If false alarm found it will resolve the incident with an appropriate Work-Note and Resolution Note.
For genuine alarm it will try to reslove, for example start the service remotely for perticular server,
Delete temp {Specified folders} for disk space issue,
Kill unncessary processes {Specified processes} if running, etc
If able to resolve then close the Incident with specific WorkNote,
Else if unable to resolve then transfer it to second level group.

Prerequisites

Windows OS - Powershell
ServiceNow - Instance Access with API
Run on Terminal Server - from which infrstructure remotely accessible

Note

This will execute the script and if scheduled in interval of 5 minutes than entire L0 and L1 task will be automated for ITIL.

Use

Open Powershell
run "C:\driver.ps1"

Input

Place folders in proper folder.
Please set varibles like below and as and when guided by comment through code for each file.
Set log file path (example) {$logfile = "C:\Test\Logs\txtlog.txt"}
Set your servicenow Instance (example) {$Instance="InstanceName"}
Set your servicenow Instance in uri also in place of 'InstanceName'(example) {
  $uri = "https://InstanceName/api/now/table/incident/"+$SysId+""}
Set your UserName and Password for SNOW Instance (example) {
  $user = "UserName"
  $pass = "Password"}
Set 1st level assignment group Name which work need to be automated (example) {$AssignGroup="AssignmentgroupName"}
Set BOT sysId for assigned to (example) {
  "assigned_to":"fd318a1bdb0a90508XXXXXXXX",}
Set 2nd level assignment group ID {As per your SNOW Instance} to which incident needs to be forwarded if need further intervention (example) {
  "assignment_group":"XXXXXXX",}
Set path of the Incident Track (example) {
  $csvfile = "C:\Documents\Inc_Track.csv"}

Example O/P

Run the Script and watch the magic of BOT.

😉

License

Copyright 2020 Harsh & Sahista

Contribution

[Harsh Parecha] (https://github.com/TheLastJediCoder)
[Sahista Patel] (https://github.com/Sahista-Patel)
We love contributions, please comment to contribute!

Code of Conduct

Contributors have adopted the Covenant as its Code of Conduct. Please understand copyright and what actions will not be abided.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%