-
Problem report
-
Resolution: Fixed
-
Minor
-
None
-
1.4.2
-
None
For optimize the run of external scripts, suggest send the DNS name or IP address of hosts to scripts, instead of sending the hostname.
This will help in the creation of templates and is similar to Nagios
Alter is easy and simply changing the file src/server/poller/checks_external.c to:
========================================================================================
+++ checks_external.c 2007-11-13 17:14:00.537034273 -0200
@@ -86,7 +86,8 @@
return NOTSUPPORTED;
}
- zbx_snprintf(cmd, MAX_STRING_LEN-1, "%s/%s %s %s", CONFIG_EXTERNALSCRIPTS, scriptname, item->host_name, params);
+ zbx_snprintf(cmd, MAX_STRING_LEN-1, "%s/%s %s %s", CONFIG_EXTERNALSCRIPTS, scriptname, item->useip==1 ? item->host_ip : item->host_dns, params);
zabbix_log( LOG_LEVEL_DEBUG, "%s", cmd );
if (NULL == (fp = popen(cmd, "r")))
{
=========================================================================================