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.
namespace ExtremeReach.Diagnostics.App.Types

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ServerState() = 
        member val ServerName:String = null with get,set
        member val TotalRamInMb:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val AvailableRamInMb:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val UsedCpuPercent:Nullable<Decimal> = new Nullable<Decimal>() with get,set

    type MonitoringStatus =
        | Success = 1
        | Failure = 2

    [<AllowNullLiteral>]
    type MonitoringResult() = 
        member val MonitoringName:String = null with get,set
        member val Status:MonitoringStatus = new MonitoringStatus() with get,set
        member val StatusMessage:String = null with get,set
        member val ErrorMessages:ResizeArray<String> = new ResizeArray<String>() with get,set

    [<AllowNullLiteral>]
    type MonitorSummary() = 
        member val MonitorName:String = null with get,set
        member val Status:MonitoringStatus = new MonitoringStatus() with get,set
        member val Results:ResizeArray<MonitoringResult> = new ResizeArray<MonitoringResult>() with get,set
        member val ErrorMessages:ResizeArray<String> = new ResizeArray<String>() with get,set

    [<AllowNullLiteral>]
    type MonitorExecutionMetrics() = 
        member val StartDateTime:DateTime = new DateTime() with get,set
        member val EndDateTime:DateTime = new DateTime() with get,set
        member val Duration:TimeSpan = new TimeSpan() with get,set

    [<AllowNullLiteral>]
    type HealthCheckResponse() = 
        member val ServerState:ServerState = null with get,set
        member val Status:MonitoringStatus = new MonitoringStatus() with get,set
        member val StatusMessage:String = null with get,set
        member val CorrelationId:String = null with get,set
        member val FailedMonitorCount:Int32 = new Int32() with get,set
        member val MonitorSummaries:ResizeArray<MonitorSummary> = new ResizeArray<MonitorSummary>() with get,set
        member val ExecutionMetrics:MonitorExecutionMetrics = null with get,set

    type ExecutionMode =
        | Basic = 1
        | Standard = 2
        | Advanced = 3

    type 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

    [<AllowNullLiteral>]
    type HealthCheckRequest() = 
        ///<summary>
        ///The mode used to determine what level of health check to perform.
        ///</summary>
        [<ApiMember(DataType="ExecutionMode", Description="The mode used to determine what level of health check to perform.", IsRequired=true, ParameterType="query")>]
        member val ExecutionMode:ExecutionMode = new ExecutionMode() with get,set

        ///<summary>
        ///The type of server that will be used to determine which monitors will be run.
        ///</summary>
        [<ApiMember(DataType="ServerType", Description="The type of server that will be used to determine which monitors will be run.", IsRequired=true, ParameterType="query")>]
        member val ServerType:ServerType = new ServerType() with get,set

        ///<summary>
        ///Indicates whether or not to include server state information in the response.
        ///</summary>
        [<ApiMember(DataType="boolean", Description="Indicates whether or not to include server state information in the response.", ParameterType="query")>]
        member val IncludeServerStateInformation:Boolean = new Boolean() with get,set

        ///<summary>
        ///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.
        ///</summary>
        [<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")>]
        member val SuppressErrorCodes:Boolean = new Boolean() with get,set

        ///<summary>
        ///Indicates whether or not to suppress deployment-related errors.
        ///</summary>
        [<ApiMember(DataType="boolean", Description="Indicates whether or not to suppress deployment-related errors.", ParameterType="query")>]
        member val SuppressDeploymentErrors:Boolean = new Boolean() with get,set

F# HealthCheckRequest DTOs

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

HTTP + JSV

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

GET /healthcheck HTTP/1.1 
Host: identity.extremereach.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ServerState: 
	{
		ServerName: String,
		TotalRamInMb: 0,
		AvailableRamInMb: 0,
		UsedCpuPercent: 0
	},
	Status: Success,
	StatusMessage: String,
	CorrelationId: String,
	FailedMonitorCount: 0,
	MonitorSummaries: 
	[
		{
			MonitorName: String,
			Status: Success,
			Results: 
			[
				{
					MonitoringName: String,
					Status: Success,
					StatusMessage: String,
					ErrorMessages: 
					[
						String
					]
				}
			],
			ErrorMessages: 
			[
				String
			]
		}
	],
	ExecutionMetrics: 
	{
		StartDateTime: 0001-01-01,
		EndDateTime: 0001-01-01,
		Duration: PT0S
	}
}