Splunk Enterprise

Removing the Port Number from the "Link Hostname" in Splunk Emails

Keigo
Explorer

Hello everyone,

I'm seeking guidance regarding the links included in alert and report action emails sent from Splunk.

Please excuse me if the following English is awkward, as I used a translation tool.

Is it possible to remove the port number from the "View Result" hyperlink in the email body?

Specifically, I want to change the link format from: hostname.com:8000/app/search...

to: hostname.com/app/search...

Context: Our web access environment uses a proxy setup: Client -(HTTPS)-> Proxy -(TCP:8000)-> Splunk Web

Because of this configuration, the actual access to Splunk Web is effectively set to use port 8000, which is why the port number is currently included in the generated link.

Any advice or recommended configuration changes would be highly appreciated!

Thank you!

Labels (2)
0 Karma

PrewinThomas
Motivator

@Keigo 

Yes you can change this. [email] stanza in alert_actions.conf (or in the UI under Settings → Server settings → Email settings) is what Splunk uses when it builds the “View Results” link in alert emails. The hostname key there overrides whatever Splunk would normally derive from the local web listener

Edit alert_actions.conf and set the hostname

[email]
hostname = https://hostname.com

or with Splunk UI,

Go to Settings > Server settings > Email settings > Find the Link hostname field and set it

 

Regards,
Prewin
🌟If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!

0 Karma

Keigo
Explorer

We have already implemented the suggested configuration, but the resulting hyperlinks still include the port number, which is why we are reaching out with this question.

Specifically, we edited the Link hostname via the Web UI at Settings > Server settings > Email settings. We also confirmed that the same setting configured in the Web UI was correctly reflected in the alert_actions.conf file.

0 Karma

PrewinThomas
Motivator
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...