Folks,
I was wondering about this. I would want to restart a windows service when Percent Memory Used is greater than 90 %. Is this possible?
I have tried to use APMServiceControl but it does not execute it.
Thanks!
Could you pass on the syntax or command you used to restart the same ? What kind of alert have you set up ? APM Component alert ?
Hi Vinay,
APM\APMServiceControl.exe <ServiceName> -c=RESTART
I know from some documentation that the servicename should be the ${ComponentId} but i was wondering if it will be possible to use the <service name> instead of the ${ComponentId}? Or is there a way to call a batch file instead?
The component ID is required because SAM needs the credentials used to monitor that component to restart the service. The Component ID can be a macro as the OOTB alert uses to restart failed services, but it can also be entered manually to restart a specific service on a particular node when the trigger condition is met.
May I ask if the ComponentID is the same for all node? For Example, i have the same service name in 2 server for example vmtools, the component id for vmtools are the same for servers?
I think i found a solution. I'll test it tonight.
The Component ID is globally unique. E.G. unique for each component monitored by the system. That means per-server, per-application, per-component. The Component ID can be seen in your browser when you're on the "Component Details" view. The Component ID is the number following "AM:" as shown in the following screenshot.
How exactly are you getting there?
The closest I seem to get is getting an AA in Applicationdetails.
You need to click into an individual component (process, service, etc.) from the Application Details view to be taken the "Component Details" view.