SiteScope ServiceNow Integration

quad_lima
Kilo Contributor

How it works:

The SiteScope SNOW Integration works by SiteScope generating an alert for each monitor that runs in error that is selected within the "SNOW Build Ticket" alert. This alert then runs the "SiS_GetInc.vbe" script which pushes the monitor information into the SITESCOPE_EVENTS database and sets the [ProcessStatus] to "Alerted". A service running on the SNOW Mid-Tier server checks for the [ProcessStatus] = "Alerted" state and when it finds it, it pushes the information into SNOW, creating and incident, pulls back the Incident number, and then updates the SITESCOPE_EVENTS database with the incident number and sets the   [ProcessStatus] to "Created". A service running on the SiteScope server checks the database for the Created sate and when it finds it, it then pushes the incident number into SiteScope and acknowledges the Monitor with ***INCxxxxxx created in SNOW***. This service also checks for the state "Alerted and if it finds this state it adds 1 to the [ProcessCount]. This is monitored by the "Alerted Count Query" monitor to signify how many seconds the event has been in the database without being processed to generate an incident.


The components of the integration:

  • "SNOW Build Ticket" Alert Is generated the first time each monitor runs in error
    • The alert writes the monitor details to the SITESCOPE_EVENTS Database
    • The alert runs the SiS_GetInc.vbe script
  • "SiteScope SNOW Integration" Runs on SNOW Mid-Tier sever
    • This service reads the database every second looking for [ProcessStatus] = "Alerted"
      • If found if pushes monitor information into SNOW generates an incident, and updates the database with Incident number and changes the [ProcessStatus] to "Created"
    • This service runs "SNOWBuildTicket.vbs"
  • "SiteScope SNOW Integration AckAlert" Runs on SiteScope sever
    • This service reads the database looking for [ProcessStatus] ="Created"
      • If found it pushes ***INCxxxxxx created in SNOW*** into SiteScope via web service, acknowledging the monitor.
    • This service also reads the database looking for [ProcessStatus] = "Alerted"
      • If found it adds 1 to ProcessCount signifying that for each addition it has been a half second since the alert triggered before and Incident is created
    • This service runs "SiS_AckAlert.vbs"


  The following processes validate the service is running properly:  

  • Monitor name:   "Alerted Count Query"
    • This monitor Checks DB [ProcessCount] for a value > 30. This signifies that an alert triggered and written to the DB   but has not been sent to SNOW to create an incident in over 15 seconds
    • If Count > 30 then SiteScope The following alerts are triggered
      1. Restarts the service "SiteScope SNOW Integration" on the SNOW server
        • Once after condition has occurred exactly one time
        • This alert triggers "restart_SNOW_buildInc.exe"
      2. Emails Enterprise Monitoring Escalation Group
        • Initially, after 2 times(5 minutes) , and repeat every 6 times(15 minutes)

   

  • Monitor name:   Created Query
    • This monitor checks the SITESCOPE_EVENTS Database for   [ProcessStatus] = Created. This signifies an incident has been generated and written back to the DB but the SiteScope monitor has not been acknowledged.
    • If rows >= 2 for query [ProcessStatus] = Created the following alerts are generated
      1. Restarts the "SiteScope SNOW Integration" service on SiteScope server.
        • Once after condition has occurred exactly 2 times.
        • This alert triggers "restart_SNOW_Ack.exe"
      2. Email Enterprise Monitoring Escalation Group
        • Initially, after 4 times(10minutes) , and repeat every 6 times(15 minutes)

   

  • The following alert and service ensure that SiteScope is generating alerts.
    • The SiteScope monitor, "SNOW Validation loop", runs every 2 minutes and checks the file age of "Validation\Validation.txt"
      • This monitor runs in error if File age >= 3 minutes and triggers a script alert that writes a timestamp to "Validation\Validation.txt"
      • This creates a constant loop of updating this file every 4-5 minutes.
    • The "SiteScope SNOW Integration Validation" service runs in a loop every minute and checks the age of the file.
      • If file age   > 6 and the current time is not between 0500 and 0515 (SiteScope service daily restart) am then the service sends an email
        • Initially, after 1 times, and repeat every 10 times
      • This service runs "Validation\fileAge.vbs"

Scripts

  • SiteScope server:
    • SiS_GetInc.vbe — Writes alert info to DB
    • SiS_AckAlert.vbs — Acknowledges Monitor after incident is created with incident number via web service call.
    • restart_SNOW_Ack.exe — Restarts SiS_AckAlert.vbs
    • restart_SNOW_buildInc.exe — Restarts SNOWBuildTicket.vbs
    • Validation\fileAge.vbs — Used to verify SitesScope is capable of generating alerts.
  • SNOW server:
    • SNOWBuildTicket.vbs — Send information to ServiceNow via web service call and creates incident.

SiteScope_SNOW_Integration.jpg

7 REPLIES 7

Hi Brent,

I am trying to achieve the above integration but I need to have the scripts. Can you please share the scripts ,where we need to pleace these scripts and step by step document to perform this inegration.

 

Thanks & Regards,

Abby

Akiiki
Kilo Explorer

Do you have a Copy of these Script..  Do you mind Sharing them.

  • SiteScope server:
    • SiS_GetInc.vbe — Writes alert info to DB
    • SiS_AckAlert.vbs — Acknowledges Monitor after incident is created with incident number via web service call.
    • restart_SNOW_Ack.exe — Restarts SiS_AckAlert.vbs
    • restart_SNOW_buildInc.exe — Restarts SNOWBuildTicket.vbs
    • Validation\fileAge.vbs — Used to verify SitesScope is capable of generating alerts.
  • SNOW server:
    • SNOWBuildTicket.vbs — Send information to ServiceNow via web service call and creates incident.

 

Thanks

Akiiki

 

Brent Llewellyn
Mega Guru

Marking this as a correct answer due to this being more of a post than a question.