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.

SNMP Service restart

I have an advanced alert set up.. that ideally will restart the snmp.exe on a server when it goes down.

it l have an email generated and execute a program (this is the program to execute:)

 C:\Program Files (x86)\SolarWinds\Orion\APM\APMServiceControl.exe ${ComponentId}

 

Question 1. Is this correct?

Question 2. Does this program issue a start, restart???

Question 3.  IF the service is up will it issue a restart?

What we are seeing in the log is a stop but no starts or restarts...

Am I doing something wrong?

  • Hi John,

    I have this marked for the PM.

    DH

  • Your usage of APMServiceControl.exe is incorrect. You need to include the action as a switch. Below is from the Administrators guide.

     

     

    Usage:

    APMServiceControl ComponentId [-h] [-c=COMMAND-NAME] [-t=TIMEOUT]

    Options:

    ComponentId: The ID of the Windows Service Component Monitor to control.  In the Advanced Alert Engine, you can use the alert variable ${{ComponentId}} to determine this value.

    -c = COMMAND NAME: The command to sent to the service. This must be STARTSTOP, or RESTART.  The default is {0}.
    -t = TIMEOUT: Timeout for the command in seconds.  Default is {1} second.
    -h = This is help text.

    Example:

    From an APM Component Alert Trigger: 
    APMServiceControl ${{ComponentId}} -c=RESTART

    which would look like this:
    APMServiceControl.exe 156849 -c=RESTART

     

    Note: For services to be restarted you must be monitoring the service via WMI or RPC. Monitoring the service state via SNMP is not sufficient since APM requires a valid Windows username & password with administrative privileges to restart the service.  

  • I believe you.. my only question (well right now) is what guide.. when i look in the APM admin guide [see below ] I dont see what you have printed.. I looked in the common components guide and there is less. and when I do follow the APM Guide informaiton In my ADMIN guide I dont even get the right configuration  ( I need the x86  ).

     I try to keep up to date but i am not sure where to look for this information ..  Where did you get the information you posted. I will look there.. and thanks I really appreciate the help.. I may need to redo several of my alerts.

  • I believe you.. my only question (well right now) is what guide.. when i look in the APM admin guide [see below ] I dont see what you have printed.. I looked in the common components guide and there is less. and when I do follow the APM Guide informaiton In my ADMIN guide I dont even get the right configuration  ( I need the x86  ).

     I try to keep up to date but i am not sure where to look for this information ..  Where did you get the information you posted. I will look there.. and thanks I really appreciate the help.. I may need to redo several of my alerts.

  • John, Mr. AlterEgo meant to say the text he found was in a recent KB article, found here.

  • Thank you..

    I hate to ask but is this new .. having to put restart, start, stop as a parameter ?

    And this begs the question... without putting the  APMServiceControl ${{ComponentId}} -c=RESTART  what would happen if you didn't put in the restart.. parameter. ? is there a default?

     

    thanks again

  • The default action is RESTART, but as you can see below it's not possible to restart a stopped service. You can only start it.