URI

/v2/server/statistics/${task_id}.json?start_date=XX&end_date=XX&type=XX

Method

GET

参数说明

参数名

必填

描述

默认值

access_token

必填



task_id

必填

服务监控项目ID

[注:通过服务监控任务列表得到]


start_date

选填

开始日期 [Y-m-d]

默认当天

end_date

选填

结束日期 [Y-m-d]

type

选填

服务器里某个监控任务 [eg: cpu, load, netio, diskio,mem, diskstore,   cpu_windows,mem_windows]

全部

成功调用结果:

Linux系统

{

  "cpu": {

    "list": [],

    "statistic": {

      "cpu_used_percent_avg": 0,

      "cpu_system_percent": 0,

      "cpu_wait_percent": 0,

      "cpu_idle_percent": 0

    }

  },

  "load": {

    "list": [],

    "statistic": []

  },

  "mem": {

    "list": [],

    "statistic": []

  },

  "netio": {

    "list": [],

    "statistic": []

  },

  "diskstore": {

    "list": [],

    "statistic": {

      "diskstore": {

        "/": {

          "total":   "126.08",

          "used":   "112.74",

          "avail":   "13.34"

        },

        "/boot": {

          "total":   "0.10",

          "used": "0.01",

          "avail": "0.09"

        }

      }

    }

  },

  "diskio": {

    "list": [],

    "statistic": {

      "sda": {

        "io_byte": {

          "wb_avg":   "0.00",

          "wb_max":   "0.00",

          "rb_avg":   "0.00",

          "rb_max":   "0.00"

        },

        "io_sum": {

          "ws_avg":   "0.00",

          "ws_max":   "0.00",

          "rs_avg":   "0.00",

          "rs_max":   "0.00"

        }

      },

      "sda2": {

        "io_byte": {

          "wb_avg":   "0.00",

          "wb_max":   "0.00",

          "rb_avg": "0.00",

          "rb_max":   "0.00"

        },

        "io_sum": {

          "ws_avg":   "0.00",

          "ws_max":   "0.00",

          "rs_avg":   "0.00",

          "rs_max":   "0.00"

        }

      },

      "sda3": {

        "io_byte": {

          "wb_avg":   "0.00",

          "wb_max":   "0.00",

          "rb_avg":   "0.00",

          "rb_max":   "0.00"

        },

        "io_sum": {

          "ws_avg":   "0.00",

          "ws_max":   "0.00",

          "rs_avg":   "0.00",

          "rs_max":   "0.00"

        }

      },

      "dm-0": {

        "io_byte": {

          "wb_avg":   "0.00",

          "wb_max":   "0.00",

          "rb_avg":   "0.00",

          "rb_max":   "0.00"

        },

        "io_sum": {

          "ws_avg":   "0.00",

          "ws_max":   "0.00",

          "rs_avg":   "0.00",

          "rs_max":   "0.00"

        }

      }

    }

  }

}

 

Windows系统

{

  "cpu_windows": {

    "list": [

      {

          "check_date": "2016-06-15",

          "cpu_percent_avg": "5.29",

          "cpu_percent_max": "10.38",

          "cpu_percent_min": "2.50"

      }

    ],

    "statistic": {

        "cpu_percent_avg": "5.29"

    }

  },

  "mem_windows": {

    "list": [],

    "statistic": {

      "total":   "16370.75",

      "used":   "12378.25",

        "used_percent": "75.61",

      "vtotal":   "18796.31",

      "vused":   "12575.31",

        "vused_percent": "66.90"

    }

  },

  "netio": {

    "list": [],

    "statistic": {

        "MS+TCP+Loopback+interface": {

        "Mbps": {

            "in_avg": "0.00 Mbps",

            "in_max": "0.00 Mbps",

            "out_avg": "0.00 Mbps",

            "out_max": "0.00 Mbps"

        },

        "KByte": {

            "in_avg": "0.01 KB/s",

            "in_max": "0.01 KB/s",

            "out_avg": "0.01 KB/s",

            "out_max": "0.01 KB/s"

        },

        "pkt": {

            "inp_avg": "0 /s",

            "inp_max": "0 /s",

            "outp_avg": "0 /s",

            "outp_max": "0 /s"

        }

      },

        "Broadcom+BCM5709C+NetXtreme+II+GigE+%28NDIS+VBD+Client%29+%2324":   {

        "Mbps": {

          "in_avg":   "0.02 Mbps",

            "in_max": "0.02 Mbps",

            "out_avg": "0.02 Mbps",

            "out_max": "0.03 Mbps"

        },

        "KByte": {

            "in_avg": "1.99 KB/s",

            "in_max": "2.61 KB/s",

            "out_avg": "2.73 KB/s",

          "out_max": "3.33   KB/s"

        },

        "pkt": {

            "inp_avg": "8 /s",

            "inp_max": "11 /s",

            "outp_avg": "7 /s",

            "outp_max": "9 /s"

        }

      },

        "Broadcom+BCM5709C+NetXtreme+II+GigE+%28NDIS+VBD+Client%29+%2326":   {

        "Mbps": {

            "in_avg": "0.24 Mbps",

            "in_max": "0.28 Mbps",

            "out_avg": "1.48 Mbps",

            "out_max": "1.65 Mbps"

        },

        "KByte": {

            "in_avg": "31.13 KB/s",

            "in_max": "35.24 KB/s",

            "out_avg": "189.40 KB/s",

            "out_max": "211.36 KB/s"

        },

        "pkt": {

            "inp_avg": "316 /s",

            "inp_max": "357 /s",

            "outp_avg": "278 /s",

            "outp_max": "317 /s"

        }

      }

    }

  },

  "diskstore": {

    "list": [],

    "statistic": {

      "diskstore":   {

        "C": {

          "total":   "80.60",

          "used":   "21.65",

          "avail":   "58.95"

        },

        "D": {

          "total":   "198.79",

          "used":   "180.25",

          "avail":   "18.54"

        },

        "E": {

          "total":   "279.38",

          "used":   "200.07",

          "avail":   "79.31"

        }

      }

    }

  }

}

