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
Ultra Champion

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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...