cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 10

SNMP Service restart

Jump to solution

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?

1 Solution
Product Manager
Product Manager

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.  

View solution in original post

0 Kudos
9 Replies
Product Manager
Product Manager

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.  

View solution in original post

0 Kudos

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.

0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

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.

0 Kudos
Level 10

Any input on this?

0 Kudos

Hi John,

I have this marked for the PM.

DH

0 Kudos

I do this with one of the sysinternal products called psexec

 

http://technet.microsoft.com/en-us/sysinternals/bb897553

0 Kudos