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 remote script/program at state change

Votes:

0

Hi there,

I would like to know if it is at all possible to run a script/program on a remote host when a state of a monitored device/service changes to a warning?

Basically we want to run a simple batch file on a remote client server that restarts certain services when the CPU usage of the specified server has been sitting at 80% or more for 1 minute.

Any ideas? I am quite new to PRTG

alarmstate execute-program remote remote-probe state

Created on Jun 26, 2011 4:49:58 PM



8 Replies

Votes:

0

Hello,

this should be possible with a notification on a State Trigger with the condition "Warning". The notification should of course be a script notification, and the PRTG Core Server should be able to connect to this remote host directly (as notifications are executed by the PRTG Core Server).

best regards.

Created on Jun 27, 2011 2:05:47 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Thanks for the reply!

I had that set up initially, the thing is the script would only run on our PRTG Core Server as opposed to the remote host. There is only a scripts folder on the Core server as well.

Created on Jun 27, 2011 3:33:23 PM



Votes:

0

You would of course need to connect to the remote host with the script itself.

Created on Jun 27, 2011 3:44:37 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Would this work when the remote host is on a completely different network/domain? Considering I can't communicate with the remote server (Aside from RDP and Core Monitoring) - I have only seen remote scripts run in a "local" environment

Created on Jun 29, 2011 7:13:05 AM



Votes:

0

I'm afraid you can only try that.

Created on Jun 29, 2011 2:06:07 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Thanks for the help!

Created on Jun 29, 2011 2:06:58 PM



Votes:

0

Can the script be exicuted on a remote probe?

Created on Jan 9, 2012 4:09:10 PM



Votes:

0

Not sure if you figured this out but depending on the script, you may be able to do it with using a PsExec command from the PRTG server. I use that to run commands on our workstations when I need to. You would need to configure the scripts independantly for each workstation though. Here is a link to PsExec:

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

Created on Apr 19, 2013 11:43:54 AM




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.