-
New Feature Request
-
Resolution: Won't fix
-
Trivial
-
None
-
None
-
Windows
In the agent configuration file, when leaving Hostname undefined (it's commented out), reads HostnameItem to determine the system's hostname. I took advantage of this situation in the following way:
Configuration file snippet:
# Hostname=Windows host HostnameItem=system.run[powershell -NonInteractive "[System.Net.Dns]::GetHostByName(($env:computerName)).Hostname.ToLower()"]
This works OK for zabbix_agentd.exe, but does not work for zabbix_sender.exe:
Program output:
C:\Windows\system32>"%ProgramFiles%\zabbix_sender" -v -c %ProgramData%\Zabbix\Agent\zabbix_agentd.conf -k test -o "%Date% %Time%" zabbix_sender [4920]: Warning: 'Hostname' parameter required sent: 0; skipped: 1; total: 1
Expected behaviour: zabbix_sender.exe falls back to HostnameItem if Hostname is undefined like zabbix_agentd.exe does.
- is duplicated by
-
ZBXNEXT-2903 zabbix_sender and default hostname in config file
- Closed
-
ZBX-6845 Zabbix_sender does not send traps if Hostname is not defined in zabbix_agentd.conf
- Closed