本文へスキップ

Spot情報照会

活性化状態のエージェント数

GET https://service.whatap.io/open/json/act_agent

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/act_agent"
Sever monitoring response
{
"pname": "LOCAL_INFRA",
"values": "57.0"
}

非活性化状態のエージェント数

GET https://service.whatap.io/open/json/inact_agent

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/inact_agent"
response
{
"pname": "LOCAL_INFRA",
"values": "4.0"
}

ホスト(HOST) 数

GET https://service.whatap.io/open/json/host

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/host"
response
{
"pname": "LOCAL_INFRA",
"values":"57.0"
}

ホストCPUコアの合計

GET https://service.whatap.io/open/json/cpucore

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/cpucore"
response
{
"pname":"LOCAL_INFRA",
"values":"108.0"
}

CPU使用率

GET https://service.whatap.io/open/json/infra_cpu

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/json/infra_cpu"
response
{
"pname": "LOCAL_INFRA",
"values": {
"s-p-gtw-03": 2.802803,
"t-a-yrd-01": 8.709015,
(...)
}
}

ディスクIOPSの合計

GET https://service.whatap.io/open/json/infra_disk_iops

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/infra_disk_iops"
response
{
"pname":"LOCAL_INFRA",
"values":{
"s-a-yrd-01-1": {
"bps": 4447.892,
"iops": 0.77481234
},
"h-i-yrd-02": {
"bps": 6203241.5,
"iops": 396.4099
},
(...)
}
}

ネットワークトラフィック(IN/OUT)の合計

GET https://service.whatap.io/open/json/infra_net_traffic

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/infra_net_traffic"
response
{
"pname":"LOCAL_INFRA",
"values":{
"s-p-gtw-03": 4487137.014340188,
"t-a-yrd-01": 2500277.566511181,
(...)
}
}

プロセス状況

GET https://service.whatap.io/open/json/infra_proc

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/infra_proc"
response
{
"pname":"LOCAL_INFRA",
"values":{
"s-p-gtw-03": [
{
"memoryBytes": 1274269696,
"bps": 819.2,
"cmd1": "java",
"cpu": 2.8507125
},
{
"memoryBytes": 2895872,
"bps": 0,
"cmd1": "rsyslogd",
"cpu": 0
},
(...)
],
"t-a-yrd-01": [
{
"memoryBytes": 2583621632,
"bps": 1175961.5,
"cmd1": "java",
"cpu": 10.621243
},
(...)
],
(...)
}
}

サーバーリスト

GET https://service.whatap.io/open/json/sm_servers

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/sm_servers"
response
{
"pname":"LOCAL_INFRA",
"values":[
{
"os.status": "ok",
"oname": "h-db-prx-01",
"os.name": "linux",
"oid": -1359816680,
"isActive": true
},
{
"os.status": "ok",
"oname": "h-db-prx-02",
"os.name": "linux",
"oid": 1745981315,
"isActive": true
},
(...)
]
}

サーバーモニタリングの詳細

GET https://service.whatap.io/open/json/sm

