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 to edit device templates that I create

Votes:

0

Your Vote:

Up

Down

I've created some templates for devices and auto discovery. Now I want to change some settings in these templates. Is it possible to edit templates that I have created or do I just have to make new ones from scratch?

Eventually my template list will get crowded. Is it possible to delete templates?

auto-discovery device edit template

Created on Jun 20, 2010 1:43:03 PM by  bokad (0) 2

Last change on Jun 21, 2010 6:28:54 AM by  Daniel Zobel [Paessler Support]



Best Answer

Accepted Answer

Votes:

2

Your Vote:

Up

Down

Modifying on device templates is not officially supported!

But since it can prove useful, here's a little insight of how templates work. This is a template that will:

  1. Check whenever the device responds to ping
  2. If it responds to Ping, check whenever the device responds to SNMP (with 23 generic queries)
  3. If it responds to Ping, check whenever the device can be reached on TCP Port 443.
  4. If the previous TCP Port 443 check succeeded, it will attempt deploy an SSL Certificate Sensor configured to check port 443. All other settings will be default and the sensor will be named "SSL Certificate Sensor (Port 443)"
  5. Lastly, if the SNMP check succeeded, it will do a so-called portscan (More info here), and will deploy one SNMP Traffic Sensor for each "available" interface. No name is defined since it will use the "Name Template" from the SNMP Compatibility Options.
 <?xml version="1.0" encoding="UTF-8" ?>
<devicetemplate id="custom" name="Custom Template" priority="1">
  <check id="ping" meta="ping"/>
  <check id="snmp" meta="snmp" requires="ping"/>
  <check id="port443" meta="port" requires="ping"/>
  <create id="sslcert443" kind="sslcertificate" requires="port443" displayname="SSL Certificate Sensor (Port 443)">
    <createdata>
      <port>443</port>
    </createdata>
  </create>
  <create id="snmptraffic" kind="snmptraffic" requires="snmp" meta="portscan"/>
</devicetemplate>

To the individual parts of the template

<?xml version="1.0" encoding="UTF-8" ?>
<devicetemplate id="custom" name="Custom Template" priority="1">

Defines the template's ID (custom for custom templates) and the template's name (as displayed in PRTG). The priority defines the precedence of the template and whenever it should be included in the default discovery.

  <check id="ping" meta="ping"/>
  <check id="snmp" meta="snmp" requires="ping"/>
  <check id="port443" meta="port" requires="ping"/>

Check statements are used to validate something. This will be used later to decide which sensors are compatible/should be deployed. The requires="" is used to define a dependency for a check statement. i.e. snmp will only be tested if ping was successful.

  <create id="sslcert443" kind="sslcertificate" requires="port443" displayname="SSL Certificate Sensor (Port 443)">
    <createdata>
      <port>443</port>
    </createdata>
  </create>

The create statement is used to deploy sensors.

  • kind defines the sensor type.
  • requires defines the prerequisite (check) that needs to have passed for the sensor to be created.
  • displayname defines the sensor's name.

For sensors that require it, the <createdata> is used to pre-configure the sensor's settings. In this case the port used by the sensor is being defined (443).

<create id="snmptraffic" kind="snmptraffic" requires="snmp" meta="portscan"/>

This is a different create statement, what makes it unique is the meta="portscan" - This defines that part the <createdata> required by this sensor is not static but will be obtained dynamically during this sensor's creation using the rules from the portscan. Metascans are used/required when the data monitored by the sensors is dynamic, which prevents the OID's or configurations from being hard-coded as it changes on a per-device basis.

Also important to note is the id= of the create. The id is used to skip a sensor's creation. This means that if a discovery is re-run and there is already an sslcertificate sensor with internal id sslcert443 and same settings, the sensor will not be re-created.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on May 3, 2017 6:24:34 AM by  Luciano Lingnau [Paessler Support]

Last change on Dec 5, 2017 11:35:53 AM by  Luciano Lingnau [Paessler Support]



6 Replies

Votes:

0

Your Vote:

Up

Down

Working on device templates is not officially supported, but you can change them if you like.

They are located in the PRTG programs folder in the folder "devicetemplates".

Created on Jun 20, 2010 6:18:06 PM by  Aurelio Lombardi [Paessler Support]

Last change on Jun 21, 2010 6:27:57 AM by  Daniel Zobel [Paessler Support]



