Restart Service
Restart Service
I am interested in setting up an alert profile that can be tied to tests that check for services having failed or stopped. Is there a way to create a script to detect which test (and thus, which service) failed and have it try to restart that one, or do I need to make a profile for each service?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You have to create just one profile with "Restart Service" action and specify variable %ServiceComp% into the "Computer name" box and %ServiceName% into the "Service Name" box of the "Action Properties" window of the "Restart Service" action.
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... actService
========================
Computer name
Provide the name of the target system (the target computer name must be prefixed by "\\") or select the "<local computer>" item to restart the service on a local machine. You may use the "Browse network" button to select a computer from the list. Also you can use macro variables (e.g. %ServiceComp%, %ServiceName%) in this field.
Service name
Name of the service to restart. You may select the service from the drop-down list. You can use macro variables in this field as well.
========================
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
========================
following variables have sense for "Service" test only, for other tests these macros return an empty string
%ServiceComp% The name of the target computer
%ServiceName% The name of the service
========================
Regards,
Max
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... actService
========================
Computer name
Provide the name of the target system (the target computer name must be prefixed by "\\") or select the "<local computer>" item to restart the service on a local machine. You may use the "Browse network" button to select a computer from the list. Also you can use macro variables (e.g. %ServiceComp%, %ServiceName%) in this field.
Service name
Name of the service to restart. You may select the service from the drop-down list. You can use macro variables in this field as well.
========================
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
========================
following variables have sense for "Service" test only, for other tests these macros return an empty string
%ServiceComp% The name of the target computer
%ServiceName% The name of the service
========================
Regards,
Max