Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Perform a oneshot file upload
*/
private static void uploadFileExample() {
Service splunkService = connectAndLoginToSplunkExample();
// Retrieve the index for the data
Index myIndex = splunkService.getIndexes().get("main");
// Specify a file and upload it
String uploadme = "/Users/ddallimore/conf_demo.txt";
myIndex.upload(uploadme);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.