Creating action plan for auto start stopped services

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Sainyam
Posts: 37
Joined: Fri Aug 12, 2011 12:31 am

Creating action plan for auto start stopped services

Post by Sainyam »

Hi Support,

I would like to create an auto start service plan, if any service stopped event occurs, then host monitor agent start that.

Basically i am monitoring few Exchange Services and SQL services, I would like to create a action plan if host monitor detect service in stop state, then it should auto restart it.

I tried to create a action for that, but it looks I have to create action plan for each service and each agent separately.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Single action is enough - just use variable instead of static service name (e.g. %Reply% or %ServiceName% if you are using Service test method).
Please check the manual
http://ks-soft.net/hostmon.eng/mframe.h ... .htm#macro

What test method do you plan to use?
- Service test method? Then you need separate test item for each service.
- WMI test? Then you may use single test item and query like
Select name from Win32_Service where (started="False") and (StartMode="Auto")
- custom made shell script?

Regards
Alex
Sainyam
Posts: 37
Joined: Fri Aug 12, 2011 12:31 am

Post by Sainyam »

HI Alex,

Thanks for the reply.
Currently i am using separate test for each service as of now.
https://b.reefsolutions.com:8443/temp/?u=gUSH&p=2n0A

I am using this action plan, so that whenever this service stop i get alert.
This plan is common for all services test.
https://b.reefsolutions.com:8443/temp/?u=fjtu&p=MP5B

But now i want along with getting alerts, HM start the service as well.

If it require to create a WMIC query for service test I am ok for this. But I still not understand how I can create global action plan to start the service whenever any service test failed..
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Currently i am using separate test for each service as of now.
https://b.reefsolutions.com:8443/temp/?u=gUSH&p=2n0A
Your screenshot shows several NT Event log tests, two Service tests, 3 Drive Space and one Ping test.
I assume we are talking about Service test now?

1. For all "Service" tests, you may assign single action (Start service or Restart service action) and specify the following action settings:
Restart Service on: %ServiceComp%
Service name: %ServiceName%
HostMonitor will resolve these variables according to Service test that has triggered the action.

2. If you will use WMI test, you can't use %ServiceComp% and %ServiceName% variables for the action.
You need to use some variables that can be resolved by WMI test.
E.g.
WMI test with WQL query:
Select name from Win32_Service where (started="False") and (StartMode="Auto")

Restart action profile settings can be the following:
Restart Service on: \\%HostAddr%
Service name: %Reply%
Post Reply