Error Handling
Methods
- Account/Auth/
- Account/SSH/Key/
- Billing/Invoice/
- Billing/Payment/
- Cloud/Backup/
- Cloud/Config/
- Cloud/IP/Pool/
- Cloud/Image/
- Cloud/Server/
- Cloud/Template/
- Monitoring/Bandwidth/
- Monitoring/Load/
- Monitoring/Services/
- Network/DNS/Domain/
- Network/DNS/Record/
- Network/DNS/Reverse/
- Network/DNS/Zone/
- Network/Firewall/
- Network/Firewall/Ruleset/
- Network/IP/
- Network/LoadBalancer/
- Network/Pool/
- Network/Private/
- Network/Region/
- Network/Zone/
- Notifications/
- Order/AddOn/
- Product/
- Server/
- Server/VirtualDomain/
- Storage/Block/Cluster/
- Storage/Block/Volume/
- Support/Alert/
- Utilities/Info/
- VIP/
- VPN/
API Documentation (API Version v1)
Monitoring/Load/
DESCRIPTION
This section contains methods for quering the load and usage statistics of a server.
graph
URL:
https://api.liquidweb.com/v1/Monitoring/Load/graph
Description:
Get a load graph for a server as a base64 encoded blob.
'stat' is the load statistic to be graphed. Available options are:
'load1' - 1 minute load average 'load5' - 5 minute load average 'load15' - 15 minute load average 'rproc' - running process count 'tproc' - total process count 'pmem' - physical memory usage 'smem' - swap (virtual) memory usage 'diskroot' - /root volume usage 'diskbackup' - /backup volume usage 'diskhome' - /home volume usage 'disktmp' - /tmp volume usage 'diskusr' - /usr volume usage 'diskvar' - /var volume usage
'duration' is the duration of data you wish to graph. The default is to get the last day, but the following options are available:
'6hour', '12hour', 'day', '3day', 'week', '2week'
Examples:
Perl:
my $graph = $api->request('monitoring/load/graph', { stat => 'load1', uniq_id => 'ABCD1234' }); print "Content-type: $graph->{content_type}\n\n"; print MIME::Base64::decode_base64($graph->{content});
Parameters:
Parameter | Type | Notes |
---|---|---|
compact | A boolean value (0 or 1). | |
duration | A single word, consisting of only letters and digits. | * Optional
|
height | A positive integer value (i.e. 1 and up). | |
stat | A single word, consisting of only letters and digits. | * Required |
uniq_id | A six-character identifier, containing only capital letters and digits. | * Required |
width | A positive integer value (i.e. 1 and up). |
Returns:
Field | Type |
---|---|
content | A base64 string, consisting of letters, digits, +, /, possibly terminated by zero to two "=" characters |
content_type | A MIME type, such as application/octet-stream, image/png, or text/plain |
Possible Errors:
Refer to the Error Handling documentation for the list of exception types
stats
URL:
https://api.liquidweb.com/v1/Monitoring/Load/stats
Description:
Get load stats for a server. Memory is returned in units of MB, whereas disk usage is in terms of GB. Values can be returned as 'N/A' if there was no data collected or the item in question is not something on the server.
Parameters:
Parameter | Type | Notes |
---|---|---|
uniq_id | A six-character identifier, containing only capital letters and digits. | * Required |
Returns:
Field | Type | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
disk | An associative array containing the fields: | |||||||||||||||||||||||
| ||||||||||||||||||||||||
domain | A fully-qualified domain name (i.e. liquidweb.com, www.liquidweb.com, etc) | |||||||||||||||||||||||
loadavg | An associative array containing the fields: | |||||||||||||||||||||||
| ||||||||||||||||||||||||
memory | An associative array containing the fields: | |||||||||||||||||||||||
| ||||||||||||||||||||||||
proc | An associative array containing the fields: | |||||||||||||||||||||||
| ||||||||||||||||||||||||
uptime | A string of text, containing no newlines or other control characters. |
Possible Errors:
Refer to the Error Handling documentation for the list of exception types