Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Simple example that gets Splunk server info and settings
*/
public static void getServerInfoExample() {
Service splunkService = connectAndLoginToSplunkExample();
ServiceInfo info = splunkService.getInfo();
System.out.println("Info:");
for (String key : info.keySet())
System.out.println(" " + key + ": " + info.get(key));
Entity settings = splunkService.getSettings();
System.out.println("\nSettings:");
for (String key : settings.keySet())
System.out.println(" " + key + ": " + settings.get(key));
}
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.