use of com.yahoo.vespa.model.admin.monitoring.Monitoring in project vespa by vespa-engine.
the class SearchNode method getConfig.
@Override
public void getConfig(MetricsmanagerConfig.Builder builder) {
Monitoring point = getMonitoringService();
if (point != null) {
builder.snapshot(new MetricsmanagerConfig.Snapshot.Builder().periods(point.getIntervalSeconds()).periods(300));
}
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("log").tags("logdefault"));
}
use of com.yahoo.vespa.model.admin.monitoring.Monitoring in project vespa by vespa-engine.
the class ContentCluster method getConfig.
@Override
public void getConfig(MetricsmanagerConfig.Builder builder) {
Monitoring monitoring = getMonitoringService();
if (monitoring != null) {
builder.snapshot(new MetricsmanagerConfig.Snapshot.Builder().periods(monitoring.getIntervalSeconds()).periods(300));
}
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("status").addedmetrics("*").removedtags("partofsum"));
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("log").tags("logdefault").removedtags("loadtype"));
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("yamas").tags("yamasdefault").removedtags("loadtype"));
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("health"));
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("fleetcontroller"));
builder.consumer(new MetricsmanagerConfig.Consumer.Builder().name("statereporter").addedmetrics("*").removedtags("thread").tags("disk"));
Map<String, MetricsConsumer> consumers = getRoot().getAdmin().getLegacyUserMetricsConsumers();
if (consumers != null) {
for (Map.Entry<String, MetricsConsumer> e : consumers.entrySet()) {
MetricsmanagerConfig.Consumer.Builder b = getMetricBuilder(e.getKey(), builder);
for (Metric m : e.getValue().getMetrics().values()) {
b.addedmetrics(m.name);
}
}
}
}
use of com.yahoo.vespa.model.admin.monitoring.Monitoring in project vespa by vespa-engine.
the class DomAdminV2BuilderTest method basicYamasNoXml.
@Test
public void basicYamasNoXml() {
Admin admin = buildAdmin(servicesNoYamas());
Monitoring y = admin.getMonitoring();
assertThat(y.getClustername(), is("vespa"));
assertThat(y.getInterval(), is(1));
}
use of com.yahoo.vespa.model.admin.monitoring.Monitoring in project vespa by vespa-engine.
the class DomAdminBuilderBase method doBuild.
@Override
protected Admin doBuild(AbstractConfigProducer parent, Element adminElement) {
Monitoring monitoring = getMonitoring(getChildWithFallback(adminElement, "monitoring", "yamas"));
Metrics metrics = new MetricsBuilder(applicationType, predefinedMetricSets).buildMetrics(XML.getChild(adminElement, "metrics"));
Map<String, MetricsConsumer> legacyMetricsConsumers = DomMetricBuilderHelper.buildMetricsConsumers(XML.getChild(adminElement, "metric-consumers"));
FileDistributionConfigProducer fileDistributionConfigProducer = getFileDistributionConfigProducer(parent);
Admin admin = new Admin(parent, monitoring, metrics, legacyMetricsConsumers, multitenant, fileDistributionConfigProducer);
admin.setApplicationType(applicationType);
doBuildAdmin(admin, adminElement);
new ModelConfigProvider(admin);
return admin;
}
use of com.yahoo.vespa.model.admin.monitoring.Monitoring in project vespa by vespa-engine.
the class StatisticsComponent method getConfig.
@Override
public void getConfig(StatisticsConfig.Builder builder) {
Monitoring monitoring = getMonitoringService();
if (monitoring != null) {
builder.collectionintervalsec(monitoring.getIntervalSeconds().doubleValue()).loggingintervalsec(monitoring.getIntervalSeconds().doubleValue());
}
builder.values(new StatisticsConfig.Values.Builder().name("query_latency").operations(new StatisticsConfig.Values.Operations.Builder().name(StatisticsConfig.Values.Operations.Name.REGULAR).arguments(new StatisticsConfig.Values.Operations.Arguments.Builder().key("limits").value("25,50,100,500"))));
}
Aggregations