App_Features_Service

<back to all web services

HealthCheckRequest

The following routes are available for this service:
GET/healthcheckThe request for getting health check information.Depending on the execution mode, you can determine different states of the server.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class HealthCheckRequest
    {
        /**
        * The mode used to determine what level of health check to perform.
        */
        @ApiMember(DataType="ExecutionMode", Description="The mode used to determine what level of health check to perform.", IsRequired=true, ParameterType="query")
        public ExecutionMode ExecutionMode = null;

        /**
        * The type of server that will be used to determine which monitors will be run.
        */
        @ApiMember(DataType="ServerType", Description="The type of server that will be used to determine which monitors will be run.", IsRequired=true, ParameterType="query")
        public ServerType ServerType = null;

        /**
        * Indicates whether or not to include server state information in the response.
        */
        @ApiMember(DataType="boolean", Description="Indicates whether or not to include server state information in the response.", ParameterType="query")
        public Boolean IncludeServerStateInformation = null;

        /**
        * Indicates whether or not to suppress returning error codes. This will always return a 200 code to the caller, which is required for PRTG to process the JSON response properly.
        */
        @ApiMember(DataType="boolean", Description="Indicates whether or not to suppress returning error codes. This will always return a 200 code to the caller, which is required for PRTG to process the JSON response properly.", ParameterType="query")
        public Boolean SuppressErrorCodes = null;

        /**
        * Indicates whether or not to suppress deployment-related errors.
        */
        @ApiMember(DataType="boolean", Description="Indicates whether or not to suppress deployment-related errors.", ParameterType="query")
        public Boolean SuppressDeploymentErrors = null;
        
        public ExecutionMode getExecutionMode() { return ExecutionMode; }
        public HealthCheckRequest setExecutionMode(ExecutionMode value) { this.ExecutionMode = value; return this; }
        public ServerType getServerType() { return ServerType; }
        public HealthCheckRequest setServerType(ServerType value) { this.ServerType = value; return this; }
        public Boolean isIncludeServerStateInformation() { return IncludeServerStateInformation; }
        public HealthCheckRequest setIncludeServerStateInformation(Boolean value) { this.IncludeServerStateInformation = value; return this; }
        public Boolean isSuppressErrorCodes() { return SuppressErrorCodes; }
        public HealthCheckRequest setSuppressErrorCodes(Boolean value) { this.SuppressErrorCodes = value; return this; }
        public Boolean isSuppressDeploymentErrors() { return SuppressDeploymentErrors; }
        public HealthCheckRequest setSuppressDeploymentErrors(Boolean value) { this.SuppressDeploymentErrors = value; return this; }
    }

    public static enum ExecutionMode
    {
        Basic(1),
        Standard(2),
        Advanced(3);

        private final int value;
        ExecutionMode(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static enum ServerType
    {
        App(1),
        Sql(2),
        FtpApi(3),
        Ftp(4),
        Batch(5),
        Identity(6),
        Qc(7),
        XcodeV(8),
        XcodeC(9),
        MsgVast(10),
        AsgVast(11),
        Mongo(12),
        Agents(13);

        private final int value;
        ServerType(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class HealthCheckResponse
    {
        public ServerState ServerState = null;
        public MonitoringStatus Status = null;
        public String StatusMessage = null;
        public String CorrelationId = null;
        public Integer FailedMonitorCount = null;
        public ArrayList<MonitorSummary> MonitorSummaries = null;
        public MonitorExecutionMetrics ExecutionMetrics = null;
        
        public ServerState getServerState() { return ServerState; }
        public HealthCheckResponse setServerState(ServerState value) { this.ServerState = value; return this; }
        public MonitoringStatus getStatus() { return Status; }
        public HealthCheckResponse setStatus(MonitoringStatus value) { this.Status = value; return this; }
        public String getStatusMessage() { return StatusMessage; }
        public HealthCheckResponse setStatusMessage(String value) { this.StatusMessage = value; return this; }
        public String getCorrelationId() { return CorrelationId; }
        public HealthCheckResponse setCorrelationId(String value) { this.CorrelationId = value; return this; }
        public Integer getFailedMonitorCount() { return FailedMonitorCount; }
        public HealthCheckResponse setFailedMonitorCount(Integer value) { this.FailedMonitorCount = value; return this; }
        public ArrayList<MonitorSummary> getMonitorSummaries() { return MonitorSummaries; }
        public HealthCheckResponse setMonitorSummaries(ArrayList<MonitorSummary> value) { this.MonitorSummaries = value; return this; }
        public MonitorExecutionMetrics getExecutionMetrics() { return ExecutionMetrics; }
        public HealthCheckResponse setExecutionMetrics(MonitorExecutionMetrics value) { this.ExecutionMetrics = value; return this; }
    }

    public static class ServerState
    {
        public String ServerName = null;
        public BigDecimal TotalRamInMb = null;
        public BigDecimal AvailableRamInMb = null;
        public BigDecimal UsedCpuPercent = null;
        
        public String getServerName() { return ServerName; }
        public ServerState setServerName(String value) { this.ServerName = value; return this; }
        public BigDecimal getTotalRamInMb() { return TotalRamInMb; }
        public ServerState setTotalRamInMb(BigDecimal value) { this.TotalRamInMb = value; return this; }
        public BigDecimal getAvailableRamInMb() { return AvailableRamInMb; }
        public ServerState setAvailableRamInMb(BigDecimal value) { this.AvailableRamInMb = value; return this; }
        public BigDecimal getUsedCpuPercent() { return UsedCpuPercent; }
        public ServerState setUsedCpuPercent(BigDecimal value) { this.UsedCpuPercent = value; return this; }
    }

    public static enum MonitoringStatus
    {
        Success(1),
        Failure(2);

        private final int value;
        MonitoringStatus(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class MonitorSummary
    {
        public String MonitorName = null;
        public MonitoringStatus Status = null;
        public ArrayList<MonitoringResult> Results = null;
        public ArrayList<String> ErrorMessages = null;
        
        public String getMonitorName() { return MonitorName; }
        public MonitorSummary setMonitorName(String value) { this.MonitorName = value; return this; }
        public MonitoringStatus getStatus() { return Status; }
        public MonitorSummary setStatus(MonitoringStatus value) { this.Status = value; return this; }
        public ArrayList<MonitoringResult> getResults() { return Results; }
        public MonitorSummary setResults(ArrayList<MonitoringResult> value) { this.Results = value; return this; }
        public ArrayList<String> getErrorMessages() { return ErrorMessages; }
        public MonitorSummary setErrorMessages(ArrayList<String> value) { this.ErrorMessages = value; return this; }
    }

    public static class MonitoringResult
    {
        public String MonitoringName = null;
        public MonitoringStatus Status = null;
        public String StatusMessage = null;
        public ArrayList<String> ErrorMessages = null;
        
        public String getMonitoringName() { return MonitoringName; }
        public MonitoringResult setMonitoringName(String value) { this.MonitoringName = value; return this; }
        public MonitoringStatus getStatus() { return Status; }
        public MonitoringResult setStatus(MonitoringStatus value) { this.Status = value; return this; }
        public String getStatusMessage() { return StatusMessage; }
        public MonitoringResult setStatusMessage(String value) { this.StatusMessage = value; return this; }
        public ArrayList<String> getErrorMessages() { return ErrorMessages; }
        public MonitoringResult setErrorMessages(ArrayList<String> value) { this.ErrorMessages = value; return this; }
    }

    public static class MonitorExecutionMetrics
    {
        public Date StartDateTime = null;
        public Date EndDateTime = null;
        public TimeSpan Duration = null;
        
        public Date getStartDateTime() { return StartDateTime; }
        public MonitorExecutionMetrics setStartDateTime(Date value) { this.StartDateTime = value; return this; }
        public Date getEndDateTime() { return EndDateTime; }
        public MonitorExecutionMetrics setEndDateTime(Date value) { this.EndDateTime = value; return this; }
        public TimeSpan getDuration() { return Duration; }
        public MonitorExecutionMetrics setDuration(TimeSpan value) { this.Duration = value; return this; }
    }

}

Java HealthCheckRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /healthcheck HTTP/1.1 
Host: gc.tclclouds.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<HealthCheckResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExtremeReach.Diagnostics.App.Types">
  <CorrelationId>String</CorrelationId>
  <ExecutionMetrics>
    <Duration>PT0S</Duration>
    <EndDateTime>0001-01-01T00:00:00</EndDateTime>
    <StartDateTime>0001-01-01T00:00:00</StartDateTime>
  </ExecutionMetrics>
  <FailedMonitorCount>0</FailedMonitorCount>
  <MonitorSummaries>
    <MonitorSummary>
      <ErrorMessages xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </ErrorMessages>
      <MonitorName>String</MonitorName>
      <Results>
        <MonitoringResult>
          <ErrorMessages xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </ErrorMessages>
          <MonitoringName>String</MonitoringName>
          <Status>Success</Status>
          <StatusMessage>String</StatusMessage>
        </MonitoringResult>
      </Results>
      <Status>Success</Status>
    </MonitorSummary>
  </MonitorSummaries>
  <ServerState>
    <AvailableRamInMb>0</AvailableRamInMb>
    <ServerName>String</ServerName>
    <TotalRamInMb>0</TotalRamInMb>
    <UsedCpuPercent>0</UsedCpuPercent>
  </ServerState>
  <Status>Success</Status>
  <StatusMessage>String</StatusMessage>
</HealthCheckResponse>