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

Monitor and warn when process runs too long?

Votes:

0

Now, I know it's usually that you want processes and the like to be up, which of course is no real problem setting up sensor for, but with our new PRTG installation the thought about an existing problem game up on out team, so I figured I'd toss up the question here to see if it's possible to find a solution to it using PRTG.

We have numerous scheduled jobs in excel on a Windows 2008R2 server, and sometimes these processes tend to lock up, so we were wondering if it's possible to set up monitoring that gives us a warning in PRTG when an excel process has been running for say 30min or more, and if possible even kill the process in such case - although just getting an alarm about it would be a big step in the right direction for the issue we're having with the jobs.

custom-sensor process windows

Created on Sep 21, 2015 7:54:03 AM



1 Reply

Votes:

0

Dear OrderNordic

PRTG has no build-in sensor for this task. However, PRTG supports custom sensors, meaning you could write a Powershell script to read the StartTime property of a process, which can be get with the get-process command.

Please have a look at this example

$ErrorActionPreference = "SilentlyContinue"
$p="explorer"
try
{
$timespan=(New-TimeSpan -Start (get-process $p).StartTime)
write-host $timespan.totalminutes
}
catch
{
write-host "Process not running"
}

Of course such sensor script would have to be longer, since you need to insert the correct process name and format the output to conform to the Exe/Script sensor format definition.

Created on Sep 22, 2015 12:06:14 PM by  Arne Seifert [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.