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

Change PRTG7 service credentials

Votes:

0

Hello,

I need to run Paessler PRTG Monitor 7 under different credentials than Local System. When performing the change for PRTG Server and PRTG Probe services, I am unable to access PRTG. The user under which PRTG services run has local admin privileges on the server.

I need this in order to allow "Execute HTTP Action" notification to go through a predefined proxy server.

Thanks for your help and Best Regards, Max

account proxy prtg service

Created on Mar 18, 2010 4:04:35 PM



Best Answer

Accepted Answer

Votes:

0

UPDATED: See solution below my signature.

Hello, I've fixed the problem. Although it is not possible to use a proxy through PRTG Monitor 7, I've made an Execute EXE program action that solves my problem. I will provide the details and script later, but here is how it works :

I've installed curl in the Notifications/EXE folder, then I've created a BAT file. The EXE sensor passes several variables as an argument to the BAT file, the BAT files processes those and concatenates them into a string (an URL) which is then passed to curl.exe with additional command line parameters to provide curl with a proxy address, username and password of an authorized user to use the proxy (in my case a service account) and finally the HTTP action to perform.

Because this URL is in fact a prowl/growl API command, the URL needs to be passed properly, hence character substitution must be done for & (ampersand) symbols, otherwise the cmd.exe interpreter sees this as an action to run after the first command (command concatenation i.e. run program1.exe & program2.exe & program3.exe)

Passing these variables to the BAT file has one issue though: some of the values passed as parameters to the BAT file by paessler contain spaces, therefore the BAT reads each space as a delimiter to fill the next variable, leading to shifting in the originally desired values. I've already though of a fix for this, I will provide more details here and in my blog later.

Thanks and Best Regards; Max

Update 22.03.2010 >> I modified my action to call a VBS file instead of a BAT file, allowing me smoother work with string concatenation. Please see the VBS script below (edit where needed) :

dim x,Params,increment,ArgObj,cmdline

Set ArgObj=Wscript.Arguments
Set WshShell=Wscript.CreateObject("Wscript.Shell")
Params=""


For increment=0 to ArgObj.count - 1
Params = Params & ArgObj(increment) & "%20"
Next

cmdline="-U domain\user:password -k -x myproxy.company.org:80 "
&"https://prowl.weks.net/publicapi/add?apikey=MY0000API0000KEY&application=My%20Monitoring&event=Alarm&description="
 & params

x = WshShell.Run("""C:\program files\PRTG Network Monitor\Notifications\EXE
\curl.exe""" & cmdline)

Et voila! :)

I will post the problematic on my blog : http://www.kamshin.com

Created on Mar 19, 2010 9:40:38 PM

Last change on May 5, 2010 8:25:37 AM by  Daniel Zobel [Product Manager]



4 Replies

Votes:

0

please explain

"I am unable to access PRTG"

Win GUI or WEB GUI? Do both services restart fine with the new credentials?

Created on Mar 19, 2010 9:19:39 AM by  Aurelio Lombardi [Paessler Support]



Votes:

0

Hello Aurelio,

both services restarted correctly with the new credentials yesterday. I reverted it to LocalSystem yesterday, and I tried again this morning. Oddly enough, it is working today!

It however doesn't seems to solve my second problem, which is handling "Execute HTTP Action" through a web proxy. Can this be achieved ?

Thanks, Max

Created on Mar 19, 2010 10:07:56 AM



Votes:

0

HTTP action through a proxy is not possible, sorry.

Created on Mar 19, 2010 10:42:48 AM by  Aurelio Lombardi [Paessler Support]



Accepted Answer

Votes:

0

UPDATED: See solution below my signature.

Hello, I've fixed the problem. Although it is not possible to use a proxy through PRTG Monitor 7, I've made an Execute EXE program action that solves my problem. I will provide the details and script later, but here is how it works :

I've installed curl in the Notifications/EXE folder, then I've created a BAT file. The EXE sensor passes several variables as an argument to the BAT file, the BAT files processes those and concatenates them into a string (an URL) which is then passed to curl.exe with additional command line parameters to provide curl with a proxy address, username and password of an authorized user to use the proxy (in my case a service account) and finally the HTTP action to perform.

Because this URL is in fact a prowl/growl API command, the URL needs to be passed properly, hence character substitution must be done for & (ampersand) symbols, otherwise the cmd.exe interpreter sees this as an action to run after the first command (command concatenation i.e. run program1.exe & program2.exe & program3.exe)

Passing these variables to the BAT file has one issue though: some of the values passed as parameters to the BAT file by paessler contain spaces, therefore the BAT reads each space as a delimiter to fill the next variable, leading to shifting in the originally desired values. I've already though of a fix for this, I will provide more details here and in my blog later.

Thanks and Best Regards; Max

Update 22.03.2010 >> I modified my action to call a VBS file instead of a BAT file, allowing me smoother work with string concatenation. Please see the VBS script below (edit where needed) :

dim x,Params,increment,ArgObj,cmdline

Set ArgObj=Wscript.Arguments
Set WshShell=Wscript.CreateObject("Wscript.Shell")
Params=""


For increment=0 to ArgObj.count - 1
Params = Params & ArgObj(increment) & "%20"
Next

cmdline="-U domain\user:password -k -x myproxy.company.org:80 "
&"https://prowl.weks.net/publicapi/add?apikey=MY0000API0000KEY&application=My%20Monitoring&event=Alarm&description="
 & params

x = WshShell.Run("""C:\program files\PRTG Network Monitor\Notifications\EXE
\curl.exe""" & cmdline)

Et voila! :)

I will post the problematic on my blog : http://www.kamshin.com

Created on Mar 19, 2010 9:40:38 PM

Last change on May 5, 2010 8:25:37 AM by  Daniel Zobel [Product Manager]




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.