Search in sources :

Example 1 with Monitoring

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"));
}
Also used : Monitoring(com.yahoo.vespa.model.admin.monitoring.Monitoring)

Example 2 with Monitoring

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);
            }
        }
    }
}
Also used : ContainerModelBuilder(com.yahoo.vespa.model.container.xml.ContainerModelBuilder) MetricsConsumer(com.yahoo.vespa.model.admin.monitoring.MetricsConsumer) MetricsConsumer(com.yahoo.vespa.model.admin.monitoring.MetricsConsumer) Metric(com.yahoo.vespa.model.admin.monitoring.Metric) MetricsmanagerConfig(com.yahoo.metrics.MetricsmanagerConfig) Monitoring(com.yahoo.vespa.model.admin.monitoring.Monitoring)

Example 3 with Monitoring

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));
}
Also used : Monitoring(com.yahoo.vespa.model.admin.monitoring.Monitoring) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Example 4 with Monitoring

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;
}
Also used : FileDistributionConfigProducer(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer) Metrics(com.yahoo.vespa.model.admin.monitoring.builder.Metrics) MetricsConsumer(com.yahoo.vespa.model.admin.monitoring.MetricsConsumer) DefaultMonitoring(com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring) Monitoring(com.yahoo.vespa.model.admin.monitoring.Monitoring) MetricsBuilder(com.yahoo.vespa.model.admin.monitoring.builder.xml.MetricsBuilder)

Example 5 with Monitoring

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"))));
}
Also used : Monitoring(com.yahoo.vespa.model.admin.monitoring.Monitoring)

Aggregations

Monitoring (com.yahoo.vespa.model.admin.monitoring.Monitoring)8 Test (org.junit.Test)4 DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)3 MetricsConsumer (com.yahoo.vespa.model.admin.monitoring.MetricsConsumer)3 Metric (com.yahoo.vespa.model.admin.monitoring.Metric)2 MetricsmanagerConfig (com.yahoo.metrics.MetricsmanagerConfig)1 VespaModel (com.yahoo.vespa.model.VespaModel)1 DefaultMonitoring (com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring)1 Metrics (com.yahoo.vespa.model.admin.monitoring.builder.Metrics)1 MetricsBuilder (com.yahoo.vespa.model.admin.monitoring.builder.xml.MetricsBuilder)1 ContainerModelBuilder (com.yahoo.vespa.model.container.xml.ContainerModelBuilder)1 FileDistributionConfigProducer (com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer)1