I have several hosts using systemd-journal-upload to send their logs to my systemd-journal-remote server. The name of the files in /var/log/journal/remote are remote-[IP_ADDR].journal but I'd like them to be remote-[HOSTNAME].journal. How do I do this?


The remote journals should be saved to files named remote-hostname.journal, so if you're getting IP addresses instead, it means you have DNS resolution problems that make systemd-journal-remote have to fall back to IP addresses.

From the systemd-journal-remote man page:

Files will be called remote-hostname.journal, where the hostname part is the escaped hostname of the source endpoint of the connection, or the numerical address if the hostname cannot be determined.

If that's not working, check if DNS resolution is working as expected, with commands such as host ip-address (for example, host if that's one of your IP addresses) and confirm it returns the correct expected hostname.

(You might need direct DNS to match it as well, make sure that host hostname resolves back to the same IP address.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.