Added LogPoint aggregation

Added generateAggregation function for LogPoint
This commit is contained in:
Ben de Haan 2017-06-19 15:21:29 +02:00 committed by GitHub
parent d1f1bd59da
commit 43c4486de0

View File

@ -185,6 +185,14 @@ class LogPointBackend(SingleTextQueryBackend):
mapListsSpecialHandling = True
mapListValueExpression = "%s IN %s"
def generateAggregation(self, agg):
if agg == None:
return ""
if agg.groupfield == None:
return " | chart %s(%s) as val | search val %s %s" % (agg.aggfunc_notrans, agg.aggfield, agg.cond_op, agg.condition)
else:
return " | chart %s(%s) as val by %s | search val %s %s" % (agg.aggfunc_notrans, agg.aggfield, agg.groupfield, agg.cond_op, agg.condition)
class SplunkBackend(SingleTextQueryBackend):
"""Converts Sigma rule into Splunk Search Processing Language (SPL)."""
identifier = "splunk"