Installation

How to use server.conf delivered to a series of UFs with mix of FQDM and short hostnames Linux 8.2.9?

taldavita
Explorer

Good day All!

UF version 8.2.9 on a series of Linux machines.

I've an application containing local/server.conf deploying to a series of Linux machines.

The machines have a mixed configuration of short and fqdn as the hostname. For consistence, want to use the short name.

Each instance environment contains a variable called HOST_EXTERNAL which is the short name.

The documentation states:

* Can contain environment variables.
* After any environment variables are expanded, the server name
  (if not an IPv6 address) can only contain letters, numbers, underscores,
  dots, and dashes. The server name must start with a letter, number, or an
  underscore.

ERROR: serverName must start with a letter, number, or underscore. You have: $HOST_EXTERNAL

ServerName is only set in the apps/app-name/local and system/default/server.conf. 

system/default/server.conf:serverName=$HOSTNAME

app-name/local/server.conf:serverName = $HOST_EXTERNAL

Googling, doesn't produce any examples of using an environment variable other than $HOSTNAME.

What am I missing on attempting to use $HOST_EXTERNAL as serverName in server.conf

Thoughts?

Labels (3)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @taldavita,

Splunk does not resolve system variables on server.conf other than $HOSTNAME. That is why you should think of a script to get $HOST_EXTERNAL value and update server.conf.

If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

scelikok
SplunkTrust
SplunkTrust

Hi @taldavita,

Splunk does not resolve system variables on server.conf other than $HOSTNAME. That is why you should think of a script to get $HOST_EXTERNAL value and update server.conf.

If this reply helps you an upvote and "Accept as Solution" is appreciated.
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...