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

Trying to execute batch notification with psexec

Votes:

0

Hi There,

I'm trying to test the notification batch method to create a notification with a exe/batch file and attach it to a sensor. The batch tries to fire up a command with psexec to execute it on a remote server.

With this we're able to recover remote servers when an error occurs.

I test the notification with the "test" button before actually let the sensor triggering it.

Nothing happens..

The batch file is within the paessler notification\exe directory. It contains: psexec
%remote server% -i -d -h cmd /c d:\dir\ip-config.bat

ip-config.bat contains ipconfig > ipconfig.txt

Should there be some way to troubleshoot this?

CHeers R.

batch notifaction remote

Created on Jan 28, 2015 9:28:09 AM



2 Replies

Votes:

0

Dear Roberto

Please go to the main menu Logs / System Events / Notification. Does your previous click on the notification "Test" button appear on the log?

Created on Jan 29, 2015 1:16:20 PM by  Arne Seifert [Paessler Support]



Votes:

0

The problem with executing a batch file from a notification is that, the batch file is wanting to open a console window in order to execute the PSEXEC application. After many hours of banging my head on this issue, The solution is to convert the .BAT file into a .EXE file configured to run in background. Then set the notification to execute the EXE file. There are many free utilities online which will do this conversion for you. Now I am able to execute all sorts of code across multiple domains with my notifications with PSEXEC and life is wonderful!

Created on Apr 8, 2019 5:27:10 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.