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

Manual ways to add devices/ sensors

Votes:

0

Hey,

I'm currently looking at ways to completely automate PRTG. In an ideal situation, when a device is added, it will automatically be detected and the appropriate sensors will be added (Mail servers will be checked by POP, Remote Desktop servers by RDP etc.).

I've played around with the Auto Discovery function, but this doesnt provide a solution. Are there other ways to add sensors?

I was thinking about writing a custom Auto Discovery in powershell and have powershell add the sensors to the PRTG system. Is anything like that possible? :)

I'd like to hear what options i have and if anything i'm saying is making sense.

automation devices powershell prtg sensors

Created on Mar 31, 2015 3:01:44 PM



Best Answer

Accepted Answer

Votes:

0

Indeed :) They should be set to their default values (like when you create a device and just hit save instead of modifying anything). Just go ahead and try calling the URL only with the parameters you actually need :)

Created on May 5, 2015 12:26:29 PM by  Stephan Linke [Paessler Support]



10 Replies

Votes:

0

Hi,

you can easily create a Template by yourself. Just rightclick the device you want to create a template for and click "create Template". The Template file will be created in \Program Files (x86)\PRTG Network Monitor\devicetemplates and can be edited.
With this templates (you can choose more than one) you can run an Audodiscovery on a device or a group.

Hope this will be helpful to you.
Regards
Birk Guttmann

Created on Apr 1, 2015 9:37:28 AM



Votes:

0

I'm sorry, i forgot to mention creating templates did not suffice. When running Auto Discovery with templates, it would just fill the group with all devices found in the given range and just add sensors for the ones that belonged to the template.

I would end up with a group filled with empty devices and just a few with sensors added to them.

Created on Apr 1, 2015 11:23:25 AM



Votes:

0

The auto discovery has various options to limit the amount of discovered hosts:

  • IP List
  • IP Range
  • Computers in a AD group
  • DNS Names
  • Entire networks based on their subnet

None of those suit you? :/ Auto-Discovery via PowerShell is something I thought about sometimes, but whichever way you look at it, it will be pretty painful and hard to maintain.

Created on Apr 1, 2015 1:30:41 PM by  Stephan Linke [Paessler Support]



Votes:

0

I've thought about the limits you mentioned, however an IP list is too much hand work everytime something has to be added (same goes for DNS names), a range is too global (it'll get too many devices i don't want/ need) and the same goes for entire networks and i need to monitor a lot more systems then just those connected to my AD.

summary: lots of different devices have to be added automatically with the corrosponding sensors.

I've looked into another option and thats using HTTP requests to add devices and sensors. The requests to do this are not part of the api. So instead of:

http://serveraddress.com:8080/api/request?parameter=value

i got:

http://serveraddress.com:8080/request?parameter=value

without the /api/ part. Would this be a viable option and does this work the same way it would when using the supported API HTTP requests?

Created on Apr 1, 2015 2:45:50 PM

Last change on Apr 2, 2015 9:03:20 AM by  Torsten Lindner [Paessler Support]



Votes:

0

What would be the correct HTTP call to add a new device? It should work, but consider it not supported, i.e. the call might change or be discarded/replaced in future versions :(

Created on Apr 2, 2015 7:28:01 AM by  Stephan Linke [Paessler Support]



Votes:

0

Thanks for the quick reply!

For adding a device the HTTP request would be: id=1&name_=%5Bname%5D&ipversion_=0&host_=%5Baddress%5D&hostv6_=&tags_=&deviceicon_=a_server_1.png&discoverytype_=0&devicetemplate_=1&devicetemplate_=1&discoveryschedule_=0&windowsconnection=0&windowsconnection=1&windowslogindomain_=&windowsloginusername_=&windowsloginpassword_=&linuxconnection=0&linuxconnection=1&linuxloginusername_=&linuxloginmode_=0&linuxloginpassword_=&privatekey_=&wbemprotocol_=https&wbemportmode_=0&wbemport_=5989&sshport_=22&sshelevatedrights_=1&elevationnamesudo_=&elevationnamesu_=&elevationpass_=&vmwareconnection=0&vmwareconnection=1&esxuser_=&esxpassword_=&esxprotocol_=0&dbcredentials=0&dbcredentials=1&usedbcustomport_=0&dbport_=&dbauth_=0&dbuser_=&dbpassword_=&dbtimeout_=60&snmpversiongroup=0&snmpversiongroup=1&snmpversion_=V2&snmpcommv1_=public&snmpcommv2_=public&snmpauthmode_=authpHMACMD596&snmpuser_=&snmpauthpass_=&snmpencmode_=DESPrivProtocol&snmpencpass_=&snmpcontext_=&snmpport_=161&snmptimeout_=5&accessgroup=0&accessgroup=1&accessrights_=1&accessrights_=1&accessrights_201=-1

Updates might become a problem indeed, thanks for mentioning. However if it saves me the trouble of adding devices manually i could consider staying with one version. Or inspect new versions for changes before updating.

As far is i could tell this is the only outside way to add devices or sensors with a script.

Created on Apr 2, 2015 7:37:12 AM

Last change on Apr 2, 2015 9:05:16 AM by  Stephan Linke [Paessler Support]



Votes:

0

Quite a URL you got there - I've put it in a code wrapper so it's readable. Well, if it works for you, I got nothing more to add here :)

Created on Apr 2, 2015 9:06:55 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hey there,

It's been a while :) i have another question regarding this topic though. As i've mentioned above adding sensors with the HTTP request worked. However, like Stephan noticed, it's quite a lenghty URL. When implementing this into a script it's barely readable because it's just lines of parameters. About 90% of the parameters are not used in my case, so i was wondering what happened if i just left out parameters?

I tried adding a device with just a couple relevant parameters (name, ip version, hostname, etc) and it worked.

My question is: what happens with the parameters that are left out? Are many of them just not being used? Or are they, when not given, just set to a default value?

I'm asking because i don't want to run into any trouble later on, because PRTG is missing information. Though question, but i thought i'd give it a try :)

Thanks in advance!

Created on May 5, 2015 10:45:55 AM



Accepted Answer

Votes:

0

Indeed :) They should be set to their default values (like when you create a device and just hit save instead of modifying anything). Just go ahead and try calling the URL only with the parameters you actually need :)

Created on May 5, 2015 12:26:29 PM by  Stephan Linke [Paessler Support]



Votes:

0

Great! Thanks!

Created on May 8, 2015 8:55:45 AM




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.