Search in sources :

Example 1 with SeriesSpec

use of org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec in project graylog2-server by Graylog2.

the class ESPivot method processSeries.

private void processSeries(PivotResult.Row.Builder rowBuilder, SearchResult searchResult, ESGeneratedQueryContext queryContext, Pivot pivot, ArrayDeque<String> columnKeys, MetricAggregation aggregation, boolean rollup, String source) {
    pivot.series().forEach(seriesSpec -> {
        final ESPivotSeriesSpecHandler<? extends SeriesSpec, ? extends Aggregation> seriesHandler = seriesHandlers.get(seriesSpec.type());
        final Aggregation series = seriesHandler.extractAggregationFromResult(pivot, seriesSpec, aggregation, queryContext);
        seriesHandler.handleResult(pivot, seriesSpec, searchResult, series, this, queryContext).map(value -> {
            columnKeys.addLast(value.id());
            final PivotResult.Value v = PivotResult.Value.create(columnKeys, value.value(), rollup, source);
            columnKeys.removeLast();
            return v;
        }).forEach(rowBuilder::addValue);
    });
}
Also used : Aggregation(io.searchbox.core.search.aggregation.Aggregation) MetricAggregation(io.searchbox.core.search.aggregation.MetricAggregation) ESGeneratedQueryContext(org.graylog.storage.elasticsearch6.views.ESGeneratedQueryContext) ESSearchTypeHandler(org.graylog.storage.elasticsearch6.views.searchtypes.ESSearchTypeHandler) MinAggregationBuilder(org.graylog.shaded.elasticsearch6.org.elasticsearch.search.aggregations.metrics.min.MinAggregationBuilder) DateTimeZone(org.joda.time.DateTimeZone) InvalidRangeParametersException(org.graylog2.plugin.indexer.searches.timeranges.InvalidRangeParametersException) Query(org.graylog.plugins.views.search.Query) PivotResult(org.graylog.plugins.views.search.searchtypes.pivot.PivotResult) LoggerFactory(org.slf4j.LoggerFactory) RelativeRange(org.graylog2.plugin.indexer.searches.timeranges.RelativeRange) Inject(javax.inject.Inject) Tuple2(org.jooq.lambda.tuple.Tuple2) ImmutableList(com.google.common.collect.ImmutableList) SearchType(org.graylog.plugins.views.search.SearchType) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) Map(java.util.Map) AbsoluteRange(org.graylog2.plugin.indexer.searches.timeranges.AbsoluteRange) MaxAggregationBuilder(org.graylog.shaded.elasticsearch6.org.elasticsearch.search.aggregations.metrics.max.MaxAggregationBuilder) AggregationBuilder(org.graylog.shaded.elasticsearch6.org.elasticsearch.search.aggregations.AggregationBuilder) Pivot(org.graylog.plugins.views.search.searchtypes.pivot.Pivot) TimeRange(org.graylog2.plugin.indexer.searches.timeranges.TimeRange) PivotSpec(org.graylog.plugins.views.search.searchtypes.pivot.PivotSpec) SearchJob(org.graylog.plugins.views.search.SearchJob) Logger(org.slf4j.Logger) IdentityHashMap(java.util.IdentityHashMap) Iterator(java.util.Iterator) DateTime(org.joda.time.DateTime) Aggregation(io.searchbox.core.search.aggregation.Aggregation) EntryStream(one.util.streamex.EntryStream) List(java.util.List) Tuple(org.jooq.lambda.tuple.Tuple) Stream(java.util.stream.Stream) AggregationBuilders(org.graylog.shaded.elasticsearch6.org.elasticsearch.search.aggregations.AggregationBuilders) MetricAggregation(io.searchbox.core.search.aggregation.MetricAggregation) Optional(java.util.Optional) Preconditions(com.google.common.base.Preconditions) ArrayDeque(java.util.ArrayDeque) SearchSourceBuilder(org.graylog.shaded.elasticsearch6.org.elasticsearch.search.builder.SearchSourceBuilder) SearchResult(io.searchbox.core.SearchResult)

Example 2 with SeriesSpec

use of org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec in project graylog2-server by Graylog2.

the class PivotAggregationSearch method getAggregationQuery.

/**
 * Returns the query to compute the aggregation.
 *
 * @param parameters processor parameters
 * @param searchWithinMs processor search within period. Used to build the date range buckets
 * @param executeEveryMs
 * @return aggregation query
 */
