I am using a template which discovers Unifi devices from Unifi server with Unifi API. Unifi devices in Unifi are organised by site, of which we have 30 [on this first instance I am testing with].
This is the template I am working with:
The issue I have is that Unifi devices do not necessarily have a globally unique name; they only have to be unique per site, so lots of "AP1", "AP2", "Switch 1", etc. The template is applied to Unifi per-site [this is fine, I don't want everything discovered], so there should be an opportunity here to insert a label in to the host names.
What I have tried so far:
- Set a macro on the parent host {$UNIFI.SITENAME}, and include this in the host visible name prototype. The macro is inherited by the created hosts [great!] but not resolved [boo] .
- Edit the hostname prototype on the parent host. Not possible, it's greyed out.
How can I achieve this?
This is the template I am working with:
The issue I have is that Unifi devices do not necessarily have a globally unique name; they only have to be unique per site, so lots of "AP1", "AP2", "Switch 1", etc. The template is applied to Unifi per-site [this is fine, I don't want everything discovered], so there should be an opportunity here to insert a label in to the host names.
What I have tried so far:
- Set a macro on the parent host {$UNIFI.SITENAME}, and include this in the host visible name prototype. The macro is inherited by the created hosts [great!] but not resolved [boo] .
- Edit the hostname prototype on the parent host. Not possible, it's greyed out.
How can I achieve this?
Comment