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

Monitoring an EXE file




I need to monitor an EXE file (application) which is running on a server

We are already monitoring the server and can see sensors for disk space, CPU etc. However, we need to monitor an EXE file that resides in C:\apps\data. If the application stops for any reason, we need to alert a number of people.

The probe server we have setup is a Windows 7 machine however and we're not sure if this will cause any issues?

We can monitor quite a lot of WMI sensors on a lot of servers on the estate, along with services etc, but we're struggling to find a way of monitoring this application running on one of the servers.

Any advice is appreciated!

Thanks James

custom-script-exe custom-sensor monitoring sensor

Created on May 12, 2016 3:03:51 PM

5 Replies



You may want to use the Windows Process sensor :)

Created on May 13, 2016 9:32:40 AM by  Stephan Linke [Paessler Support]



Hi Stephan - many thanks for your reply.

I've applied the sensor to monitor this EXE file (via the device which is the server where the EXE is running) but I'm getting the following error:

WMI: 80041017: The query was not syntactically valid. -- PerfCounter: No data to return. (Performance Counter error 0x800007D5)

It's worth noting that the PRTG probe that we're using is only Windows 7 - do we have to use a Windows 2008 probe?

The server where the EXE runs is Windows server, but this is not the probe, only an added device under the probe level.

Regards James

Created on May 13, 2016 9:47:45 AM



Does this apply to all processes you're trying to enter? Do other WMI sensors work on this very server?

Created on May 13, 2016 9:57:30 AM by  Stephan Linke [Paessler Support]



Hi James

I use a custom sensor to check if somone is running DROPBOX on the server. If prtg finds such a process called "dropbox.exe", my sensor turns red. You need the opposite I assume:

Here's my code for the custom sensor GetProcess.vbs:

on error resume next

' Commandline Argument is process.exe
' ex: cscript getprocess.vbs explorer.exe
' **************************************
strComputer = "."

if isNull(WScript.Arguments.Item(0)) then
	wscript.echo "Process not given -> getprocess.vbs processname.exe"
	strProcess = WScript.Arguments.Item(0)	
end if

strComputer = WScript.Arguments.Item(1)

Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery( _
    "Select * from Win32_Process WHERE name ='"&strProcess&"'")

if colItems.Count < 1 then	
	Wscript.Echo colItems.Count&":Ok" 
	wscript.echo colItems.Count&":processes running"
end if

I think you just have to change the "if colItems.Count < 1 then" to "if colItems.Count > 1 then"

regards Thomas

Created on May 13, 2016 12:18:11 PM



Thanks for sharing that script, Thomas!

Created on May 13, 2016 12:20:33 PM by  Stephan Linke [Paessler Support]

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.