监控项目

分类

返回项

类型

描述

cpu

CPU使用率

list

CPU使用率趋势图

check_date

String

年月日

cpu_used_percent_avg

String

CPU平均使用率

cpu_used_percent_max

String

最大使用率

cpu_used_percent_min

String

最小使用率

statistic

cpu_used_percent_avg

String

用户使用百分比

cpu_system_percent

String

系统使用百分比

cpu_wait_percent

String

I/O等待百分比

cpu_idle_percent

String

空闲百分比

cpu_windows

CPU使用率

list

CPU使用率趋势图

check_date

String

年月日

cpu_percent_avg

String

CPU平均使用率

cpu_percent_max

String

CPU最大使用率

cpu_percent_min

String

CPU最小使用率

statistic

cpu_percent_avg

String

CPU平均使用率

load

CPU负载

list

CPU负载趋势图

check_date

String

年月日

load_avg

String

平均负载

load_max

String

最大负载

load_min

String

最小负载

statistic

CPU负载统计数据,暂不支持


String


mem内存

list

趋势, 暂不支持


String


statistic

统计数据

total_real

String

总物理内存

used_percent

String

使用率

avail_real

String

空闲内存

buffer_avg

String

高速缓存

cached_avg

String

页面缓存

application_mem

String

应用程序内存

total_swap

String

swap总内存

used_swap

String

Swap已使用内存

mem_windows

内存

list

趋势,暂不支持


String


statistic

统计数据

total

String

物理内存

 

used

String

已使用物理内存

 

user_percent

String

剩余物理内存

 

vtotal

String

虚拟内存

 

vused

String

已使用虚拟内存

vuser_percent

String

剩余虚拟内存

 

netio

网络IO

list

趋势,暂不支持


String


statistic

统计数据

lo

String

设备号

Mbps

String

比特流量

in_avg

String

流入平均值

in_max

String

流入最大值

out_avg

String

流出平均值

out_max

String

流出最大值

KByte

String

字节流量

in_avg

String

流入平均值

in_max

String

流入最大值

out_avg

String

流出平均值

out_max

String

流出最大值

pkt

String

流量包流量

inp_avg

String

流入数据包平均值

inp_max

String

流入数据包最大值

outp_avg

String

流出数据包平均值

outp_max

String

流出数据包最大值

diskstore

磁盘空间使用率

list

暂不支持


String


statistic

total

String

磁盘总容量

used

String

磁盘已使用容量

avail

String

空闲容量

diskio

磁盘I/O统计

list

趋势,暂不支持


String


statistic

统计数据

vda

String

磁盘分区

io_byte

String

I/O 速率

wb_avg

String

写入平均值

wb_max

String

写入最大值

rb_avg

String

读取平均值

rb_max

String

读取最大值

io_sum

String

I/O次数

ws_avg

String

平均写入次数

ws_max

String

最大写入次数

rs_avg

String

平均读取次数

rs_max

String

最大读取次数

失败调用结果:

{

    "code": 400,

    "msg": "您无权访问该服务器"

}

返回项

类型

描述

code

String

错误码

msg

String

错误信息


调用示例:

curl -s 'https://api.jiankongbao.com/v2/server/statistics/57717.json?access_token=2f15f93ec
d01530256e06ca060e51316e10eecc0'