Home > CentOS, Windows Server, Zabbix > Zabbix Action to Start a Windows Service

Zabbix Action to Start a Windows Service

Using zabbix to restrart a service, when it unexpectedly stopped running

  1. Create a template for the custom service.
  2. Use the trigger to monitor the service and report the problem
  3. In the Zabbix Agent config allow remote commands
  4. Create an action to start the service

Create an action to start the service:

  • Click on Configuration > Actions > click Create action (top right corner) > Enter Action name and leave rest as default
  • Click on Conditions tab > Leave condition label (A) > remove any other conditions 
  • Conditions tab > add a new Trigger condition (Like so: Trigger = select the trigger created for the service (by clicking select)) > click Add to add the new condition
  • Click on Operations tab > Change Operation type to “Remote command” > Enter new Target as current host > Type equals ‘Custom script’ > Execute equals ‘Zabbix agent’ >  enter Command “sc \\{HOST.NAME} start ServiceName” > click Add to add the new reactive action and save the configuration
    To test this, turn of the service and wait for a few seconds to see if it has been started.

-Eric

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: