Package com.netflix.servo.publish

Examples of com.netflix.servo.publish.PollRunnable


        {
            PollScheduler scheduler = PollScheduler.getInstance();
            scheduler.start();
            MetricObserver fileObserver = new FileMetricObserver("stats", new File("."));
            MetricObserver transform = new CounterToRateMetricTransform(fileObserver, 2, TimeUnit.MINUTES);
            PollRunnable task = new PollRunnable(new MonitorRegistryMetricPoller(), BasicMetricFilter.MATCH_ALL, transform);
            scheduler.addPoller(task, 1, TimeUnit.MINUTES);
        }
        catch (Throwable e)
        {
            // dont do anything... just eat.
View Full Code Here


        final String addr = Config.getGraphiteObserverAddress();
        return rateTransform(async("graphite", new GraphiteMetricObserver(prefix, addr)));
    }

    private static void schedule(MetricPoller poller, List<MetricObserver> observers) {
        final PollRunnable task = new PollRunnable(poller, BasicMetricFilter.MATCH_ALL,
                true, observers);
        PollScheduler.getInstance().addPoller(task, Config.getPollInterval(), TimeUnit.SECONDS);
    }
View Full Code Here

        final List<MetricObserver> observers = new ArrayList<MetricObserver>();
        observers.add(createGraphiteObserver());
        //observers.add(createCloudWatchObserver());

        final MetricPoller poller = new MonitorRegistryMetricPoller();
        final PollRunnable task = new PollRunnable(poller, BasicMetricFilter.MATCH_ALL, observers);

        PollScheduler.getInstance().start();
        PollScheduler.getInstance().addPoller(task, config.getLong("metrics.poll.interval", 30), TimeUnit.SECONDS);
  }
View Full Code Here

        MetricObserver transform = new CounterToRateMetricTransform(
                new FileMetricObserver("ZuulMetrics", metricsDir),
                heartbeatInterval, TimeUnit.SECONDS);

        PollRunnable task = new PollRunnable(
                new MonitorRegistryMetricPoller(),
                BasicMetricFilter.MATCH_ALL,
                transform);

        final int samplingInterval = 10;
View Full Code Here

TOP

Related Classes of com.netflix.servo.publish.PollRunnable

Copyright © 2018 www.massapicom. 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.