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 ?



Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created..

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

Post New Answer

More Shell Script Interview Questions

What is .sh file in mac?

1 Answers  


What is an inode block?

1 Answers  


Why is the use of shell script?

1 Answers  


Is SSO and SSL support BOXI?

2 Answers  


How will you connect to a database server from linux?

1 Answers  


Why we are writting shell scripts? Plz if possible explain it briefly.

6 Answers   ITC Infotech,


How to print some text on to the screen?

2 Answers  


What are the disadvantages of shell scripting?

1 Answers  


What is the difference between grep and egrep?

1 Answers  


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

1 Answers  


Is shell scripting useful?

1 Answers  


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

1 Answers  


Categories