我们需要监视某些系统的连接性,以帮助确定何时何地发生故障,以帮助调试网络和VPN问题。
这样做有什么好处呢?
发布于 2022-02-08 08:18:31
您可以使用Sesams rest和query本身来实现这一点,在检查网络状态时,它将尝试为系统创建一个网络套接字并返回状态。
系统配置:
{
"_id": "system-monitor",
"type": "system:rest",
"authentication": "jwt",
"jwt_token": "$SECRET(jwt_token)",
"operations": {
"get": {
"headers": {
"Content-type": "application/xml"
},
"method": "GET",
"payload-type": "json",
"url": "systems/{{ _id }}/status"
}
},
"rate_limiting_retries": 1000,
"url_pattern": "https://datahub-83ac2aaa.sesam.cloud/api/%s",
"verify_ssl": true
}管道配置:
{
"_id": "system-monitor-list",
"type": "pipe",
"source": {
"type": "embedded",
"entities": [{
"_id": "github-url"
}, {
"_id": "zoho-rest"
}]
},
"transform": [{
"type": "rest",
"system": "system-monitor",
"operation": "get"
}, {
"type": "dtl",
"rules": {
"default": [
["add", "_id", "_S._id"],
["add", "ts",
["now"]
],
["copy", "*"]
]
}
}],
"pump": {
"cron_expression": "*/15 * * * ?"
},
"compaction": {
"keep_versions": 100
}
}https://stackoverflow.com/questions/71030544
复制相似问题