New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How can I raise no alarm for PE009 (wmiprocesssensor) when process is not found?

Votes:

0

Your Vote:

Up

Down

Hi,

I want to Monitor a process (especially usage of this process) and I am using wmiprocesssensor for this. This works fine as Long as the process runs. If the process is closed (which is normal) the sensor shouldn't raise an Alarm but continue to use Status OK instead.

Is there any (easy) way to configure this without creating a new custom WMI sensor?

Thanks for your reply

custom custom-sensor pe009 process ticket-duplicated wmi wmiprocesssensor

Created on Apr 8, 2014 1:52:18 PM by  asapHO (11) 1 1

Last change on Dec 30, 2015 8:37:47 AM by  Felix Saure [Paessler Support]



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Hello there,

As mentioned before, this will be possible with a custom sensor which will allow you to define particular sensor states. You can i.e. use the PowerShell CMDlet

Get-WmiObject win32_process

to monitor the processes of a remote computer. I'll attach a script which will scan a target host for duplicated processes, this should give you a starting point to write your own sensor suiting your needs. Please note that this script comes at it is and we will not offer additional support for it:

# Description: Monitors Windows processes for duplicated entries
# Parameters:
# -Process: The name  you want to check for multiple instances
# -process "chrome.exe" -hostname %host -Username "%windowsdomain\%windowsuser" -Password "%windowspassword"


# Parameter list

param(
    [string]$process = "ProzessName",
    [string]$hostname = "TargetHostName",
    [string]$username = "YourUsername",
    [string]$password = "YourPassword"
)



# Variables
$result=0

# Generate Credentials Object
$SecPasswd  = ConvertTo-SecureString $Password -AsPlainText -Force
$Credentials= New-Object System.Management.Automation.PSCredential ($UserName, $secpasswd)

try{ $Objects = (Get-WmiObject win32_process -ComputerName $($hostname) -Filter "name like '%$($process)%'" | select Commandline | Group-Object commandline) }
catch{
$Objects = (Get-WmiObject win32_process -ComputerName $($hostname) -Credential $($Credentials) -Filter "name like '%$($process)%'" | select Commandline | Group-Object commandline)
}


write-host $objects.count ":" $objects.count " instance(s) of the process running"

Best regards, Felix

Created on Dec 30, 2015 8:36:11 AM by  Felix Saure [Paessler Support]

Last change on Nov 17, 2016 11:56:10 AM by  Felix Saure [Paessler Support]



5 Replies

Votes:

0

Your Vote:

Up

Down

I'm afraid that isn't possible, sorry. If the process is no longer operational, PRTG will always mark the same as down.

Created on Apr 9, 2014 1:55:20 PM by  Patrick Hutter [Paessler Support] (7,164) 3 3



Votes:

0

Your Vote:

Up

Down

It would be ok, if the process is marked as down. But can I adjust the sensor that it won't raise the alarm state by modifying channel attributes?

If I can't use the pre built sensor, will something like this be possible by using a custom sensor?

So want to "exclude" the sensor from my general warning list and use the sensor only for documentation purposes.

best regards

Created on Apr 9, 2014 2:39:18 PM by  asapHO (11) 1 1



Votes:

0

Your Vote:

Up

Down

Using a custom sensor you could define the state yourself, so yes, that would be possible.

Created on Apr 10, 2014 1:25:11 PM by  Patrick Hutter [Paessler Support] (7,164) 3 3



Votes:

0

Your Vote:

Up

Down

I'm looking for this same functionality. I want to mimic everything the wmiprocesssensor does, except not throw an exception when the process is not found.

Created on Dec 29, 2015 8:19:27 PM by  blong_at_dma_dot_org (0)



Accepted Answer

Votes:

0

Your Vote:

Up

Down

Hello there,

As mentioned before, this will be possible with a custom sensor which will allow you to define particular sensor states. You can i.e. use the PowerShell CMDlet

Get-WmiObject win32_process

to monitor the processes of a remote computer. I'll attach a script which will scan a target host for duplicated processes, this should give you a starting point to write your own sensor suiting your needs. Please note that this script comes at it is and we will not offer additional support for it:

# Description: Monitors Windows processes for duplicated entries
# Parameters:
# -Process: The name  you want to check for multiple instances
# -process "chrome.exe" -hostname %host -Username "%windowsdomain\%windowsuser" -Password "%windowspassword"


# Parameter list

param(
    [string]$process = "ProzessName",
    [string]$hostname = "TargetHostName",
    [string]$username = "YourUsername",
    [string]$password = "YourPassword"
)



# Variables
$result=0

# Generate Credentials Object
$SecPasswd  = ConvertTo-SecureString $Password -AsPlainText -Force
$Credentials= New-Object System.Management.Automation.PSCredential ($UserName, $secpasswd)

try{ $Objects = (Get-WmiObject win32_process -ComputerName $($hostname) -Filter "name like '%$($process)%'" | select Commandline | Group-Object commandline) }
catch{
$Objects = (Get-WmiObject win32_process -ComputerName $($hostname) -Credential $($Credentials) -Filter "name like '%$($process)%'" | select Commandline | Group-Object commandline)
}


write-host $objects.count ":" $objects.count " instance(s) of the process running"

Best regards, Felix

Created on Dec 30, 2015 8:36:11 AM by  Felix Saure [Paessler Support]

Last change on Nov 17, 2016 11:56:10 AM by  Felix Saure [Paessler Support]



Please log in or register to enter your reply.


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.