Splunk search for Get Hostname and FQDN of Search Head
Copy
| rest splunk_server=local /services/server/info | table host host_fqdn host_resolved
This Splunk search will output the host name of the Search Head you run it on. The search will provide a table with the host name, the host fully qualified domain name (FQDN) and resolved hostname.