GET | /healthcheck | The request for getting health check information. | Depending on the execution mode, you can determine different states of the server. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ExtremeReach.Diagnostics.App.Types
Namespace Global
Namespace ExtremeReach.Diagnostics.App.Types
Public Enum ExecutionMode
Basic = 1
Standard = 2
Advanced = 3
End Enum
Public Partial Class 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")>
Public Overridable Property ExecutionMode As ExecutionMode
'''<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")>
Public Overridable Property ServerType As ServerType
'''<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")>
Public Overridable Property IncludeServerStateInformation As Boolean
'''<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")>
Public Overridable Property SuppressErrorCodes As Boolean
'''<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")>
Public Overridable Property SuppressDeploymentErrors As Boolean
End Class
Public Partial Class HealthCheckResponse
Public Sub New()
MonitorSummaries = New List(Of MonitorSummary)
End Sub
Public Overridable Property ServerState As ServerState
Public Overridable Property Status As MonitoringStatus
Public Overridable Property StatusMessage As String
Public Overridable Property CorrelationId As String
Public Overridable Property FailedMonitorCount As Integer
Public Overridable Property MonitorSummaries As List(Of MonitorSummary)
Public Overridable Property ExecutionMetrics As MonitorExecutionMetrics
End Class
Public Partial Class MonitorExecutionMetrics
Public Overridable Property StartDateTime As Date
Public Overridable Property EndDateTime As Date
Public Overridable Property Duration As TimeSpan
End Class
Public Partial Class MonitoringResult
Public Sub New()
ErrorMessages = New List(Of String)
End Sub
Public Overridable Property MonitoringName As String
Public Overridable Property Status As MonitoringStatus
Public Overridable Property StatusMessage As String
Public Overridable Property ErrorMessages As List(Of String)
End Class
Public Enum MonitoringStatus
Success = 1
Failure = 2
End Enum
Public Partial Class MonitorSummary
Public Sub New()
Results = New List(Of MonitoringResult)
ErrorMessages = New List(Of String)
End Sub
Public Overridable Property MonitorName As String
Public Overridable Property Status As MonitoringStatus
Public Overridable Property Results As List(Of MonitoringResult)
Public Overridable Property ErrorMessages As List(Of String)
End Class
Public Partial Class ServerState
Public Overridable Property ServerName As String
Public Overridable Property TotalRamInMb As Nullable(Of Decimal)
Public Overridable Property AvailableRamInMb As Nullable(Of Decimal)
Public Overridable Property UsedCpuPercent As Nullable(Of Decimal)
End Class
Public 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
End Enum
End Namespace
End Namespace
VB.NET HealthCheckRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /healthcheck HTTP/1.1 Host: 54.235.149.200 Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv 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":"\/Date(-62135596800000-0000)\/","EndDateTime":"\/Date(-62135596800000-0000)\/","Duration":"PT0S"}}