private Query getAggregationQuery(AggregationEventProcessorParameters parameters, long searchWithinMs, long executeEveryMs) {
    final Pivot.Builder pivotBuilder = Pivot.builder().id(PIVOT_ID).rollup(true);
    final ImmutableList<SeriesSpec> series = config.series().stream().map(entry -> entry.function().toSeriesSpec(metricName(entry), entry.field().orElse(null))).collect(ImmutableList.toImmutableList());
    if (!series.isEmpty()) {
        pivotBuilder.series(series);
    }
    // Wrap every aggregation with date range buckets of the searchWithin time range.
    // If the aggregation is configured to be using a sliding window (searchWithin > executeEveryMs)
    // the time ranges will overlap.
    // This allows us to run aggregations over larger time ranges than the searchWithin time.
    // The results will be received in time buckets of the searchWithin time size.
    final DateRangeBucket dateRangeBucket = buildDateRangeBuckets(parameters.timerange(), searchWithinMs, executeEveryMs);
    final List<BucketSpec> groupBy = new ArrayList<>();
    // The first bucket must be the date range!
    groupBy.add(dateRangeBucket);
    if (!config.groupBy().isEmpty()) {
        // Then we add the configured groups
        groupBy.addAll(config.groupBy().stream().map(field -> Values.builder().limit(Integer.MAX_VALUE).field(field).build()).collect(Collectors.toList()));
    }
    // We always have row groups because of the date range buckets
    pivotBuilder.rowGroups(groupBy);
    final Set<SearchType> searchTypes = Collections.singleton(pivotBuilder.build());
    final Query.Builder queryBuilder = Query.builder().id(QUERY_ID).searchTypes(searchTypes).query(ElasticsearchQueryString.of(config.query())).timerange(parameters.timerange());
    final Set<String> streams = getStreams(parameters);
    if (!streams.isEmpty()) {
        queryBuilder.filter(filteringForStreamIds(streams));
    }
    return queryBuilder.build();
}
Also used : DateTimeZone(org.joda.time.DateTimeZone) LoggerFactory(org.slf4j.LoggerFactory) TimeoutException(java.util.concurrent.TimeoutException) Assisted(com.google.inject.assistedinject.Assisted) StreamFilter(org.graylog.plugins.views.search.filter.StreamFilter) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) Locale(java.util.Locale) EventDefinition(org.graylog.events.processor.EventDefinition) EventProcessorException(org.graylog.events.processor.EventProcessorException) Pivot(org.graylog.plugins.views.search.searchtypes.pivot.Pivot) Values(org.graylog.plugins.views.search.searchtypes.pivot.buckets.Values) TimeRange(org.graylog2.plugin.indexer.searches.timeranges.TimeRange) Collectors.toSet(java.util.stream.Collectors.toSet) PermittedStreams(org.graylog.plugins.views.search.rest.PermittedStreams) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) Collectors(java.util.stream.Collectors) MoreSearch(org.graylog.events.search.MoreSearch) List(java.util.List) Stream(org.graylog2.plugin.streams.Stream) Filter(org.graylog.plugins.views.search.Filter) Count(org.graylog.plugins.views.search.searchtypes.pivot.series.Count) MoreObjects.firstNonNull(com.google.common.base.MoreObjects.firstNonNull) QueryError(org.graylog.plugins.views.search.errors.QueryError) QueryEngine(org.graylog.plugins.views.search.engine.QueryEngine) Query(org.graylog.plugins.views.search.Query) PivotResult(org.graylog.plugins.views.search.searchtypes.pivot.PivotResult) SearchJobService(org.graylog.plugins.views.search.db.SearchJobService) Strings.isNullOrEmpty(com.google.common.base.Strings.isNullOrEmpty) DateRangeBucket(org.graylog.plugins.views.search.searchtypes.pivot.buckets.DateRangeBucket) ArrayList(java.util.ArrayList) ElasticsearchQueryString(org.graylog.plugins.views.search.elasticsearch.ElasticsearchQueryString) Inject(javax.inject.Inject) EventsConfigurationProvider(org.graylog.events.configuration.EventsConfigurationProvider) OrFilter(org.graylog.plugins.views.search.filter.OrFilter) ImmutableList(com.google.common.collect.ImmutableList) SearchType(org.graylog.plugins.views.search.SearchType) EmptyParameterError(org.graylog.plugins.views.search.errors.EmptyParameterError) Search(org.graylog.plugins.views.search.Search) QueryResult(org.graylog.plugins.views.search.QueryResult) SearchJob(org.graylog.plugins.views.search.SearchJob) Uninterruptibles(com.google.common.util.concurrent.Uninterruptibles) Logger(org.slf4j.Logger) DateTime(org.joda.time.DateTime) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) DateRange(org.graylog.plugins.views.search.searchtypes.pivot.buckets.DateRange) SearchError(org.graylog.plugins.views.search.errors.SearchError) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Collections(java.util.Collections) Query(org.graylog.plugins.views.search.Query) DateRangeBucket(org.graylog.plugins.views.search.searchtypes.pivot.buckets.DateRangeBucket) ArrayList(java.util.ArrayList) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) ElasticsearchQueryString(org.graylog.plugins.views.search.elasticsearch.ElasticsearchQueryString) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) Pivot(org.graylog.plugins.views.search.searchtypes.pivot.Pivot) SearchType(org.graylog.plugins.views.search.SearchType)

