What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

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

Votes:

0

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



Best Answer

Accepted Answer

Votes:

0

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] (1,441) 2 1



3 Replies

Votes:

0

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] (1,441) 2 1



Votes:

0

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



Accepted Answer

Votes:

0

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] (1,441) 2 1




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.