Examples of MonitorConfig


Examples of com.alibaba.dubbo.config.MonitorConfig

        if (getMonitor() == null
                && (getConsumer() == null || getConsumer().getMonitor() == null)
                && (getApplication() == null || getApplication().getMonitor() == null)) {
            Map<String, MonitorConfig> monitorConfigMap = applicationContext == null ? null : applicationContext.getBeansOfType(MonitorConfig.class, false, false);
            if (monitorConfigMap != null && monitorConfigMap.size() > 0) {
                MonitorConfig monitorConfig = null;
                for (MonitorConfig config : monitorConfigMap.values()) {
                    if (config.isDefault() == null || config.isDefault().booleanValue()) {
                        if (monitorConfig != null) {
                            throw new IllegalStateException("Duplicate monitor configs: " + monitorConfig + " and " + config);
                        }
View Full Code Here

Examples of com.alibaba.dubbo.config.MonitorConfig

        if (getMonitor() == null
                && (getProvider() == null || getProvider().getMonitor() == null)
                && (getApplication() == null || getApplication().getMonitor() == null)) {
            Map<String, MonitorConfig> monitorConfigMap = applicationContext == null ? null : applicationContext.getBeansOfType(MonitorConfig.class, false, false);
            if (monitorConfigMap != null && monitorConfigMap.size() > 0) {
                MonitorConfig monitorConfig = null;
                for (MonitorConfig config : monitorConfigMap.values()) {
                    if (config.isDefault() == null || config.isDefault().booleanValue()) {
                        if (monitorConfig != null) {
                            throw new IllegalStateException("Duplicate monitor configs: " + monitorConfig + " and " + config);
                        }
View Full Code Here

Examples of com.alibaba.rocketmq.tools.monitor.MonitorConfig

    @Override
    public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) {
        try {
            MonitorService monitorService =
                    new MonitorService(new MonitorConfig(), new DefaultMonitorListener(), rpcHook);

            monitorService.start();
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

    public void initialize() {
        /* list of monitors */
        List<Monitor<?>> monitors = getServoMonitors();

        // publish metrics together under a single composite (it seems this name is ignored)
        MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixThreadPool_" + key.name()).build();
        BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);

        DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
    }
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

    public void initialize() {
        /* list of monitors */
        List<Monitor<?>> monitors = getServoMonitors();

        // publish metrics together under a single composite (it seems this name is ignored)
        MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixCommand_" + key.name()).build();
        BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);

        DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
    }
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

        Preconditions.checkNotNull(metrics);
        LOGGER.debug("received {} metrics", metrics.size());
        final List<Metric> newMetrics = Lists.newArrayListWithCapacity(metrics.size());
        for (Metric m : metrics) {
            if (isCounter(m)) {
                final MonitorConfig rateConfig = toRateConfig(m.getConfig());
                final CounterValue prev = cache.get(rateConfig);
                if (prev != null) {
                    final double rate = prev.computeRate(m);
                    newMetrics.add(new Metric(rateConfig, m.getTimestamp(), rate));
                } else {
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

            final double value = Double.parseDouble(m.group(2));


            final Tag metricType = (name.startsWith("Total") || name.startsWith("Uptime"))
                    ? DataSourceType.COUNTER : DataSourceType.GAUGE;
            final MonitorConfig monitorConfig = MonitorConfig.builder(name)
                    .withTag(metricType)
                    .withTag(CLASS_TAG)
                    .build();
            Metric metric = new Metric(monitorConfig, timestamp, value);
            return ImmutableList.of(metric);
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

                if (item == '.') { // Open slots are not particularly useful to track
                    continue;
                }
                final double value = tally[item];
                final String state = getScoreboardName(item);
                final MonitorConfig monitorConfig = MonitorConfig.builder(SCOREBOARD)
                        .withTag(DataSourceType.GAUGE)
                        .withTag(CLASS_TAG)
                        .withTag("state", state)
                        .build();
                final Metric metric = new Metric(monitorConfig, timestamp, value);
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

        Arrays.fill(result, c);
        return new String(result);
    }

    private static Metric metric(String name, double value, Tag metricType) {
        MonitorConfig config = MonitorConfig.builder(name).withTag(metricType)
                .withTag("class", "ApacheStatusPoller").build();
        return new Metric(config, TIMESTAMP, value);
    }
View Full Code Here

Examples of com.netflix.servo.monitor.MonitorConfig

                .withTag("class", "ApacheStatusPoller").build();
        return new Metric(config, TIMESTAMP, value);
    }

    private static Metric scoreboard(String state, double value) {
        MonitorConfig config = MonitorConfig.builder("Scoreboard")
                .withTag(DataSourceType.GAUGE)
                .withTag("state", state)
                .withTag("class", "ApacheStatusPoller").build();
        return new Metric(config, TIMESTAMP, value);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.