-
Host+Tag based routing: CFE07Routing
-
Host+Tag based index and sourcetype enrichment: CFE12Routing
-
Authentication Token based Host+Tag information enrichment: CFE16Routing
-
Account ID + LogGroup based Host+Tag information enrichment: KIN02Routing
CFE07Routing cfe07Routing = new CFE07Routing("src/test/resources/cfe_07");
RoutingKey key = new RoutingKey("group-one-host-one", "group-one-tag-two");
for (String target : cfe07Routing.getTargets(key)) {
// spool target
if ("spool".equals(target)) {
// do spool stuff
}
}
CFE12Routing cfe12Routing = new CFE12Routing("src/test/resources/cfe_12");
RoutingKey key = new RoutingKey("example-host", "124f76f0-net");
for (String index : cfe12Routing.getIndexes(key)) {
for (String sourcetype : cfe12Routing.getSourcetypes(key)) {
// do stuff for each index and for each sourcetype
}
}
CFE16Routing cfe16Routing = new CFE16Routing("src/test/resources/cfe_16");
RoutingKey key = cfe16Routing.getRoutingKey("My RoutingKey having token");
String hostname = key.getHostname();
String appName = key.getAppName();