Set up a Sev 2 alert when the Primary WA service fails. A
windows batch script needs to be created that will monitor
the WA service on the Primary and when the service
stops/fails a Sev 2 TT is generated for a particular team ?
Answer / Pranav Kumar Ojha
To set up a Sev 2 alert when the Primary WA service fails, you can create a Windows batch script that uses the 'net' command to check the status of the service and sends an email notification if it stops or fails. Here is a basic example:nn```batchn@echo offnsetlocal enabledelayedexpansionnset SERVICE=Primary WAnset EMAIL=team@example.comnfor /f "skip=1" %%a in ('net start ^| findstr /c:"Started" ^| findstr /v /c:": %SERVICE:>"') do (if "!%%a:~2,3!" == " 800" (echo The Primary WA service has started. > nul) else (echo The Primary WA service has failed. Sending Sev 2 alert. > nul & net send %EMAIL% Sev 2 Alert: Primary WA Service Failure))n```nThis script checks the status of the Primary WA service, and if it fails, it sends a Sev 2 email notification to the specified team.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is .sh file in mac?
What is an inode block?
Why is the use of shell script?
Is SSO and SSL support BOXI?
How will you connect to a database server from linux?
Why we are writting shell scripts? Plz if possible explain it briefly.
How to print some text on to the screen?
What are the disadvantages of shell scripting?
What is the difference between grep and egrep?
Determine the output of the following command: [ -z “” ] && echo 0 || echo 1
Is shell scripting useful?
What is a shell? · Types of shell · what is shell scripting?