com.codahale.metrics.health.jvm.ThreadDeadlockHealthCheck Java Examples
The following examples show how to use
com.codahale.metrics.health.jvm.ThreadDeadlockHealthCheck.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MetricsHelper.java From lemon with Apache License 2.0 | 6 votes |
@PostConstruct public void init() { /* * consoleReporter = ConsoleReporter.forRegistry(metricRegistry) .convertRatesTo(TimeUnit.SECONDS) * .convertDurationsTo(TimeUnit.MILLISECONDS) .build(); consoleReporter.start(1, TimeUnit.SECONDS); */ GarbageCollectorMetricSet gc = new GarbageCollectorMetricSet(); // FileDescriptorRatioGauge fd = new FileDescriptorRatioGauge(); MemoryUsageGaugeSet mu = new MemoryUsageGaugeSet(); // ThreadDeadlockDetector td = new ThreadDeadlockDetector(); // ThreadDump t = new ThreadDump(); ThreadStatesGaugeSet ts = new ThreadStatesGaugeSet(); metricRegistry.register("GarbageCollector", gc); // registry.register(FileDescriptorRatioGauge.class.getName(), fd); metricRegistry.register("MemoryUsage", mu); // registry.register(ThreadDeadlockDetector.class.getName(), td); // registry.registerAll(t); metricRegistry.register("ThreadStates", ts); healthCheckRegistry.register("threadDeadlock", new ThreadDeadlockHealthCheck()); }
Example #2
Source File: MetricsManager.java From emissary with Apache License 2.0 | 5 votes |
protected void initHealthChecks() { this.healthChecks.register( "healthcheck.filequeue", new FilePickUpPlaceHealthCheck(this.conf.findIntEntry("MAX_FILE_COUNT_BEFORE_UNHEALTHY", Integer.MAX_VALUE), this.conf.findLongEntry( "MAX_AGGREGATE_FIZE_SIZE_BEFORE_UNHEALTHY_BYTES", Long.MAX_VALUE))); this.healthChecks.register("healthcheck.threaddeadlocks", new ThreadDeadlockHealthCheck()); }
Example #3
Source File: MonetaConfiguration.java From moneta with Apache License 2.0 | 5 votes |
/** * Will initialize Moneta given a configuration. This <b>must</b> be executed before use. * @param config XML configuration */ protected final void init(XMLConfiguration config) { initDataSources(config); initTopics(config); healthChecks.put("Deadlock", new ThreadDeadlockHealthCheck()); initRun = true; }
Example #4
Source File: RegisterJVMMetricsBuilder.java From kite with Apache License 2.0 | 5 votes |
public RegisterJVMMetrics(CommandBuilder builder, Config config, Command parent, Command child, final MorphlineContext context) { super(builder, config, parent, child, context); validateArguments(); MetricRegistry registry = context.getMetricRegistry(); BufferPoolMetricSet bufferPoolMetrics = new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()); registerAll("jvm.buffers", bufferPoolMetrics, registry); registerAll("jvm.gc", new GarbageCollectorMetricSet(), registry); registerAll("jvm.memory", new MemoryUsageGaugeSet(), registry); registerAll("jvm.threads", new ThreadStatesGaugeSet(), registry); register("jvm.fileDescriptorCountRatio", new FileDescriptorRatioGauge(), registry); context.getHealthCheckRegistry().register("deadlocks", new ThreadDeadlockHealthCheck()); }
Example #5
Source File: HealthCheckConfiguration.java From haven-platform with Apache License 2.0 | 4 votes |
@Autowired public void setHealthCheckRegistry(HealthCheckRegistry registry) { registry.register(ThreadDeadlockHealthCheck.class.getName(), new ThreadDeadlockHealthCheck()); }
Example #6
Source File: DeadlockHealthCheckProvider.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
public HealthCheck get() { return new ThreadDeadlockHealthCheck(); }