Votes:

0

Your Vote:

Up

Down

If we manually edit the XML file for a template, will any existing devices previously created with this template get any new sensors, or changed values for existing sensors?

Created on Oct 12, 2012 3:48:41 PM by  Stuart Little (5) 1



Votes:

0

Your Vote:

Up

Down

Existing devices/sensors will not be changed if the template is edited which created those sensors.

Created on Oct 12, 2012 4:23:08 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

If I have auto-discovery setup to use a template and it is set to re-scan on a weekly basis, will changes to the device template take effect once that weekly re-scan occurs?

Created on Feb 5, 2013 3:48:34 PM by  Josiah Ritchie (110) 1 1



Votes:

0

Your Vote:

Up

Down

Oh c'mon... wiping strings from XML.. : ( Not fun.

Created on Oct 29, 2015 4:24:32 PM by  i3laze (102) 2 1



Accepted Answer

Votes:

2

Your Vote:

Up

Down

Modifying on device templates is not officially supported!

But since it can prove useful, here's a little insight of how templates work. This is a template that will:

  1. Check whenever the device responds to ping
  2. If it responds to Ping, check whenever the device responds to SNMP (with 23 generic queries)
  3. If it responds to Ping, check whenever the device can be reached on TCP Port 443.
  4. If the previous TCP Port 443 check succeeded, it will attempt deploy an SSL Certificate Sensor configured to check port 443. All other settings will be default and the sensor will be named "SSL Certificate Sensor (Port 443)"
  5. Lastly, if the SNMP check succeeded, it will do a so-called portscan (More info here), and will deploy one SNMP Traffic Sensor for each "available" interface. No name is defined since it will use the "Name Template" from the SNMP Compatibility Options.
 <?xml version="1.0" encoding="UTF-8" ?>
<devicetemplate id="custom" name="Custom Template" priority="1">
  <check id="ping" meta="ping"/>
  <check id="snmp" meta="snmp" requires="ping"/>
  <check id="port443" meta="port" requires="ping"/>
  <create id="sslcert443" kind="sslcertificate" requires="port443" displayname="SSL Certificate Sensor (Port 443)">
    <createdata>
      <port>443</port>
    </createdata>
  </create>
  <create id="snmptraffic" kind="snmptraffic" requires="snmp" meta="portscan"/>
</devicetemplate>

To the individual parts of the template

<?xml version="1.0" encoding="UTF-8" ?>
<devicetemplate id="custom" name="Custom Template" priority="1">

Defines the template's ID (custom for custom templates) and the template's name (as displayed in PRTG). The priority defines the precedence of the template and whenever it should be included in the default discovery.

  <check id="ping" meta="ping"/>
  <check id="snmp" meta="snmp" requires="ping"/>
  <check id="port443" meta="port" requires="ping"/>

Check statements are used to validate something. This will be used later to decide which sensors are compatible/should be deployed. The requires="" is used to define a dependency for a check statement. i.e. snmp will only be tested if ping was successful.

  <create id="sslcert443" kind="sslcertificate" requires="port443" displayname="SSL Certificate Sensor (Port 443)">
    <createdata>
      <port>443</port>
    </createdata>
  </create>

The create statement is used to deploy sensors.

  • kind defines the sensor type.
  • requires defines the prerequisite (check) that needs to have passed for the sensor to be created.
  • displayname defines the sensor's name.

For sensors that require it, the <createdata> is used to pre-configure the sensor's settings. In this case the port used by the sensor is being defined (443).

<create id="snmptraffic" kind="snmptraffic" requires="snmp" meta="portscan"/>

This is a different create statement, what makes it unique is the meta="portscan" - This defines that part the <createdata> required by this sensor is not static but will be obtained dynamically during this sensor's creation using the rules from the portscan. Metascans are used/required when the data monitored by the sensors is dynamic, which prevents the OID's or configurations from being hard-coded as it changes on a per-device basis.

Also important to note is the id= of the create. The id is used to skip a sensor's creation. This means that if a discovery is re-run and there is already an sslcertificate sensor with internal id sslcert443 and same settings, the sensor will not be re-created.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on May 3, 2017 6:24:34 AM by  Luciano Lingnau [Paessler Support]

Last change on Dec 5, 2017 11:35:53 AM by  Luciano Lingnau [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.