Some of our hosts (CentOS, macOS) report FQDN thro...
# general
s
Some of our hosts (CentOS, macOS) report FQDN through
gethostname
. Some (Ubuntu) report only the DNS hostname with
gethostname
. This causes the
hostname
field in
system_info
to be inconsistent. It would be nice to be able to get FQDN. Would it be acceptable to replace the
gethostname
call with a call to
getaddrinfo
and use the
ai_canonname
field to get the canonical FQDN? Or should this be another column in the
system_info
table?