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

Device Template hostname

Votes:

0

Your Vote:

Up

Down

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 by  nativevlan (0) 1

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



11 Replies

Votes:

1

Your Vote:

Up

Down

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 by  Johannes Lohrer (10)



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Simon Panknin (0)



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  jschiller (10)



Votes:

1

Your Vote:

Up

Down

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 by  Peter Blumenau (10) 1



Votes:

-1

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  ryankane1 (0) 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  MaFi (0)



Votes:

0

Your Vote:

Up

Down

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]



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.