Activity Feed
- Posted Which is better when connect Splunk from custom rest endpoint file? on Splunk Enterprise. 11-14-2022 06:36 AM
- Tagged Which is better when connect Splunk from custom rest endpoint file? on Splunk Enterprise. 11-14-2022 06:36 AM
- Tagged Which is better when connect Splunk from custom rest endpoint file? on Splunk Enterprise. 11-14-2022 06:36 AM
- Tagged Which is better when connect Splunk from custom rest endpoint file? on Splunk Enterprise. 11-14-2022 06:36 AM
- Posted Re: How to debug custom rest endpoint in development on Splunk Dev. 10-23-2022 08:04 PM
- Posted How to debug custom rest endpoint in development? on Splunk Dev. 10-21-2022 01:55 AM
- Tagged How to send mail from Splunk app? on Splunk Dev. 10-19-2022 04:43 PM
- Tagged How to send mail from Splunk app? on Splunk Dev. 10-19-2022 04:43 PM
- Posted Re: How to send mail from Splunk app? on Splunk Dev. 10-19-2022 04:42 PM
- Posted How to send mail from Splunk app? on Splunk Dev. 10-19-2022 03:25 AM
- Posted Re: How to call custom rest api with SplunkJS SDK in app? on Splunk Dev. 04-05-2022 07:10 PM
- Posted How to call custom rest api with SplunkJS SDK in app? on Splunk Dev. 04-04-2022 11:24 PM
- Tagged How to call custom rest api with SplunkJS SDK in app? on Splunk Dev. 04-04-2022 11:24 PM
- Posted How to access lookup with Splunk JS SDK? on Splunk Dev. 03-31-2022 01:42 AM
- Posted Re: How to make a custom REST endpoint in Splunk? on Splunk Enterprise. 03-29-2022 02:03 AM
- Posted How to run script input after completing setup add-on? on Splunk Dev. 03-12-2022 07:33 AM
- Tagged How to run script input after completing setup add-on? on Splunk Dev. 03-12-2022 07:33 AM
- Tagged How to run script input after completing setup add-on? on Splunk Dev. 03-12-2022 07:33 AM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |
11-14-2022
06:36 AM
Hi guy,
I am using Splunk UI to develop new app on the Splunk
My app has components:
Setup page: let people provide some configuration such as Splunk Token, Splunk HEC token, Proxy config
App component:
Custom Rest endpoint (python)
From the app comment, I will make some calls to the custom rest endpoint to get / process data.
On the setup page, I save all configurations into KV-store, to re-use
So my question is:
- How custom rest endpoint script (python file) can get information from KV-store, as you know, with python SDK, need a credential to authorize with Splunk. Have any way to connect Splunk from the custom rest endpoint script without authen?
- Which place is better to save credentials or configurations in Splunk? kv sore? storage password or config file
- If does not any way to authen with Splunk from Custom rest endpoint without credentials, how can pass credentials to rest endpoint? Enter credential into config file? or attach credentials in the param request when we call the rest endpoint?
Thank! P/s: The first time I see a big platform have many version/options to develop, It make develop is confused ( Splunkjs, Splunk SDK, Splunk UI ...)
... View more
Labels
- Labels:
-
development
10-23-2022
08:04 PM
thank @richgalloway for your suggestion, but how can I check which line error is in my code? Normally, I use to debug on python but with Splunk, It is very hard. Actually, I am using a logger to check which line of code error
... View more
10-21-2022
01:55 AM
Hi everyone,
I am following guide to create new custom REST endpoint, but I have problem on debug my code in local. How I can debug python code local. Currently, I am using Splunk Docker and mount local app to Splunk container. After every time changed code, I must refresh debug on Splunk. It is very taken time. Does everyone have other way to debug python code on Splunk.
Thank.
... View more
10-19-2022
03:25 AM
Hi everyone,
I am using Splunk UI (Splunk Design System) to develop the Splunk App (with ReactJs)
I want to send the email from my app( use Splunk SMTP setting).
My app is allowing users can select the sender, recipient (to, cc, bcc), body. So my question is: Can we get the SMTP setting from Splunk? How can I send the email from app with Reactjs, does Splunk JS SDK support it?
I knew I could create a custom rest endpoint with a python script to create send mail endpoint backend API but it is very complex. I want to find another way.
Thank!
... View more
- Tags:
- splunk react
- splunkui
04-05-2022
07:10 PM
I found the solution, two things need to know in here: For the first one, we can call a custom service endpoint with a proxy, in this case, the proxy is Splunk web (splunk-server:8000). It means you can call https://x.x.x.x:8000/en-US/splunkd/__raw/services/api-path Replace for rest endpoint https://x.x.x.x:8089/servicesNS/-/<my-app>/api-path The second one, use the request function instead of the post function in SPlunkJS SDK for more customize. https://docs.splunk.com/DocumentationStatic/JavaScriptSDK/1.0/splunkjs.Service.html#splunkjs.Service^request My sample code: service.request("/services/my-api-path","POST", {}, {}, JSON.stringify(params), {'Content-Type': 'application/json'}, function(err, resp) {
// Handle response
if(resp != null){
if(resp.status == 200){
//do something
} else {
//do something with status !=200
}
}
// Handle error
if(err != null){
//handle error
}
});
... View more
04-04-2022
11:24 PM
I'm developing a new app with react js and SplunkJS SDK.
In my app, I want to call a custom endpoint service that locates in the same app with a URL
https://x.x.x.x:8089/servicesNS/-/<my-app>/run
In my call, I'm trying to call a custom endpoint:
handleSplunkConnect(event) {
let http = new splunk_js_sdk.SplunkWebHttp();
return new splunk_js_sdk.Service(
http,
application_name_space,
);
}
makeCloudFlareAction(event){
let service = this.handleSplunkConnect() //make splunk service connect
let params = {
"customer": "JAUC-011",
}
service.post("/servicesNS/-/<my-app>/run", params, function(err, resp) {
console.log(resp)
console.log(err)
});
But I see the URL request is `https://x.x.x.x:8000/en-US/splunkd/__raw/servicesNS/-/<my-app>/run?output_mode=json` instead of `https://x.x.x.x:8089/servicesNS/-/<my-app>/run?output_mode=json`
My question is how can I call a custom endpoint service with Splunk:8089 by using SplunkJS SDK? OR, Can I call a custom endpoint service with port 8080 (web) instead of 8089 (splunkd) ?
... View more
- Tags:
- endpoint service
03-31-2022
01:42 AM
Hi everyone,
I am trying to develop some apps in spunk with React and JS. I want to access Splunk lookup and get data from lookup but I do not see and function in SDK to help collect the lookup file.
https://docs.splunk.com/Documentation/JavaScriptSDK
So how can I get the lookup file?. I think I can make a new search "| inputlookup" and get the search result.
... View more
- Tags:
- lookup
03-29-2022
02:03 AM
But don't have an example for the POST endpoint. Overall, I think the document in Splunk is not good, not enough for a newbie. IBM QRadar and ELK have good document to development
... View more
03-12-2022
07:33 AM
Hi,
I'm a newbie in developing Splunk add-on. My add-on has a setup view (with a setup page). I am using Splunkjs and follow Splunk add-on sample app on GitHub. Splunk JavaScript SDK
I configured with input script (call python script) and set interval to schedule run script automatic.
But I want to run the python script for the first time, after completing the add-on setup. How can do that?
Or can I create the button on the Setup page to manually run script input?
Thank for help
... View more