All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.springframework.boxes.jmetric.starter.configure.BoxesMetricProperties Maven / Gradle / Ivy

There is a newer version: 2.0.9
Show newest version
package com.springframework.boxes.jmetric.starter.configure;

import com.springframework.boxes.jmetric.starter.pipeline.ElasticPipeline;
import com.springframework.boxes.jmetric.starter.pipeline.FalconPipeline;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

@Data
@ConfigurationProperties("spring.boxes.metric")
public class BoxesMetricProperties {

    private boolean enabled;

    private int initialDelay = 0;

    private int periodSeconds = 60;

    @NestedConfigurationProperty
    private Pipeline pipeline = new Pipeline();

    @NestedConfigurationProperty
    private Collector collector = new Collector();

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Pipeline {

        private boolean logger;

        private boolean system;

        private boolean falcon;

        private boolean elastic;

        private boolean mysql;

        @NestedConfigurationProperty
        private FalconMeta falconMeta = new FalconMeta();

        @NestedConfigurationProperty
        private ElasticMeta elasticMeta = new ElasticMeta();

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        public static class FalconMeta {
            private String url = FalconPipeline.DEFAULT_AGENT_URL;
            private String tags;
            private int step;
        }

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        public static class ElasticMeta {
            private String indexName = ElasticPipeline.DEFAULT_INDEX;
            private String endpoints = "http://127.0.0.1:9200";
            private String username;
            private String password;
        }
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Collector {

        private boolean jvm;

        private boolean method;

        private boolean tomcat;
    }

}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy