public HealthCheckFacet Redis() { var checkResult = new HealthCheckFacet { Name = "Redis", Healthy = true }; var redisConnection = new Lazy <ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect(_config.RedisDbConnectionString)); var redisDb = redisConnection.Value.GetDatabase(); return(checkResult); }
public HealthCheckFacet SitecoreMongo() { var checkResult = new HealthCheckFacet { Name = "SitecoreMongo", Healthy = true, }; var client = new MongoClient(_config.MongoDbConnectionString); var server = new MongoServer(MongoServerSettings.FromClientSettings(client.Settings)); client.ListDatabases(CancellationToken.None);//get mongo to do something first, otherwise the server ping will fail the first time after the app starts server.Ping(); return(checkResult); }