Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"action":{"id":141,"uic":"admin,mm1","url":"","callback":0,"before_callback_sms":0,"before_callback_mail":0,"after_callback_sms":0,"after_callback_mail":0},"stratges":[{"id":686,"metric":"xxx.check","tags":"name=xxx","max_step":3,"priority":2,"func":"all(#2)","op":"<","right_value":"1","note":"xxx服务异常","run_begin":"","run_end":"","tpl_id":178},{"id":687,"metric":"xxx.sync","tags":"","max_step":3,"priority":2,"func":"all(#3)","op":"!=","right_value":"0","note":"XXX同步异常","run_begin":"","run_end":"","tpl_id":178},{"id":688,"metric":"bbb.check.mq","tags":"","max_step":3,"priority":2,"func":"all(#3)","op":"==","right_value":"1","note":"bbb连接MQ异常","run_begin":"","run_end":"","tpl_id":178},{"id":793,"metric":"aaa.proc.num","tags":"","max_step":3,"priority":2,"func":"all(#3)","op":"==","right_value":"1","note":"aaaa 进程大于5","run_begin":"","run_end":"","tpl_id":178}],"template":{"id":178,"tpl_name":"TemplateA","parent_id":0,"action_id":141,"create_user":"root"}}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"session is vaild!"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

[{"id":1,"tpl_name":"cpu.board","parent_id":0,"action_id":5,"create_user":"usera"},{"id":2,"tpl_name":"traffic checking","parent_id":0,"action_id":6,"create_user":"userb"},{"id":3,"tpl_name":"cputest","parent_id":0,"action_id":7,"create_user":"userc"},{"id":5,"tpl_name":"all metrics base","parent_id":0,"action_id":12,"create_user":"root"}]

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"parent_id":0,"name":"AtmpForTesting"}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"template created"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"url":"","uic":"test,tt2","tpl_id":225,"callback":1,"before_callback_sms":0,"before_callback_mail":0,"after_callback_sms":0,"after_callback_mail":0}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"action is created and bind to template: 225"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"tpl_id":225,"parent_id":0,"name":"AtmpForTesting2"}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"template updated"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"url":"","uic":"test,tt2,tt3","id":175,"callback":1,"before_callback_sms":0,"before_callback_mail":0,"after_callback_sms":0,"after_callback_mail":0}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"action is updated, row affected: 1"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"template 225 has been deleted"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

URL Params

Key Value
tid 221

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

[{"id":893,"metric":"proc.num","tags":"name=redis-server","max_step":3,"priority":2,"func":"all(#2)","op":"\u003c","right_value":"1","note":"FWRedis服务异常","run_begin":"","run_end":"","tpl_id":221},{"id":894,"metric":"proc.num","tags":"name=beam.smp","max_step":3,"priority":2,"func":"all(#3)","op":"\u003c","right_value":"1","note":"FWCM进程状态异常","run_begin":"","run_end":"","tpl_id":221},{"id":895,"metric":"proc.num","tags":"cmdline=fwlog","max_step":3,"priority":3,"func":"all(#5)","op":"\u003c","right_value":"2","note":"fwlog服务异常","run_begin":"","run_end":"","tpl_id":221},{"id":896,"metric":"fcd.oldworker.count","tags":"","max_step":3,"priority":3,"func":"all(#1)","op":"\u003e","right_value":"10","note":"FastCache Old Worker 数量大于10","run_begin":"","run_end":"","tpl_id":221},{"id":897,"metric":"service.logs.jifei","tags":"","max_step":1,"priority":4,"func":"all(#3)","op":"\u003e","right_value":"10","note":"fastcache计费日志堆积","run_begin":"","run_end":"","tpl_id":221},{"id":898,"metric":"proc.num","tags":"cmdline=syslog","max_step":3,"priority":4,"func":"all(#1)","op":"\u003c","right_value":"1","note":"syslog/rsyslog服务异常","run_begin":"","run_end":"","tpl_id":221},{"id":899,"metric":"proc.num","tags":"name=fwsa2d","max_step":3,"priority":2,"func":"all(#2)","op":"\u003c","right_value":"1","note":"FWSA2服务异常","run_begin":"","run_end":"","tpl_id":221},{"id":900,"metric":"redis.log.null","tags":"","max_step":3,"priority":2,"func":"all(#3)","op":"!=","right_value":"0","note":"FWRedis同步异常","run_begin":"","run_end":"","tpl_id":221},{"id":901,"metric":"check.fwsa2","tags":"","max_step":3,"priority":2,"func":"all(#3)","op":"==","right_value":"1","note":"Fwsa2连接MQ异常","run_begin":"","run_end":"","tpl_id":221}]

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"tpl_id":221,"tags":"","run_end":"24:00","run_begin":"00:00","right_value":"1","priority":1,"op":"==","note":"this is a test","metric":"agent.alive","max_step":3,"func":"all(#3)"}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"stragtegy created"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"id":904,"metric":"agent.alive","tags":"","max_step":3,"priority":1,"func":"all(#3)","op":"==","right_value":"1","note":"this is a test","run_begin":"00:00","run_end":"24:00","tpl_id":221}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"tags":"","run_end":"","run_begin":"","right_value":"1","priority":2,"op":"==","note":"this is a test","metric":"agent.alive","max_step":3,"id":904,"func":"all(#3)"}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"stragtegy:904 has been updated"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"strategy:904 has been deleted"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

["cpu.busy","cpu.cnt","cpu.guest","cpu.idle","cpu.iowait","cpu.irq","cpu.nice","cpu.softirq","cpu.steal","cpu.system","cpu.user","df.bytes.free","df.bytes.free.percent","df.bytes.total","df.bytes.used","df.bytes.used.percent","df.inodes.free","df.inodes.free.percent","df.inodes.total","df.inodes.used","df.inodes.used.percent","disk.io.avgqu-sz","disk.io.avgrq_sz","disk.io.await","disk.io.ios_in_progress","disk.io.msec_read","disk.io.msec_total","disk.io.msec_weighted_total","disk.io.msec_write","disk.io.read_bytes","disk.io.read_merged","disk.io.read_requests","disk.io.read_sectors","disk.io.svctm","disk.io.util","disk.io.write_bytes","disk.io.write_merged","disk.io.write_requests","disk.io.write_sectors","kernel.maxfiles","kernel.maxproc","load.15min","load.1min","load.5min","mem.memfree","mem.memfree.percent","mem.memtotal","mem.memused","mem.memused.percent","mem.swapfree","mem.swapfree.percent","mem.swaptotal","mem.swapused","mem.swapused.percent","net.if.in.bytes","net.if.in.compressed","net.if.in.dropped","net.if.in.errors","net.if.in.fifo.errs","net.if.in.frame.errs","net.if.in.multicast","net.if.in.packets","net.if.out.bytes","net.if.out.carrier.errs","net.if.out.collisions","net.if.out.compressed","net.if.out.dropped","net.if.out.errors","net.if.out.fifo.errs","net.if.out.packets","net.if.total.bytes","net.if.total.dropped","net.if.total.errors","net.if.total.packets","net.port.listen","proc.num",""]

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

URL Params

Key Value
q a

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

[{"id":63,"tpl_name":"tplAa","parent_id":0,"action_id":0,"create_user":""},{"id":53,"tpl_name":"TplBa","parent_id":0,"action_id":0,"create_user":""},{"id":220,"tpl_name":"TplCa","parent_id":0,"action_id":0,"create_user":""},{"id":42,"tpl_name":"basic","parent_id":0,"action_id":0,"create_user":""},{"id":149,"tpl_name":"TplDa","parent_id":0,"action_id":0,"create_user":""}]