Use Host Info operations can to gather information about an entity, or to build your own dashboards. This information is gathered on demand so that you have the most recent data. Some of the data that can be enumerated includes: operating system info, process lists, network configuration, and memory usage.
The following operations are the common agent host info API operations that you can use to get information about the host environment, resources, and logged in users. For the full list of supported agent host info, see Hostinfo checks
- Get agent host info types
- Get CPU information
- Get disk information
- Get host filesystem information
- Get host memory information
- Get host network interface information
- Get host process information
- Get host system information
- Get information about host users
Get agent host info types
GET /agents/{agentId}/host_info_types
Get information about the types of host info data supported by the agent.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
413 | Over Limit | The response body is too large. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get agent host info types: JSON response
{
"timestamp": 1354038712351,
"info": {
"types": [
"cpus",
"disks",
"filesystems",
"memory",
"network_interfaces",
"nil",
"processes",
"system",
"who",
"date",
"sysctl"
]
}
Get CPU information
GET /agents/{agentId}/host_info/cpus
Get information about the host CPUs.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get CPU information: JSON response
{
"timestamp": 1354038712351,
"info": [
{
"name": "cpu.0",
"vendor": "Intel",
"model": "Core(TM) i7-2760QM CPU @ 2.40GHz",
"mhz": 2394,
"idle": 32872370,
"irq": 2320,
"soft_irq": 3390,
"nice": 10,
"sys": 247780,
"user": 235470,
"wait": 12180,
"total": 33373520,
"total_cores": 2,
"total_sockets": 2
},
{
"name": "cpu.1",
"vendor": "Intel",
"model": "Core(TM) i7-2760QM CPU @ 2.40GHz",
"mhz": 2394,
"idle": 32921490,
"soft_irq": 10910,
"sys": 239540,
"user": 236780,
"wait": 12020,
"total": 33420740,
"total_cores": 2,
"total_sockets": 2
}
]
}
Get disk information
GET /agents/{agentId}/host_info/disks
Get information about the disks available on the host.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get disk information: JSON response
{
"timestamp": 1354039239737,
"info": [
{
"read_bytes": 213685248,
"reads": 23758,
"rtime": 18160,
"write_bytes": 8399753216,
"writes": 2056309,
"wtime": 3341340,
"time": 458360,
"name": "/"
},
{
"read_bytes": 22974464,
"reads": 899,
"rtime": 440,
"write_bytes": 15360,
"writes": 8,
"time": 400,
"name": "/boot"
}
]
}
Get host filesystem information
GET /agents/{agentId}/host_info/filesystems
Get information about the filesystems on the host.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get host filesystem information: JSON response
{
"timestamp": 1354040333343,
"info": [
{
"dir_name": "/",
"dev_name": "/dev/mapper/dev-root",
"sys_type_name": "ext4",
"options": "rw,errors=remount-ro",
"free": 9095192,
"used": 10389956,
"avail": 8105396,
"total": 19485148,
"files": 1237888,
"free_files": 990331
}
]
}
Get host memory information
GET /agents/{agentId}/host_info/memory
Get information about the host memory use.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get host memory information: JSON response
{
"timestamp": 1354038868450,
"info": {
"actual_free": 3117314048,
"actual_used": 1451307008,
"free": 2726739968,
"ram": 4360,
"swap_free": 926932992
"swap_page_in": 926932992,
"swap_page_out": 926932992,
"swap_total": 926932992,
"swap_used": 926932992,
"total": 4568621056,
"used": 1841881088
}
}
Get host network interface information
GET /agents/{agentId}/host_info/network_interaces
Get information about the host network interfaces.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get host network interface information: JSON response
{
"timestamp": 1354038900510,
"info": [
{
"name": "lo",
"type": "Local Loopback",
"address": "127.0.0.1",
"netmask": "255.0.0.0",
"address6": "::1",
"broadcast": "0.0.0.0",
"hwaddr": "00:00:00:00:00:00",
"mtu": 16436,
"rx_packets": 361762,
"rx_bytes": 92488304,
"tx_packets": 361762,
"tx_bytes": 92488304,
"flags": 73
},
{
"name": "eth0",
"type": "Ethernet",
"address": "192.168.95.128",
"netmask": "255.255.255.0",
"address6": "fe80::250:56ff:fe24:bbbb",
"broadcast": "192.168.95.255",
"hwaddr": "00:00:00:00:00:00",
"mtu": 1500,
"rx_packets": 13142,
"rx_bytes": 1838773,
"tx_packets": 12087,
"tx_bytes": 6282141,
"flags": 2115
}
]
}
Get host process information
GET /agents/{agentId}/host_info/processes
Get information about the host processes.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get host process information: JSON response
{
"timestamp": 1354040508264,
"info": [
{
"pid": 1,
"exe_name": "/sbin/init",
"exe_cwd": "/",
"exe_root": "/",
"time_total": 2080,
"time_sys": 2010,
"time_user": 70,
"time_start_time": 1354005304000,
"state_name": "init",
"state_priority": 20,
"state_threads": 1,
"memory_size": 24387584,
"memory_resident": 2088960,
"memory_share": 1335296,
"memory_major_faults": 24,
"memory_minor_faults": 7810,
"memory_page_faults": 7834
}
]
}
Get host system information
GET /agents/{agentId}/host_info/system
Get system information for the host.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
This table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get host system information: JSON response
{
"timestamp": 1354039150948,
"info": {
"name": "Linux",
"arch": "x86_64",
"version": "2.6.32-44-server",
"vendor": "Ubuntu",
"vendor_version": "10.04"
}
}
Get information about host users
GET /agents/{agentId}/host_info/who
Get information about users who are logged into the host.
The following table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | OK | The request completed. |
400 | Bad request | The system received an invalid value in a request. |
401 | Unauthorized | The system received a request from a user that is not authenticated. |
403 | Forbidden | The system received a request that the user is not authorized to make. |
500 | Internal Server Error | An unexpected condition was encountered. |
503 | Service Unavailable | The system is experiencing heavy load or another system failure. |
The following table shows the header parameters for the request:
Name | Type | Description |
---|---|---|
X-Auth-Token | String (Required) | A valid authentication token with administrative access. For details, see Get your credentials |
Note
This operation does not accept a request body.
Example Get information about host users: JSON response
{
"timestamp": 1354124700975,
"info": [
{
"user": "testuser",
"device": "tty1",
"time": 1353953846
},
{
"user": "testuser",
"device": "pts/2",
"time": 1354117532,
"host": "192.168.95.1"
},
{
"user": "testuser",
"device": "pts/3",
"time": 1354124463,
"host": "comp8dv7m.local"
},
{
"user": "testuser",
"device": "pts/4",
"time": 1354124661,
"host": "comp8dv7m.local"
}
]
}