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
Explorer

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
Explorer

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
Explorer

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
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>