Example 3 with SeriesSpec

use of org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec in project graylog2-server by Graylog2.

the class ElasticsearchBackendGeneratedRequestTestBase method setUpSUT.

@Before
public void setUpSUT() {
    this.elasticSearchTypeHandlers = new HashMap<>();
    final Map<String, ESPivotBucketSpecHandler<? extends BucketSpec, ? extends Aggregation>> bucketHandlers = Collections.emptyMap();
    final Map<String, ESPivotSeriesSpecHandler<? extends SeriesSpec, ? extends Aggregation>> seriesHandlers = new HashMap<>();
    seriesHandlers.put(Average.NAME, new ESAverageHandler());
    seriesHandlers.put(Max.NAME, new ESMaxHandler());
    elasticSearchTypeHandlers.put(Pivot.NAME, () -> new ESPivot(bucketHandlers, seriesHandlers));
    this.elasticsearchBackend = new ElasticsearchBackend(elasticSearchTypeHandlers, jestClient, indexLookup, new QueryStringDecorators.Fake(), (elasticsearchBackend, ssb, job, query) -> new ESGeneratedQueryContext(elasticsearchBackend, ssb, job, query, fieldTypesLookup), false, objectMapper);
}
Also used : ESSearchTypeHandler(org.graylog.storage.elasticsearch6.views.searchtypes.ESSearchTypeHandler) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) InvalidRangeParametersException(org.graylog2.plugin.indexer.searches.timeranges.InvalidRangeParametersException) Provider(javax.inject.Provider) Query(org.graylog.plugins.views.search.Query) Mock(org.mockito.Mock) JestHttpClient(io.searchbox.client.http.JestHttpClient) ESMaxHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.series.ESMaxHandler) HashMap(java.util.HashMap) Captor(org.mockito.Captor) Max(org.graylog.plugins.views.search.searchtypes.pivot.series.Max) ArgumentCaptor(org.mockito.ArgumentCaptor) SearchType(org.graylog.plugins.views.search.SearchType) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) Map(java.util.Map) FieldTypesLookup(org.graylog.plugins.views.search.elasticsearch.FieldTypesLookup) AbsoluteRange(org.graylog2.plugin.indexer.searches.timeranges.AbsoluteRange) MockitoJUnit(org.mockito.junit.MockitoJUnit) Search(org.graylog.plugins.views.search.Search) QueryResult(org.graylog.plugins.views.search.QueryResult) Pivot(org.graylog.plugins.views.search.searchtypes.pivot.Pivot) TimeRange(org.graylog2.plugin.indexer.searches.timeranges.TimeRange) ESPivot(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.ESPivot) Before(org.junit.Before) MultiSearch(io.searchbox.core.MultiSearch) SearchJob(org.graylog.plugins.views.search.SearchJob) ImmutableSet(com.google.common.collect.ImmutableSet) ESPivotSeriesSpecHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.ESPivotSeriesSpecHandler) ESPivotBucketSpecHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.ESPivotBucketSpecHandler) Set(java.util.Set) IOException(java.io.IOException) Mockito.times(org.mockito.Mockito.times) Aggregation(io.searchbox.core.search.aggregation.Aggregation) Mockito.verify(org.mockito.Mockito.verify) QueryStringDecorators(org.graylog.plugins.views.search.elasticsearch.QueryStringDecorators) Rule(org.junit.Rule) ESAverageHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.series.ESAverageHandler) MockitoRule(org.mockito.junit.MockitoRule) Average(org.graylog.plugins.views.search.searchtypes.pivot.series.Average) IndexLookup(org.graylog.plugins.views.search.elasticsearch.IndexLookup) Collections(java.util.Collections) ESPivotSeriesSpecHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.ESPivotSeriesSpecHandler) HashMap(java.util.HashMap) ESMaxHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.series.ESMaxHandler) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) Aggregation(io.searchbox.core.search.aggregation.Aggregation) ESAverageHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.series.ESAverageHandler) ESPivotBucketSpecHandler(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.ESPivotBucketSpecHandler) ESPivot(org.graylog.storage.elasticsearch6.views.searchtypes.pivot.ESPivot) Before(org.junit.Before)

