Examples of HealthCheck


Examples of com.yammer.metrics.core.HealthCheck

*/
public class FreeFileHandlesHealthCheck implements HealthCheckFactory {

    @Override
    public HealthCheck create(ServiceContext context) {
        return new HealthCheck("Sufficient free file handles") {
            @Override
            protected Result check() throws Exception {
                try {
                    OperatingSystemMXBean osMbean = ManagementFactory.getOperatingSystemMXBean();
                    if(osMbean instanceof UnixOperatingSystemMXBean) {
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

* Date: 3/26/12
* Time: 9:01 AM
*/
public class LuceneIndexHealthCheck implements HealthCheckFactory {
    public HealthCheck create(final ServiceContext context) {
        return new HealthCheck("Lucene Index") {
            @Override
            protected Result check() throws Exception {
                GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);

                SearchManager searchMan = gc.getBean(SearchManager.class);
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

* Date: 3/26/12
* Time: 9:01 AM
*/
public class NoIndexErrorsHealthCheck implements HealthCheckFactory {
    public HealthCheck create(final ServiceContext context) {
        return new HealthCheck("Metadata Index Errors") {
            @Override
            protected Result check() throws Exception {
                GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);

                SearchManager searchMan = gc.getBean(SearchManager.class);
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

* Date: 3/26/12
* Time: 9:01 AM
*/
public class DatabaseHealthCheck implements HealthCheckFactory {
    public HealthCheck create(final ServiceContext context) {
        return new HealthCheck("Database Connection") {
            @Override
            protected Result check() throws Exception {
                try {
                    context.getBean(SettingRepository.class).count();
                    return Result.healthy();
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

* Date: 3/26/12
* Time: 9:01 AM
*/
public class CswGetCapabilitiesHealthCheck implements HealthCheckFactory {
    public HealthCheck create(final ServiceContext context) {
        return new HealthCheck("Csw GetCapabilities") {
            @Override
            protected Result check() throws Exception {
                try {
          LocalServiceRequest request = LocalServiceRequest.create("local://csw?request=GetCapabilities&service=CSW");
          request.setDebug(false);
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

* Date: 3/26/12
* Time: 9:01 AM
*/
public class CswGetRecordsHealthCheck implements HealthCheckFactory {
    public HealthCheck create(final ServiceContext context) {
        return new HealthCheck("Csw GetRecords") {
            @Override
            protected Result check() throws Exception {
                try {
          LocalServiceRequest request = LocalServiceRequest.create("local://csw?request=GetRecords&service=CSW&MaxRecords=1&constraintlanguage=FILTER&version=2.0.2&resulttype=results");
          request.setDebug(false);
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

*/
public class FreeConnectionsHealthCheck implements HealthCheckFactory {

    @Override
    public HealthCheck create(final ServiceContext context) {
        return new HealthCheck("Sufficient free connections in "+Geonet.Res.MAIN_DB) {
            @Override
            protected Result check() throws Exception {
                Stats stats;
                try {
                    stats = new Stats(context);
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

public class FieldCacheSanityHealthCheck implements HealthCheckFactory {

    @Override
    public HealthCheck create(ServiceContext context) {
        return new HealthCheck("Default Field Cache Sanity") {
            @Override
            protected Result check() throws Exception {
                StringBuilder b = new StringBuilder();
                check(b, FieldCache.DEFAULT);
View Full Code Here

Examples of io.fabric8.core.jmx.HealthCheck

            setData(curator.get(), CONTAINER_DOMAIN.getPath(runtimeIdentity, domain), "", CreateMode.EPHEMERAL);
        }
    }

    private void registerFabricMBeans() {
        this.healthCheck = new HealthCheck(fabricService.get());
        this.managerMBean = new FabricManager((FabricServiceImpl) fabricService.get());
        this.zooKeeperMBean = new ZooKeeperFacade((FabricServiceImpl) fabricService.get());
        this.fileSystemMBean = new FileSystem(runtimeProperties.get());
        healthCheck.registerMBeanServer(shutdownTracker, mbeanServer.get());
        managerMBean.registerMBeanServer(shutdownTracker, mbeanServer.get());
View Full Code Here

Examples of netflix.karyon.examples.hellonoss.common.health.HealthCheck

    public SimpleRouter() {
        final HelloWorldEndpoint endpoint = new HelloWorldEndpoint();
        delegate = new SimpleUriRouter<ByteBuf, ByteBuf>();

        delegate.addUri("/healthcheck",
                        new HealthCheckEndpoint(new HealthCheck()))
                .addUri("/hello",
                        new RequestHandler<ByteBuf, ByteBuf>() {
                            @Override
                            public Observable<Void> handle(
                                    HttpServerRequest<ByteBuf> request,
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.