All Apps and Add-ons

Splunk Add-on for Java Management Extensions: Is there a way to configure the hostname to not show the port number?

TimEek
Path Finder

I'd like the hostname to just be the hostname, no port number. In the release notes, they state that this is how they want to show the hostname, but we don't need the port number. There is a workaround by using tags, but that's more troublesome that we'd like. Is there a way to configure it?

0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

Hi @TimEek,

I have solution for this problem, if you are running Splunk_TA_jmxapp on heavy forwarder then please add below config on Heavy Forwarder.

Please create new file $SPLUNK_HOME/etc/apps/Splunk_TA_jmx/local/transforms.conf and add below code in that file and then restart splunk on heavy forwarder.

[extract-host]
SOURCE_KEY = MetaData:Host
REGEX = host::([a-zA-Z0-9\._-]+)

Hope this resolve your problem because it is working for me.

Thanks,
Harshil Marvania

0 Karma

hunters_splunk
Splunk Employee
Splunk Employee

Hi TimEek,

You can go to $splunk_home and use the following commands to change the servername and default hostname:

splunk set servername new_servername
splunk set default-hostame new_hostname

You can also do this in Splunk Web: under the Settings menu, go to Server Settings > General Settings and change the values for the Splunk server name and Default host name fields.

Hope this helps. Thanks!
Hunter

0 Karma

ddrillic
Ultra Champion

Tim, can you please attach a screenshot to show us what you are referring to?

0 Karma

TimEek
Path Finder

The hostname is what we defined, but it doesn't show up. Instead the longer hostname with port number shows up..

alt text

0 Karma

TimEek
Path Finder

Hello,

when using the "show hostname" command, it shows the hostname WITHOUT the port number. In Splunk it still shows the port number. This is what is confusing. In the release notes it does state that from this point it shows the host and the portnumber but I'd imagine being able to not show the port number?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...