Splunk Enterprise

Splunk URL is not correct for my Splunk Alerts

RAVISHANKAR
Explorer

Splunk URL contains only the hostname in all my Splunk alerts and it's not reproducing the correct URL instead it's just giving only the hostname.

For Ex - In my Splunk alerts it contains the URL like below;

http://hostname:8000/app/search/

But it should be 

http://hostname.domain.com/app/search

What could be the cause?

Thanks


0 Karma
1 Solution

livehybrid
SplunkTrust
SplunkTrust

Hi @RAVISHANKAR 

You need to set the value of 'hostname' in local/alert_actions.conf under the email stanza:

[email]
hostname = http://hostname.domain.com

Check out https://community.splunk.com/t5/Alerting/Is-there-a-way-to-modify-alert-url-results-url-in-email-ale... for more info

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

View solution in original post

arughra
Observer

Not sure why its not mentioned anywhere but if you're trying to modify the splunk url for an integration(eg. alert to pagerduty)  , I found that I had to modify the command field in pagerduty_incidents app to remove `results_link=%results.url%`

should be :

/etc/apps/pagerduty_incidents/local/alert_actions.conf

[pagerduty]
command = sendalert $action_name$ results_file="$results.file$"
hostname = http://hostname.domain.com

 

 

 

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @RAVISHANKAR 

You need to set the value of 'hostname' in local/alert_actions.conf under the email stanza:

[email]
hostname = http://hostname.domain.com

Check out https://community.splunk.com/t5/Alerting/Is-there-a-way-to-modify-alert-url-results-url-in-email-ale... for more info

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

RAVISHANKAR
Explorer

Thanks @livehybrid  - It works 🙂 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...