Getting Data In

In deploymentclient.conf, how can we use a variable to mention the hostname of the machine for the clientname entry?

raju4244
Explorer

Dear All,

In our environment, we are planning to push a splunkforwarder to a Windows server. Part of that, we are copying deploymentclient.conf file to each and every machine.

My requirement is,

In deploymentclient.conf, there is a entry for clientname=<hostname>.

How can we use a variable to mention the hostname of the machine for clientname entry.
Thanks

0 Karma

afret2007
Path Finder

clientname = $HOSTAME under the deployment-client stanza is all you need to do.

  1. Create an APP called something like mydeploymentclient.
  2. Create a local directory folder under the mydeploymentclient APP folder
  3. In local directory folder copy or create deploymentclient.conf into it.
  4. Edit deploymentclient.conf to insert this stanza. [deployment-client] clientname = $HOSTNAME
  5. Add APP directory folder to deployment-apps of your deployment server
  6. Use forwarder management UI and add APP to your server class
  7. Run command 'Reload deploy-server' afterwards and your changes will take place.

afret2007

hagjos43
Contributor

When you install splunk it will automagically grab the hostname of the host you are installing splunk on. We use a silent install script that simply installs the splunk forwarder and points the host to the deployment server. The script looks like this:

msiexec.exe /i splunkforwarder-6.2.4-271043-x64-release.msi DEPLOYMENT_SERVER="hostname:8089" AGREETOLICENSE=Yes /quiet

Again it will automatically use the hostname that was assigned to the machine.
Hope that helps!

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...