Syslog unable to find corrext hostname

SUSE Linux Enterprise 15 on VMware.

In the syslog i find the templatename instead of the hostname. The error im getting is:
TEMPLATESLES15SP3 rsyslogd: getaddrinfo failed obtaining local hostname - using ‘TEMPLATESLES15SP3’ instead; error: No address associated with hostname [v8.2106.0]

Any advice would be appriciated