Splunk Dev

java sdk example run error

joy76
Path Finder

I tried to run the Search example in 'http://dev.splunk.com/view/java-sdk-getting-started/SP-CAAAEDF'

C:\Program Files\splunk-sdk-java>java -jar dist/examples/search.jar "search * | head 10" --output_mode=csv

result :
Error: query 'search * | head 10' is invalid:

What is the problum?

Tags (2)
0 Karma

wcolgate_splunk
Splunk Employee
Splunk Employee

Sounds like we could do with better error reporting. I'll see to it that this is fixed.

0 Karma

joy76
Path Finder

I got it the problum.
Maybe i think .splunkrc file configuration is wrong.

So, Below is run well.

java -jar dist/examples/search.jar --username "admin" --password "changeme" "search * | head 10" --output_mode=csv

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...