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

PRTG Network Monitor

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

Free Download

Top Tags


View all Tags

Failed to open event query. Access is denied. Custom Query

Votes:

0

Your Vote:

Up

Down

Hello there,

For some reason i'm not getting this custom exe sensor working. It keeps giving me this error:

Failed to open event query. Access is denied.

If I run the .ps1 there's no problem. I'm sure the credentials are ok because this sensor is a part of a bigger object and credentials are inherited. Also I see the powershell.exe run as the inherited user when checking taskmanager. When I connect from the PRTG server to the evenvwr of the target server with the credentials there's no problem. Anybody any idea's?

Peter

$xml = wevtutil /r:server.domain.local qe Microsoft-Windows-Hyper-V-Integration-Admin /e:root "/q:*[System[(Level=3) and (EventID=4130) and TimeCreated[timediff(@SystemTime) <= 86400000]]]"
$xmlData = [xml]$xml

$result=[string]$xmldata.root.event.count+":OK"
write-host $result

access custom-exe denied exe-script-sensor queryevent

Created on Jun 14, 2011 7:34:27 AM by  PeterStamBam (80) 1 1

Last change on Jun 14, 2011 11:35:21 AM by  Daniel Zobel [Product Manager]



3 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Please note that all executables or script files used with an EXE/Script Sensor are executed under the same Windows user account under which the PRTG Probe service is running. In default configuration, this is the local "System" Windows user account. Please make sure this account has sufficient rights to run the file.

You can also change the user for the PRTG Probe service, so it is executed under the Windows Domain Administrator user account, for example. Your script/executable files will then be executed under this same user account.

Created on Jun 14, 2011 11:38:43 AM by  Daniel Zobel [Product Manager]

Last change on Jun 14, 2011 11:39:47 AM by  Daniel Zobel [Product Manager]



Votes:

0

Your Vote:

Up

Down

Hello Daniel,

This reply might sound strange but are you sure?!? I run several custom scripts, exe and WMI. They are all not working unless I fill in Windows Credentials. Also I see the process run under this account that I fill in at the Windows credentials and not the local system account. I don't see what the option Windows credentials are used for if this exe is always run under the local system account. This also means that you can never monitor another domain/server with a custom script.....am I missing something?

To be clear, all my custom EXE, WMI, EXE Advanced scripts (and I have a lot, monitoring 5 hyper-v clusters dynamically) are working when I fill in the Windows credentials (for half a year now so this is not the problem). Under this I created a new sensor that is giving me the error above. Credentials are inherited.

Peter

Created on Jun 14, 2011 7:24:33 PM by  PeterStamBam (80) 1 1

Last change on Jun 15, 2011 12:01:46 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Dear Peter,

please just give it a try, to run the Probe Service under an admin user account. We wouldn't recommend this tip, if it hadn't already helped in numerous cases.

best regards.

Created on Jun 15, 2011 12:01:20 PM by  Torsten Lindner [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.