Questions tagged [splunk-sdk]
69 questions
5
votes
0 answers
Example logging to Splunk w/ React 16+
I am looking for examples showing how to write log messages to Splunk from a React JS 16+ application. Splunk has a TypeScript snippet in their docs, but I am interested in seeing how others have tied it into the React framework so everything is…

SonOfPirate
- 5,642
- 3
- 41
- 97
5
votes
2 answers
Splunk how to combine two queries and get one answer
I am very new to Splunk and basically been dropped in the deep end!! also very new to language so any help and tips on the below would be great.
The out come i am trying to get is to join the queries and get Username, ID and the amount of…

James
- 51
- 1
- 1
- 3
3
votes
0 answers
Splunk rest curl query fails to execute on the successive attempts with the session key authorization
First attempt creates the splunk SID, but fails on the successive attempts to create search id.
Same issue occurs while polling/consuming the search after SID creation on its successive attempts. Can anybody point out helping the missing part?
Curl…

sathish
- 65
- 8
2
votes
4 answers
Splunk limits the results returned by stats list() function
I have a splunk query which returns a list of values for a particular field. The number of values can be far more than 100 but the number of results returned are limited to 100 rows and the warning that I get is this-
'stats' command: limit for…

Kunal gupta
- 481
- 2
- 7
- 19
2
votes
1 answer
Is there a similar command to multisearch in Splunk for non-streaming searches?
I understand in Splunk that multisearch allows multiple searches to run in parallel. However, it's only for streaming searches. Is there a similar command or way to run non-streaming searches in parallel?

unknown.
- 21
- 3
2
votes
1 answer
PyCharm doesn't Splunk SDK (splunklib)
I have a simple python script that calls the Splunk API. For this, I include splunklib:
"import splunklib.client as client"
This script works very well, when I start it from a terminal window (MacOS): python3 main.py
For this, I had to install…

PeterT
- 63
- 1
- 6
2
votes
0 answers
How to convert from curl to python
How to convert this to python requests?
curl --noproxy '*' -H "Content-Type: application/json; charset=utf-8" \
-k --user "admin:password" \
-d"search=| savedsearch mysearch" \
-X POST 'https://splunk:8089/services/search/jobs'
def…

Grandad36
- 75
- 1
- 7
2
votes
1 answer
Splunk search query with where clause not working
I am using Splunk java SDK to search pattern from Splunk server. I am using pattern
search index=* env=* (GET OR POST OR PUT OR DELETE) | where isNum(httpStatusCode)
when I am using this query with Java SDK, Splunk is not sending any event. But…

Gopal Kumar
- 147
- 1
- 10
2
votes
2 answers
write log entry to splunk via HTTP in python
We have a python program that needs to send logs to splunk. Our splunk admins have created a service collector HTTP endpoint to publish logs to with the following:
index
token
hostname
URI
We can't find where to input the URI in the splunk python…

Lightbeard
- 4,011
- 10
- 49
- 59
1
vote
1 answer
Splunk python SDK to upload a CSV file to lookup table of specific destination app
I want to automate uploading a csv file to lookup tables of a specific destination app in my splunk. I can do this from splunk GUI as shown below, however I was trying to find a way to do it from python. I tried the following code which doesn't seem…

user1614862
- 3,701
- 7
- 29
- 46
1
vote
0 answers
SPLUNK MINT throwing ssl error in Android studio
when I run my program its throwing "ssl error" and "remote host terminated the handshake".
Currently I am using the below library in build.gradle. I have tried upgrading to 5.2.5 but in its website it shows they have stopped the service. Even tried…

Meena kovaski
- 19
- 3
1
vote
2 answers
How to batch the app events with max of 1000 events per second when using Splunk HTTP Event Collector (HEC)
I need to send the batched events to Splunk HTTP Event Collector, say 1000 events per second.
Below is the example of 5 log events that are sent to Splunk HEC -
% curl…

MichealMills
- 315
- 5
- 15
1
vote
0 answers
Cant connect to splunk using splunk-java sdk with any of TLS Versions
I have followed these examples to connect splunk using java-sdk. But I am unable to connect using any of TLS versions shown in this example. Disabling the security (one of the option provided to connect) is not a viable option in my case. I really…

Ashok Gudise
- 79
- 1
- 7
1
vote
1 answer
Splunk Java SDK takes too much time to get result
I am trying to get 10 events from Splunk. But it takes more than 40 minutes when UI returns results less than 1 sec
String token = "token";
String host = "splunk.mycompany.com";
Map result = new HashMap<>();
…

user9527149
- 11
- 1
1
vote
1 answer
How do I set TTL for oneshot search in Splunk API using Python?
I am intermittently getting the following error back from the Splunk API (about 40% of the time search works as expected):
HTTP 503 Service Unavailable -- Search not executed: This search could
not be dispatched because the role-based disk usage…

zenijos10
- 205
- 3
- 8