Is there some proper way to update Windows Zabbix agents? I have installed agents with pretty much default settings across entire domain, but in our environment we have multiple domains, and came across problem that when I have same server name in different domains, only the first agent will show up. So I started looking around how to register agents with hostname being FQDN.
So for example before server was named "CRL", and now it's named "CRL.domain.com" and "CRL.otherdomain.com".
I simply copied new config file to server with installed Zabbix agent, and only added one line to it:
HostnameItem=system.run["powershell -NonInteractive "[System.Net.Dns]::GetHostByName(($env:computerName)).Hostname.ToLo wer()""]
After restarting the Zabbix agent, it's now registered with FQDN, but there is old hostname showing in my host list.
So now I have both CRL and CRL.domain.com in list of hosts.
Is there any better way to change hostnames of all already installed Windows agents from default hostname to FQDN, without having to worry about duplicates?
So for example before server was named "CRL", and now it's named "CRL.domain.com" and "CRL.otherdomain.com".
I simply copied new config file to server with installed Zabbix agent, and only added one line to it:
HostnameItem=system.run["powershell -NonInteractive "[System.Net.Dns]::GetHostByName(($env:computerName)).Hostname.ToLo wer()""]
After restarting the Zabbix agent, it's now registered with FQDN, but there is old hostname showing in my host list.
So now I have both CRL and CRL.domain.com in list of hosts.
Is there any better way to change hostnames of all already installed Windows agents from default hostname to FQDN, without having to worry about duplicates?
Comment