Beispiel #1
0
        public ActionResult <object> GetServerHealtChecks(string serverId)
        {
            try
            {
                var server = ServerManager.GetServer(serverId);
                if (server != null)
                {
                    var healthChecks = HealthCheckManager.GetHealthChecks(server, false);
                    return(Ok(healthChecks));
                }

                return(BadRequest(new ErrorMessage("Cannot get server for specified id")));
            }
            catch (Exception e)
            {
                Logger.Error(e);
            }

            return(BadRequest(new ErrorMessage("Cannot get health checks for server")));
        }
        public ActionResult <object> GetAllHealthChecks(bool includeServers = true)
        {
            var healthChecks = _healthCheckManager.GetHealthChecks(includeServers);

            return(Ok(healthChecks));
        }