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

Device Template hostname

Votes:

1

Is it possible to use a variable in the Device Template? I've created a template for device type X with a number of sensors and would like to run Auto-Discovery with a Template and have it auto populate the hostname in the sensor description.

I see in the template file:

<create id="pingsensor" kind="ping" requires="ping" displayname="Ping Latency - device01name">

Can we replace the "device01name" with something like $hostname to have the description created automatically without user intervention?

auto-discovery prtg template

Created on Dec 17, 2014 3:01:57 PM

Last change on May 3, 2017 5:26:05 AM by  Luciano Lingnau [Paessler]



13 Replies

Votes:

2

Did you find a solution for this kind of sensor-renaming? It seems that simple placeholders like %host for example aren't resolved if you seek for new sensors based on a modified template. Is there a supported, official way to replace the auto-incrementing counting on sensors of the same type with the hostnames of the devices they belong to?

Created on Apr 14, 2015 9:51:14 AM



Votes:

0

Dear nativevelan

The auto-numbering can be turned off with a registry setting.

There is no placeholder for hostnames. I put that suggestion on our list where we collect user feedback.

Created on Apr 15, 2015 1:46:35 PM by  Arne Seifert [Paessler Support]



Votes:

0

Hello Mr. Seifert,

any updates on this ?

We'd like to use this feature also, for we are adding sensors with templates a lot. Having a possibility to use variables/placeholders like %devicename would make it a lot easier to add sensors.

The problem about sensors beeing added with a sensorname followed by an incremental number is, that when we are adding lots of sensors to a library using filters will cut off the devicetree leaving only the sensorname and it's not very helpful beeing in need to hover on that sensor to see which device the sensor belongs to...

is there any posibily to keep the device (name) in the library when using filters on sensortypes ?

thank you in advance

Created on Oct 28, 2015 10:21:20 AM



Votes:

0

Dear Mr. Panknin

Please don't expect such placeholder in the foreseeable future. While we plan to improve the auto-discovery handling, no decisions about the depth and scope have been made yet.

Libraries in PRTG are a collection of sensors, their parent device is not visible from the library view.

Please allow me to elaborate on the auto-discovery. We don't want to add feature after feature and then end up with a very complex system. We are aware of certain limitations, but decided it is not the right way to just pile on some options and placeholders.

Created on Oct 28, 2015 12:48:03 PM by  Arne Seifert [Paessler Support]



Votes:

1

Dear Mr. Seifert,

Thank you for your response to this thread. I am saddened by Paessler's decision to exclude this feature request from auto-discovery, and strongly suggest you revisit with your colleagues. There is nothing more frustrating that trying to diagnose an issue with multiple alerts and be faced with PING1-PING23 in DOWN status then having to drill into each of those to determine what they are. We are not asking for different interactive functionality. We are simply asking for a better template system so that we can work with the system more easily.

Created on May 26, 2016 7:59:01 PM



Votes:

1

According to this Thread it will great if we can use several placeholders like %ip, %hostname etc. If you discover an Subnet and use template Ping for example, you get more than 200 new Sensors named PINGXXX. You have to modify them manually.

Created on Aug 3, 2016 7:24:45 AM



Votes:

-1

For the time being, no placeholders are planned for device templates. It looks like an easy change, but it is not.

We are aware of the ongoing demand for this, but still feel that using a placeholder in templates might not be the best possible solution. Any solution to increase the visibility of the parent device for ping sensors implies changes deep in PRTG. We want to make sure to get the right one before we implementing something.

Created on Aug 3, 2016 9:56:36 AM by  Arne Seifert [Paessler Support]



Votes:

0

I too would like to see this feature in a future update. When adding groups of devices, we have to manually rename all of the sensors on every device. It is a very monotonous and tedious task, being able to automate or adjust the name of sensors on a device would be a boon to our productivity. While attempting to add this to our ping sensors, I added a new .odt file in the devicetemplates folder using the generic ping .odt file:

Original:

<create id="pingsensor" kind="ping" requires="ping" displayname="Ping">

I tried as a new .odt file with both these, but they still add with just the name Ping:

<create id="pingsensor" kind="ping" requires="ping" displayname="%name - Ping">
<create id="pingsensor" kind="ping" requires="ping" displayname="$name - Ping">

I also tried making a new ping_sensor.htm in the webroot/help folder, but that didn't work either

Created on Dec 11, 2019 3:37:18 PM



Votes:

0

Dear ryankane1,

we get a lot of feedback for PRTG, including many good ideas, but we cannot implement everything. Doing one thing means to not do another thing at that time. Adding placeholders for device template does not have the priority to be implemented soon.

As alternative, you can use the PRTG API to read the host property and to set a new sensor name.

Created on Dec 12, 2019 1:27:44 PM by  Arne Seifert [Paessler Support]



Votes:

0

Has anyone ever thought about writing a customer sensor or API for ping with hostname in a 2nd channel?

Created on Sep 23, 2020 3:52:23 PM



Votes:

0

Hello,

in PRTG, a sensor channel stores numbers. String usage is only possible with pre-defined lookup tables. A channel cannot be set to an arbitrary strings.

Created on Sep 24, 2020 2:43:43 PM by  Arne Seifert [Paessler Support]



Votes:

0

Hallo Herr. Seifert...

This would be a handy feature indeed... If it could work like the SNMP labeld, when '[OID]' gets replaced with content Like: displayName="Uptime [1.3.6.1.2.1.1.5.0]" gets replaced with "Uptime hostname"

Along those same lines... Is there a way to specify that the ping sensors should be "Master for Parent" in a template...

Vilen Dank...

Created on Oct 22, 2023 11:02:09 PM by  JR Andreassen (10) 2



Votes:

0

Hello JR,

for improved device templates, we have no short-term plans. A problem with things like placeholders is that the overall usage rate would be quite small, development tries to implement features with wider usage rate. I agree that for a more automated sensor management, naming flexibility would be useful in templates.

The first ping sensor created by auto-discovery should be automatically set as master for parent, even with no such explicit setting in the device template.

Created on Oct 24, 2023 1:07:00 PM by  Arne Seifert [Paessler Support]




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.