Authored by chunhua.zhang

add new health check

---
# gateway
- hosts: java-gateway
tasks:
- name: 检查java gateway 健康情况
... ... @@ -11,16 +12,122 @@
var: result
remote_user: root
# order
- hosts: java-promotion
# product
- hosts: java-product
tasks:
- name: 检查java promotion健康状态
- name: 检查java product健康状态
health_check:
name: 获取商品详情
url: "http://127.0.0.1:8085/promotion/limitcode/getLimitCode"
url: "http://127.0.0.1:8083/product/product/queryProductBasicInfo"
content_type: json
params: '{"uid":7677123,"limitProductCode":2016031421395612,"batchNo":20160316162754}'
register: order_ret
params: '{"param":439486}'
register: pro_ret
- debug:
var: order_ret
remote_user: root
\ No newline at end of file
var: pro_ret
remote_user: root
# message
- hosts: java-message
tasks:
- name: 检查java message 健康状态
health_check:
name: 获取商品详情
url: "127.0.0.1:8086/message/TokenRest/getUserIosToken"
content_type: json
params: '{"uid":"2996246","msgChannel":2919}'
register: pro_ret
- debug:
var: pro_ret
remote_user: root
# sns
- hosts: java-sns
tasks:
- name: 检查java sns 健康状态
health_check:
name: 获取我的晒单列表
url: "http://127.0.0.1:8082/sns/show/ownerShareList"
content_type: json
params: '{"page":1,"limit":1,"uid":9963947}'
register: sns_ret
- debug:
var: sns_ret
remote_user: root
# users
- hosts: java-users
tasks:
- name: 检查java users 健康状态
health_check:
name: 获取用户wechat信息
url: "http://127.0.0.1:8081/users/WechatCsRest/getIsNeedAddWechatCS"
content_type: json
params: '{"uid":58347385}'
register: users_ret
- debug:
var: users_ret
remote_user: root
# uic
- hosts: java-uic
tasks:
- name: 检查java uic 健康状态
health_check:
name: 获取商品详情
url: "http://127.0.0.1:8096/uic/profile/getUserProfile"
content_type: json
params: '{"uid":58347385}'
register: uic_ret
- debug:
var: uic_ret
remote_user: root
# brower
- hosts: java-brower
tasks:
- name: 检查java brower 健康状态
health_check:
name: 获取用户浏览记录列表
url: "http://127.0.0.1:8092/brower/listBrowseNew"
content_type: json
params: '{"uid":58347385,"page":1,"limit":10}'
register: brow_ret
- debug:
var: brow_ret
remote_user: root
# activity
- hosts: java-activity
tasks:
- name: 检查java activity健康状态
health_check:
name: 获取帮助信息
url: "http://127.0.0.1:8090/activity/queryHelpInfo"
content_type: json
params: '{"uid":58305887,"limitProductCode":"2018090415221551"}'
register: activity_ret
- debug:
var: activity_ret
remote_user: root
# bigdata
- hosts: java-bigdata
tasks:
- name: 检查java bigdata健康状态
health_check:
name: 获取推荐SKN列表
url: "http://127.0.0.1:8091/bigdata/bigdata/getRecommendSknList"
content_type: json
params: '{"uid":0,"rec_pos":100001}'
register: bigdata_ret
- debug:
var: bigdata_ret
remote_user: root
... ...
{
"ANSIBLE_MODULE_ARGS": {
"name": "获取首页资源位",
"url": "http://127.0.0.1:8084/order/orderInfo/getOrderList"
}
}
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# ansible module for http health checking
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'status': ['preview'],
... ...