Example 4 with SeriesSpec

use of org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec in project graylog2-server by Graylog2.

the class ESPivot method processSeries.

private void processSeries(PivotResult.Row.Builder rowBuilder, SearchResponse searchResult, ESGeneratedQueryContext queryContext, Pivot pivot, ArrayDeque<String> columnKeys, HasAggregations aggregation, boolean rollup, String source) {
    pivot.series().forEach(seriesSpec -> {
        final ESPivotSeriesSpecHandler<? extends SeriesSpec, ? extends Aggregation> seriesHandler = seriesHandlers.get(seriesSpec.type());
        final Aggregation series = seriesHandler.extractAggregationFromResult(pivot, seriesSpec, aggregation, queryContext);
        seriesHandler.handleResult(pivot, seriesSpec, searchResult, series, this, queryContext).map(value -> {
            columnKeys.addLast(value.id());
            final PivotResult.Value v = PivotResult.Value.create(columnKeys, value.value(), rollup, source);
            columnKeys.removeLast();
            return v;
        }).forEach(rowBuilder::addValue);
    });
}
Also used : Aggregation(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.Aggregation) HasAggregations(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.HasAggregations) ESSearchTypeHandler(org.graylog.storage.elasticsearch7.views.searchtypes.ESSearchTypeHandler) SearchResponse(org.graylog.shaded.elasticsearch7.org.elasticsearch.action.search.SearchResponse) DateTimeZone(org.joda.time.DateTimeZone) InvalidRangeParametersException(org.graylog2.plugin.indexer.searches.timeranges.InvalidRangeParametersException) Query(org.graylog.plugins.views.search.Query) PivotResult(org.graylog.plugins.views.search.searchtypes.pivot.PivotResult) LoggerFactory(org.slf4j.LoggerFactory) RelativeRange(org.graylog2.plugin.indexer.searches.timeranges.RelativeRange) AggregationBuilders(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.AggregationBuilders) Inject(javax.inject.Inject) Tuple2(org.jooq.lambda.tuple.Tuple2) ImmutableList(com.google.common.collect.ImmutableList) SearchType(org.graylog.plugins.views.search.SearchType) AggregationBuilder(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.AggregationBuilder) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) Map(java.util.Map) ESGeneratedQueryContext(org.graylog.storage.elasticsearch7.views.ESGeneratedQueryContext) AbsoluteRange(org.graylog2.plugin.indexer.searches.timeranges.AbsoluteRange) Aggregation(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.Aggregation) Pivot(org.graylog.plugins.views.search.searchtypes.pivot.Pivot) TimeRange(org.graylog2.plugin.indexer.searches.timeranges.TimeRange) PivotSpec(org.graylog.plugins.views.search.searchtypes.pivot.PivotSpec) SearchJob(org.graylog.plugins.views.search.SearchJob) SearchSourceBuilder(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.builder.SearchSourceBuilder) Logger(org.slf4j.Logger) IdentityHashMap(java.util.IdentityHashMap) Iterator(java.util.Iterator) DateTime(org.joda.time.DateTime) EntryStream(one.util.streamex.EntryStream) Max(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.Max) MaxAggregationBuilder(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.MaxAggregationBuilder) Aggregations(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.Aggregations) List(java.util.List) Tuple(org.jooq.lambda.tuple.Tuple) Stream(java.util.stream.Stream) Optional(java.util.Optional) Preconditions(com.google.common.base.Preconditions) MinAggregationBuilder(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder) ArrayDeque(java.util.ArrayDeque) Min(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.metrics.Min)

Example 5 with SeriesSpec

use of org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec in project graylog2-server by Graylog2.

the class ElasticsearchBackendGeneratedRequestTestBase method setUpSUT.

