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

Script Advanced Sensor / cannot find path

Votes:

0

Hello

We are trying to get an EXE/Script Advanced Sensor to work.

The script is a Windows Batch Script (cmd) and works if executed on the server itself without any problem.

If setup as sensor on PRTG (3 params as string value) we get the following error in the sensor log file "The system cannot find the path specified".

  • We tried to set a different user account fer the probe service.

It seems, this is not be a problem of missing permissions :/

There aren't any more error messages and we have no idea on how to get this work.

Have you ever had someone having a similar issue?

advanced batch probe script

Created on Nov 22, 2018 3:40:10 PM



Best Answer

Accepted Answer

Votes:

1

Hello John,

It doesn't work that way, the script is run locally on the probe system, it is not copied over to the target machine. In this case you would need a script that establishes a remote connection to Server-02, for example with a powershell script that establishes a remote powershell session to the other host. Another option might be using PsExec to achieve this.

A different approach would be to run the script itself periodically as scheduled task on Server-02 and have the script generate an output that can be caught by an HTTP Push Data Advanced Sensor (or HTTP Push Data Sensor in case only one value is the final result).

Kind regards,

Erhard

Created on Nov 30, 2018 9:21:34 AM by  Erhard Mikulik [Paessler Support]



4 Replies

Votes:

1

Hello John,

Does the batch script maybe try to reach certain files/executables on the probe system in different locations? If so, try putting them into the same folder where the batch resides.

Kind regards,

Erhard

Created on Nov 23, 2018 12:15:45 PM by  Erhard Mikulik [Paessler Support]



Votes:

0

Hello Erhard

Thank you for your response.

We got the following setup:

## Server-01

  • PRTG probe installed
  • Script "MyScript.cmd" placed in "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\"

## Server-02

  • No PRTG probe installed
  • Console-Application "MyApp.exe" placed in "C:\projects\"

## Usage

Now we want to start "MyApp.exe" on Server-02 and process the returned XML using a EXE/Script Advanced Sensor.

## Configuration

In the sensor settings we selected the "MyScript.cmd" as Program/Script and as parameter we have set our 3 params like this:

"C:\projects\MyApp.exe" "Default" "Test1"

We would expect our probe (Server-01) to copy "MyScript.cmd" to the Server-02 at "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\" and execute "MyScript.cmd" using the 3 parameters.

We do not need to install the PRTG probe on the Server-02 to get this work?

Created on Nov 29, 2018 1:42:41 PM



Accepted Answer

Votes:

1

Hello John,

It doesn't work that way, the script is run locally on the probe system, it is not copied over to the target machine. In this case you would need a script that establishes a remote connection to Server-02, for example with a powershell script that establishes a remote powershell session to the other host. Another option might be using PsExec to achieve this.

A different approach would be to run the script itself periodically as scheduled task on Server-02 and have the script generate an output that can be caught by an HTTP Push Data Advanced Sensor (or HTTP Push Data Sensor in case only one value is the final result).

Kind regards,

Erhard

Created on Nov 30, 2018 9:21:34 AM by  Erhard Mikulik [Paessler Support]



Votes:

0

Hello Erhard

Thank you for pointing us in the right direction.

We got it finally work using PsExec :)

Regards

Created on Dec 27, 2018 3:04:52 PM




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.