command
$ curl -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://service.whatap.io/open/json/sm"
response
{
"pname":"LOCAL_INFRA",
"values":{
"servers": [
{
"public_ip": "192.168.0.1",
"os_cpuvendor": "Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz",
"agent_created": "49572130779",
"ip": "127.0.0.1,10.128.0.1",
"os_arch": "amd64",
"actTime": 1570672662216,
"cpu_cores": "1",
"oid": -1359816680,
"isActive": true,
"version": "1.2.5",
"tags": [
"gateway",
"python",
"network:10.0.0.0/8",
"@PRX"
],
"inactTime": 0,
"oname": "h-db-prx-01",
"os_name": "linux",
"startTime": 1570672662000,
"os_memory": "2088476672",
"os_status": "ok",
"snapshot": {
"disk": {
"/boot": {
"writeIops": 0,
"fileSystem": "ext4",
"mountPoint": "/boot",
"queueLength": 0,
"usedSpace": 58863616,
"blksize": 4096,
"freeSpace": 841175040,
"display": true,
"count": 1,
"readBps": 0,
"totalSpace": 966778880,
"ioPercent": 0,
"mountOption": "rw,relatime",
"deviceId": "/dev/sda1",
"usedPercent": 6.540122985839844,
"freePercent": 93.45987701416016,
"writeBps": 0,
"readIops": 0
},
"/home": {
"writeIops": 0,
"fileSystem": "ext4",
"mountPoint": "/home",
"queueLength": 0,
"usedSpace": 1670574080,
"blksize": 4096,
"freeSpace": 69533446144,
"display": true,
"count": 1,
"readBps": 0,
"totalSpace": 75039498240,
"ioPercent": 0,
"mountOption": "rw,relatime",
"deviceId": "/dev/sda3",
"usedPercent": 2.3461761474609375,
"freePercent": 97.65382385253906,
"writeBps": 0,
"readIops": 0
},
"/": {
"writeIops": 0,
"fileSystem": "ext4",
"mountPoint": "/",
"queueLength": 0,
"usedSpace": 5079060480,
"blksize": 4096,
"freeSpace": 22798901248,
"display": true,
"count": 1,
"readBps": 0,
"totalSpace": 29394726912,
"ioPercent": 0,
"mountOption": "rw,relatime",
"deviceId": "/dev/sda2",
"usedPercent": 18.218902587890625,
"freePercent": 81.78109741210938,
"writeBps": 0,
"readIops": 0
}
},
"memory": {
"shared": 21590016,
"swapused": 0,
"buffers": 182550528,
"available": 1746370560,
"swaptotal": 0,
"used": 342106112,
"pused": 16.380653381347656,
"slab": 85729280,
"total": 2088476672,
"sunreclaim": 23261184,
"cached": 521756672,
"pavailable": 83.61934661865234,
"pagefaults": 0,
"sreclaimable": 62468096,
"free": 1167208448,
"swappused": 0
},
"cpu": {
"softirq": 0,
"usr": 0,
"idle": 100,
"steal": 0,
"irq": 0,
"load5": 0,
"iowait": 0,
"sys": 0,
"nice": 0,
"load1": 0,
"load15": 0
},
"open_filedescriptors": 249,
"netstat": {
"established": 1,
"syn_sent": 1,
"syn_recv": 0,
"closing": 0,
"time_wait": 19,
"last_ack": 0,
"fin_wait1": 0,
"close_wait": 0,
"fin_wait2": 0,
"listen": 3,
"unknown": 0
},
"uptime": 16313689,
"network": {
"lo": {
"errorOut": 0,
"packetOut": 0.3991734786600438,
"trafficIn": 281.0181289766709,
"trafficOut": 281.0181289766709,
"hwAddr": "",
"errorIn": 0,
"ip": "127.0.0.1",
"count": 1,
"droppedIn": 0,
"droppedOut": 0,
"packetIn": 0.3991734786600438,
"desc": "lo"
},
"eth0": {
"errorOut": 0,
"packetOut": 8.1830563125309,
"trafficIn": 11314.173079140282,
"trafficOut": 19447.731880317337,
"hwAddr": "00:1d:d8:b7:87:18",
"errorIn": 0,
"ip": "10.128.112.133",
"count": 1,
"droppedIn": 0,
"droppedOut": 0,
"packetIn": 24.549168937592693,
"desc": "eth0"
}
}
}
},
(...)
],
"max": {
"disk": {
"writeIops": 240.9893,
"usedPercent": 94.38699,
"freePercent": 100,
"usedSpace": 2.46495681E+12,
"freeSpace": 0,
"writeBps": 2917852,
"readBps": 118646.15,
"readIops": 75.80727,
"totalSpace": 9.223372E+18,
"ioPercent": 100,
"freespace": 1.58926471E+11
},
"nic": {
"errorOut": 0,
"packetOut": 2175.8743,
"trafficIn": 4856648,
"trafficOut": 2503208.8,
"errorIn": 1,
"droppedIn": 1,
"droppedOut": 0,
"packetIn": 2175.8743
},
"compound_eye_traffic": 1000000000
},
"count": {
"total": 14,
"paused": 0,
"inactive": 0,
"warning": 1,
"ok": 13,
"close": 0,
"fatal": 0
},
"tags": {
(...)
}
}
}