...
Here is what the Recovery Script looks like:
Code Block |
---|
@ECHO OFF
agentcmd.exe -s -p 9998 %UPTIME_HOSTNAME% svc_start \"%UPTIME_SERVICENAME%\" Changeme2 |
Some items to note:
- %UPTIME_HOSTNAME% is the name of the system raising the Alert, also the system where the Windows Service will be restarted.
- %UPTIME_SERVICENAME% is the name of the Service Monitor we created earlier. Note that this is why we needed the Service Monitor name to match the Windows Service Display Name.
- The \” may look strange, this ensures the whole Windows Service name gets included regardless of spaces.
- Changeme2 is the up.time Agent Password in this environment, your environment will differ.
...