Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
26 changed files
with
1,165 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
# ifeq ($(OS), Windows_NT) | ||
# SEPERATOR=; | ||
# else | ||
# SEPERATOR=: | ||
# endif | ||
clean: | ||
mvn clean | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
java/src/main/java/com/splunk/examples/event_types/Program.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.splunk.examples.event_types; | ||
|
||
import com.splunk.*; | ||
|
||
import java.util.Map; | ||
|
||
public class Program { | ||
|
||
public static void main(String[] args) { | ||
Command command = Command.splunk("event_types").parse(args); | ||
HttpService.setValidateCertificates(false); | ||
Service service = Service.connect(command.opts); | ||
|
||
EventTypeCollection eventTypes = service.getEventTypes(); | ||
for(EventType eventType : eventTypes.values()){ | ||
System.out.println(eventType.getName()); | ||
for (int i = 0; i < eventType.getName().length(); i++) System.out.print("="); | ||
System.out.println(); | ||
for(Map.Entry<String, Object> entry : eventType.entrySet()){ | ||
System.out.println(entry.getKey() + " : " + entry.getValue()); | ||
} | ||
System.out.println(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
java/src/main/java/com/splunk/examples/fired_alerts/Program.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.splunk.examples.fired_alerts; | ||
|
||
import com.splunk.*; | ||
|
||
import java.util.Arrays; | ||
|
||
public class Program { | ||
public static void main(String[] args) { | ||
Command command = Command.splunk("fired_alerts").parse(args); | ||
HttpService.setValidateCertificates(false); | ||
Service service = Service.connect(command.opts); | ||
|
||
FiredAlertGroupCollection firedAlertGroups = service.getFiredAlertGroups(); | ||
for(FiredAlertGroup firedAlertGroup : firedAlertGroups.values()){ | ||
System.out.println(firedAlertGroup.getPath()); | ||
for (int i = 0; i < firedAlertGroup.getPath().length(); i++) System.out.print("="); | ||
System.out.println(); | ||
for(FiredAlert firedAlert : firedAlertGroup.getAlerts().values()){ | ||
System.out.println("FiredAlert Name : " + firedAlert.getName()); | ||
System.out.println("FiredAlert Action : " + Arrays.toString(firedAlert.getAction())); | ||
System.out.println("FiredAlert AlertType : " + firedAlert.getAlertType()); | ||
System.out.println("FiredAlert ExpirationTime : " + firedAlert.getExpirationTime()); | ||
System.out.println("FiredAlert SavedSearchName : " + firedAlert.getSavedSearchName()); | ||
System.out.println("FiredAlert Severity : " + firedAlert.getSeverity()); | ||
System.out.println("FiredAlert SID : " + firedAlert.getSid()); | ||
System.out.println("FiredAlert TriggeredAlertCount : " + firedAlert.getTriggeredAlertCount()); | ||
System.out.println("FiredAlert TriggerTime : " + firedAlert.getTriggerTime()); | ||
System.out.println("FiredAlert IsDigestMode : " + firedAlert.isDigestMode() + "\n"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.