@Before
public void setUpSUT() {
    this.elasticSearchTypeHandlers = new HashMap<>();
    final Map<String, ESPivotBucketSpecHandler<? extends BucketSpec, ? extends Aggregation>> bucketHandlers = Collections.emptyMap();
    final Map<String, ESPivotSeriesSpecHandler<? extends SeriesSpec, ? extends Aggregation>> seriesHandlers = new HashMap<>();
    seriesHandlers.put(Average.NAME, new ESAverageHandler());
    seriesHandlers.put(Max.NAME, new ESMaxHandler());
    elasticSearchTypeHandlers.put(Pivot.NAME, () -> new ESPivot(bucketHandlers, seriesHandlers));
    this.elasticsearchBackend = new ElasticsearchBackend(elasticSearchTypeHandlers, client, indexLookup, new QueryStringDecorators.Fake(), (elasticsearchBackend, ssb, job, query) -> new ESGeneratedQueryContext(elasticsearchBackend, ssb, job, query, fieldTypesLookup), false);
}
Also used : ESSearchTypeHandler(org.graylog.storage.elasticsearch7.views.searchtypes.ESSearchTypeHandler) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ElasticsearchClient(org.graylog.storage.elasticsearch7.ElasticsearchClient) InvalidRangeParametersException(org.graylog2.plugin.indexer.searches.timeranges.InvalidRangeParametersException) Provider(javax.inject.Provider) Query(org.graylog.plugins.views.search.Query) Mock(org.mockito.Mock) HashMap(java.util.HashMap) Captor(org.mockito.Captor) Max(org.graylog.plugins.views.search.searchtypes.pivot.series.Max) ESPivotSeriesSpecHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.ESPivotSeriesSpecHandler) ArgumentCaptor(org.mockito.ArgumentCaptor) SearchType(org.graylog.plugins.views.search.SearchType) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) Map(java.util.Map) FieldTypesLookup(org.graylog.plugins.views.search.elasticsearch.FieldTypesLookup) AbsoluteRange(org.graylog2.plugin.indexer.searches.timeranges.AbsoluteRange) MockitoJUnit(org.mockito.junit.MockitoJUnit) Search(org.graylog.plugins.views.search.Search) Aggregation(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.Aggregation) QueryResult(org.graylog.plugins.views.search.QueryResult) Pivot(org.graylog.plugins.views.search.searchtypes.pivot.Pivot) TimeRange(org.graylog2.plugin.indexer.searches.timeranges.TimeRange) Before(org.junit.Before) SearchJob(org.graylog.plugins.views.search.SearchJob) ImmutableSet(com.google.common.collect.ImmutableSet) SearchRequest(org.graylog.shaded.elasticsearch7.org.elasticsearch.action.search.SearchRequest) ESMaxHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.series.ESMaxHandler) ESPivotBucketSpecHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.ESPivotBucketSpecHandler) Set(java.util.Set) Mockito.times(org.mockito.Mockito.times) ESAverageHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.series.ESAverageHandler) Mockito.verify(org.mockito.Mockito.verify) List(java.util.List) QueryStringDecorators(org.graylog.plugins.views.search.elasticsearch.QueryStringDecorators) Rule(org.junit.Rule) ESPivot(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.ESPivot) MockitoRule(org.mockito.junit.MockitoRule) Average(org.graylog.plugins.views.search.searchtypes.pivot.series.Average) IndexLookup(org.graylog.plugins.views.search.elasticsearch.IndexLookup) Collections(java.util.Collections) ESPivotSeriesSpecHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.ESPivotSeriesSpecHandler) HashMap(java.util.HashMap) ESMaxHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.series.ESMaxHandler) SeriesSpec(org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec) BucketSpec(org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec) Aggregation(org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.Aggregation) ESAverageHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.series.ESAverageHandler) ESPivotBucketSpecHandler(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.ESPivotBucketSpecHandler) ESPivot(org.graylog.storage.elasticsearch7.views.searchtypes.pivot.ESPivot) Before(org.junit.Before)

Aggregations

Query (org.graylog.plugins.views.search.Query)5 SearchJob (org.graylog.plugins.views.search.SearchJob)5 SearchType (org.graylog.plugins.views.search.SearchType)5 BucketSpec (org.graylog.plugins.views.search.searchtypes.pivot.BucketSpec)5 Pivot (org.graylog.plugins.views.search.searchtypes.pivot.Pivot)5 SeriesSpec (org.graylog.plugins.views.search.searchtypes.pivot.SeriesSpec)5 TimeRange (org.graylog2.plugin.indexer.searches.timeranges.TimeRange)5 List (java.util.List)4 Map (java.util.Map)4 ImmutableList (com.google.common.collect.ImmutableList)3 ImmutableSet (com.google.common.collect.ImmutableSet)3 Collections (java.util.Collections)3 Set (java.util.Set)3 AbsoluteRange (org.graylog2.plugin.indexer.searches.timeranges.AbsoluteRange)3 InvalidRangeParametersException (org.graylog2.plugin.indexer.searches.timeranges.InvalidRangeParametersException)3 Preconditions (com.google.common.base.Preconditions)2 Aggregation (io.searchbox.core.search.aggregation.Aggregation)2 HashMap (java.util.HashMap)2 Inject (javax.inject.Inject)2 Provider (javax.inject.Provider)2