Security

Is there a way to access the Splunk Web UI using curl?

shangshin
Builder

Hi,

Is there a way to access Splunk Web UI by using curl? I am able to access it by using the management port 8089, but still need to access the UI via web port 8000

I got the error message below when using using curl:

curl -sku admin:changeme http://mysplunkserver:8000/

This resource can be found at <a href='http://mysplunkserver:8000/en-US/'>http://mysplunkserver:8000/en-US/</a>.507 
Tags (3)
0 Karma
1 Solution

somesoni2
Revered Legend

If you just want to refresh one endpoint, you can try any one of these method

curl -k -u admin:changeme https://splunkserver:8089/services/configs/conf-alertactions/_reload

OR

(after cd to splunk's bin directory)

./splunk _internal call /configs/conf-alertactions/_reload -auth admin:changeme 

View solution in original post

somesoni2
Revered Legend

If you just want to refresh one endpoint, you can try any one of these method

curl -k -u admin:changeme https://splunkserver:8089/services/configs/conf-alertactions/_reload

OR

(after cd to splunk's bin directory)

./splunk _internal call /configs/conf-alertactions/_reload -auth admin:changeme 

shangshin
Builder

Thanks a lot for the info.

I tried both options and got HTTP Status: 200

However, after executing the command, I didn't see the change reflected on the Email Settings of Splunk web UI below.

http://splunkserver:8000/en-US/manager/launcher/admin/alert_actions/email?action=edit

Maybe I should try different REST path? Can you direct me where to get a list of all REST paths?

0 Karma

shangshin
Builder

I found it from the online doc. Thanks again!

0 Karma

somesoni2
Revered Legend

Any specific requirement for "accessing" Splunk Web from curl? A curl command is typically used to transfer data/receive data from a server/url without user interaction, that's why it does work with Management port.

0 Karma

shangshin
Builder

I want to refresh this configuration /debug/refresh?entity=admin/alert_actions

Please advise if you know I can achieve the same goal using management port. Thank you!

0 Karma

masonmorales
Influencer

What are you trying to accomplish by accessing splunkweb via curl?

0 Karma

shangshin
Builder

I want to refresh this configuration /debug/refresh?entity=admin/alert_actions

There is an app called add-on debug refresh but the refresh command takes more than 2-3 minutes to complete. On the other hand, the url completes within 5-10 seconds.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...