This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Restarting a service when stopped and monitored not working

Hi everybody

I am very new Solarwinds and just today been trying to monitor a Windows Service and create an alert to restart it if stopped. It wont work.

So I just got off the phone to a SoalrWinds technician who was very good at answering any questions I had, but we were both unable to get this to work.

Enviroment:

Windows Server 2008 R2 Servers

2003 AD Domain

Latest SAM

Server names: VMEV01 + VMSOLAR01

So on VMEV01 there is a local admin account called evadmin who is local admin. and using this account to monitor the VM and the services works a treat.

ISSUE:

An alert that triggers when a monitored service is stopped wont start the service again. This is the command APM\APMServiceControl.exe ${ComponentId}. Looking in the backend database the SolarWinds engineered showed me that the command ran successfully, but for some reason the service on the server did not start. It is worth mentioning that his alert and my alert was 100% identical.

Any ideas? attached some screenshots

attachments.zip
  • This section from the SAM Admin Guide should help. Hope this helps! emoticons_happy.png

  • Hi guys,

    not at work, so cant check the comments out. But if this is correct then the info says to replave${ComponentId} with the id of a component... surely that can be a lot of hazzle if you have many servers and many services you want to monitor and restart?

    Also the admin guide actually show:

    Example Alert Manager Trigger Action to Restart a Windows Service

    Execute program: APMServiceControl.exe ${ComponentId}

    Another thing to say is that the SolarWinds Engineer did actually show his lab and he only used APMServiceControl.exe ${ComponentId}

    Thx for the replies though,,,,, emoticons_happy.png

  • Is the service in question monitored with WMI or RPC?  SNMP will not work.  Also from what I can tell you must specify an action -c=RESTART

  • The out of the box "Restart a service" alert should work without alteration or modification. I just tested it in my lab and it worked perfectly. I would try running the APMServiceControl.exe from the Orion server with the componentID of a service that is running and try to stop it using the "-c=STOP" command line argument.

  • Hi Mike,

    It is WMI and RPC. Do you know what requirements needs to be met for this to work? as in remote registry service needs to be running and remote administration? If i remember correctly that is not on by default on Windows Vista, Windows 7, Server 2008 and Server 2008 R2

    Cheers

  • Will try this when i get in to work on Monday emoticons_happy.png

  • aLTeREgo>

    Ran the command you recommended, except i tried to restart and not stop. got following. Any ideas?

    C:\Program Files (x86)\SolarWinds\Orion\APM>APMServiceControl.exe 17 -c=RESTART

    Server & Application Monitor Service Control

    Connecting to localhost:17777

    ERROR:  [Error      ] - ControlService failed, check fault information.

    C:\Program Files (x86)\SolarWinds\Orion\APM>

    the 17 i get from this URL when looking at the WIndows audio service i am monitoring as test http://vmsolar01/Orion/APM/ApplicationDetails.aspx?NetObject=AA:17

    Source and Target server has currently no AV or FW running.

    Any ideas?

  • So i managed to find the correct CID for my Windows audio service. god bless the log files emoticons_happy.png

    On the node itself i set my domain admin credentials, and it seemed to only work after i changed the credentials on the component monitor from (inherit from node) to a local admin (non domain admin account)

    Did i miss something from prereqs saying not to use a domain admin account?

    Will test tomorrow, the system i could not get to work when starting this thread.

    Ronnie

  • I'm sure looking back it seems like a cruel joke telling you to use the component ID number without giving you a simple and easy method of determining what that number might be. emoticons_happy.png

    In the screenshot below the highlighted number next to "AM:" is the component ID number. "AM" in this case stands for Application Monitor.

    Component ID.jpg

    As for local vs domain credentials, this is normally dependent on group policy permissions. If it's failing to restart the service using domain credentials you should see something in the event viewer of the remotely monitored host denoting that access was denied for some reason.