I have a Unix template that among other monitors, has a ping and port monitor. This template has a %%hostname%% variable and a %%ip%% variable. For the ping and port monitor, the 'Hostname to resolve' value in the template is %%ip%%. The template group name is %%hostname%%-%%ip%%. When publishing changes to this template, if the hostname has a dash in it, such as unx-svr1, the %%ip%% variable for the 'Hostname to resolve' is updated to an incorrect value that appears to first join the %%hostname%% variable with the %%ip%% variable, then split it on the first occurance of a dash.
For example, let's say we have a host using the template with the variable %%hostname%% set to unx-srv1 and the %%ip%% variable set to 192.168.1.10. After making any changes to the template, the 'Hostname to resolve' value in the ping and port monitors will be as follows:
This causes the monitors to fail, as the value can no longer be resolved.
Is this a known bug? If so, is there a fix for it? If not, what would it take to get a fix in place? I can export the template and attach if necessary.
I have attached multiple screenshots to show exactly what is happening.
remote_server_details.png - the remote server template
template.png - the template
ping_monitor_template.png - the template for ping
port_monitor_template.png - the template for port monitoring
host_with_template.png - a host that is using the template
ping_monitor_before_update.png - the ping monitor before publishing changes via 'Publish Changes'
port_monitor_before_update.png - the port monitor before publishing changes via 'Publish Changes'
ping_monitor_post_update.png - the ping monitor after publishing changes via 'Publish Changes'
port_monitor_post_update.png - the port monitor after publishing changes via 'Publish Changes'
Looks like I can only attach 5 items to a post. I'll attach the rest to a reply to my own post.