Returns the system health status for a given time period.
GET https://<address>/wsapis/v2.0.0/common/health/history/<service_id>?start_time=<UTC_time?&end_time=<UTC_time>
Availability
This command is available on the following appliances:
Email Security — Server
Required headers:
X-FeApi-Token: [API-Token] X-FeClient-Token: [Client-Token]
Parameters
service_id—Specifies the service.start_time—Specifies the beginning of the time range in UTC format (yyyy-MM-dd'T'HH:mm:ss.SSSZ).end_time—Specifies the end of the time range in UTC format (yyyy-MM-dd'T'HH:mm:ss.SSSZ).
Example request
GET https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/common/health/history/system_load_health?start_time=yyyy-MM-dd'T'HH:mm:ss.SSSZ&end_time=yyyy-MM-dd'T'HH:mm:ss.SSSZ
Request headers:
X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx X-FeClient-Token: BigDataInc
System health history response
Line breaks have been added for readability.
HTTP/1.1 [Response Code] [Response Message] Date: [Date]
Response
Response Code—A standard HTML response code.
200—Request successful.
401—Request unsuccessful because the session token was invalid.
Response Message—A standard HTML response message.
OK—Request successful.
Unauthorized—Request unsuccessful because the session token was invalid.
Date—Standard HTML date format.
Example
Line breaks have been added for readability.
[
{
"name" : "CPU Service",
"service_id" : "system_load_health",
"description" : "CPU health status",
"status" : "HEALTHY",
"timestamp" : "11111(UTC)",
"details" : {
"text" : "CPU is currently healthy"
}
},
{
"name" : "CPU Service",
"service_id" : "system_load_health",
"description" : "CPU health status",
"status" : "DEGRADED",
"timestamp" : "2222(UTC)",
"details" : {
"text" : "CPU load is over 90%"
}
},
{
"name" : "CPU Service",
"service_id" : "system_load_health",
"description" : "CPU health status",
"status" : "HEALTHY",
"timestamp" : "3333(UTC)",
"details" : {
"text" : "CPU is currently healthy"
}
},
. . .
]cURL code sample: system health history
The following code sample can be copied and executed from any command-line interface that includes the cURL library. This sample builds on the authentication cURL code sample.
Note
In this sample, line breaks are added for readability. Remove these line breaks before you paste the code sample into your command-line tool.
curl -qgsSkH --no-progress-bar --header "X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/common/health/history/system_load_health?start_time=2019-01-15'T'09:03:00.000Z=&end_time=2019-03-15'T'12:00:00.000Z
This cURL sample includes the following:
-q—This option specifies that thecurlrcconfig file is not read or used. Although this is an optional setting, Trellix recommends that you include this option.-g—This option turns off the URL globbing parser. Although this is an optional setting, Trellix recommends that you include this option.-s—This option turns off the progress meter and error message. Although this is an optional setting, Trellix recommends that you include this option.-S—When used with the-soption, this option shows error messages if your cURL switch fails. Although this is an optional setting, Trellix recommends that you include this option.-k—This option explicitly allows cURL to perform insecure SSL connections and transfers. This allows you to test your SSL connection without installing a CA certificate.-H—This option allows you to specify a custom header with the--headerswitch.--no-progress-bar—This option suppresses the cURL download progress bar, which can interfere with the request.--header "X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This custom header returns the API token that was provided during the authentication request. In the authentication cURL code sample, this token was included in theauth.txtfile. Replace the token in the sample with the token value received in the response to your authentication request.Note
By default, the X-FeApi-Token times out after 15 minutes of inactivity.
https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/common/health/history/system_load_health?start_time=2019-01-15'T'09:03:00.000Z=&end_time=2019-03-15'T'12:00:00.000Z—The system health request URL. Replace the IP addressxxx.xxx.xxx.xxxwith the IP address of your appliance,cpuwith the service ID, and the times with the desired start and end times.
Results
This example returns a report of the system health history.