Check Server health
Description |
Server health |
URL Path |
/stat/serverhealth |
Method |
GET |
Summary
Retrieve server health including free disk space, RAM and CPU usage, disk queue length. These are average values based on sampling.
Use Cases (used by)
Management Console (to retrieve server statistics of memory, CPU usage, and average disk queue length to monitor server health).
HTTP header parameters
Header |
Description |
Required |
apikey |
API key assigned by OPSWAT or admin |
REQUIRED |
Method: GET
/stat/serverhealth |
Returns all entries in server health recorded. |
/stat/serverhealth/{N} |
n is hours. It will return entry between(inclusive) HH-n:00 and HH:00. For example: call /stat/serverhealth/1 at 13:13, server will return entry between 12:00 and 13:00. |
Response Codes
Code |
Status Description |
Notes |
200 |
OK |
successful response |
400 |
Bad request |
Not supported HTTP method or invalid http request. |
401 |
Permission Denied for statistic |
Either missing API key or invalid API is passed. |
500 |
Internal server error |
Server temporary unavailable. Try again later. |
Response
Example of successful scan request:
[
{
"usage_check_localtime"
:
"2016-02-03T12:00:00-08:00"
,
"avg_ram_usage"
: 84.92316500345866,
"avg_cpu_usage"
: 13.39331203699112,
"avg_disk_q_len"
: 0.2144404633436352,
"avg_disk_free_space"
: 25.00000000000000
},
{
"usage_check_localtime"
:
"2016-02-03T13:00:00-08:00"
,
"avg_ram_usage"
: 82.8503189086914,
"avg_cpu_usage"
: 2.4295437335968018,
"avg_disk_q_len"
: 0.0027925085742026567,
"avg_disk_free_space"
: 25.0000000000000000
}
]
Descriptions of response:
Response |
Description |
usage_check_localtime |
The local time when the information is queried. |
avg_ram_usage |
Average of RAM usage of Metadefender Core server as a percentage of total RAM. |
avg_cpu_usage |
Average of CPU usage of Metadefender Core server as a percentage of total CPU. |
avg_disk_q_len |
Tracks the number of requests that are queued and waiting for a disk during the sample interval, as well as requests in service. |
avg_disk_free_space |
Average free disk space on Metadefender Core server as a percentage of total space. |