Hi,
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
Article Comments
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
May, 2016 - Permalink
Does this apply to all processes you're trying to enter? Do other WMI sensors work on this very server?
May, 2016 - Permalink
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" wscript.quit else 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.quit("0") ELSE wscript.echo colItems.Count&":processes running" wscript.quit("1") end if
I think you just have to change the "if colItems.Count < 1 then" to "if colItems.Count > 1 then"
regards Thomas
May, 2016 - Permalink
You may want to use the Windows Process sensor :)
May, 2016 - Permalink