org.graylog2.system.stats.ClusterStats Maven / Gradle / Ivy
/**
* This file is part of Graylog.
*
* Graylog is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Graylog is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Graylog. If not, see .
*/
package org.graylog2.system.stats;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import org.graylog2.plugin.inputs.Extractor;
import org.graylog2.system.stats.elasticsearch.ElasticsearchStats;
import org.graylog2.system.stats.mongo.MongoStats;
import java.util.Map;
@JsonAutoDetect
@AutoValue
public abstract class ClusterStats {
@JsonProperty("elasticsearch")
public abstract ElasticsearchStats elasticsearchStats();
@JsonProperty("mongo")
public abstract MongoStats mongoStats();
@JsonProperty
public abstract long streamCount();
@JsonProperty
public abstract long streamRuleCount();
@JsonProperty
public abstract Map streamRuleCountByStream();
@JsonProperty
public abstract long userCount();
@JsonProperty
public abstract long outputCount();
@JsonProperty
public abstract Map outputCountByType();
@JsonProperty
public abstract long dashboardCount();
@JsonProperty
public abstract long inputCount();
@JsonProperty
public abstract long globalInputCount();
@JsonProperty
public abstract Map inputCountByType();
@JsonProperty
public abstract long extractorCount();
@JsonProperty
public abstract Map extractorCountByType();
@JsonProperty
public abstract long contentPackCount();
public static ClusterStats create(ElasticsearchStats elasticsearchStats,
MongoStats mongoStats,
long streamCount,
long streamRuleCount,
Map streamRuleCountByStream,
long userCount,
long outputCount,
Map outputCountByType,
long dashboardCount,
long inputCount,
long globalInputCount,
Map inputCountByType,
long extractorCount,
Map extractorCountByType,
long contentPackCount) {
return new AutoValue_ClusterStats(
elasticsearchStats,
mongoStats,
streamCount,
streamRuleCount,
streamRuleCountByStream,
userCount,
outputCount,
outputCountByType,
dashboardCount,
inputCount,
globalInputCount,
inputCountByType,
extractorCount,
extractorCountByType,
contentPackCount);
}
}