New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How can I run a script based on the state of a business process sensor

Votes:

0

Your Vote:

Up

Down

I have a server that runs 11 services that all need to be up as a whole, but when down, they need to be started in a particular order. Because of this particular order, they are set to manual, but that means that after a maintenance reboot at night, all services need to be started in the correct order after the restart. For the correct order, we have a CMD file that I would like PRTG to run (not the server itself) whenever the Business Process sensor I created shows that there are more than one services down. I don't want the service monitor sensors restart the services individually, because of the required order and I don't want the command file executed if only one service is down. How can I make this possible?

business-process-sensor execute-program order script wmi-service

Created on Oct 30, 2017 11:19:18 AM by  ahoppe (40) 1



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Go to Setup -> Account Settings -> Notifications.

You'll need to create a new notification that does the Execute a Program action.

Once you have that notification created, we need to bind it to a trigger.

Go to the Business Process Sensor, click on Notifications, Add a new State Trigger, put in the time limits you want, select the Notification you created in the drop down, and click save.

Check out this video we have on Notifications.

https://www.paessler.com/support/videos/prtg-basics/notifications

Created on Oct 31, 2017 8:34:38 PM by  Benjamin Day [Paessler Support]



3 Replies

Votes:

0

Your Vote:

Up

Down

When you create the WMI Service sensor, you can set the settings to do nothing if the service stops running.

Then for the Business Process sensor, please see this kb article for how the status is calculated.

https://kb.paessler.com/en/topic/66647-how-does-the-business-process-sensor-calculate-summarized-sensor-states

Created on Oct 31, 2017 12:09:01 AM by  Benjamin Day [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I got that Business Sensor covered already to my liking, but when it turns to Red, how can I make PRTG execute that script?

Created on Oct 31, 2017 9:31:12 AM by  ahoppe (40) 1



Accepted Answer

Votes:

0

Your Vote:

Up

Down

Go to Setup -> Account Settings -> Notifications.

You'll need to create a new notification that does the Execute a Program action.

Once you have that notification created, we need to bind it to a trigger.

Go to the Business Process Sensor, click on Notifications, Add a new State Trigger, put in the time limits you want, select the Notification you created in the drop down, and click save.

Check out this video we have on Notifications.

https://www.paessler.com/support/videos/prtg-basics/notifications

Created on Oct 31, 2017 8:34:38 PM by  Benjamin Day [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.