Different node hostname result types for REST API

i have setup two graylog clusters in my lab using different DNS server types, one is named-chroot, another is dnsmasq come with openstack. but i found the following REST API will return hostname in different types(i.e. FQDN vs IP)

REST API:

GET /system

on named-chroot, i have create both A and PTR RR for the graylog node, and i got FQDN hostname value as:

REST API response:

{
  ...
  "hostname": "gl1.mylogs.com",
  ...
}

on dnsmasq, i have added one andress line for the graylog node, and i got hostname value in IP.

dnsmasq configuration:

address=/gl1.mylogs.net/10.10.31.23

REST API response:

{
   ...
  "hostname": "10.10.31.23",
   ...
}

But i really prefer the FQDN one. Does this different behavior relate to the PTR RR presents or not ?

–charles

Graylog gets it hostname from the OS so it depends how that hostname resolve local on the server where Graylog is installed. That does not play into DNS resolution - only if the OS takes the hostname from that.

Thanks Jan. but how can I check the hostname offered by OS to graylog in linux shell? i have checked it by shell command “hostname”, the output is FQDN instead of IP.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.