首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >监视Sesam实例中的连接。

监视Sesam实例中的连接。
EN

Stack Overflow用户
提问于 2022-02-08 08:18:31
回答 1查看 31关注 0票数 0

我们需要监视某些系统的连接性,以帮助确定何时何地发生故障,以帮助调试网络和VPN问题。

这样做有什么好处呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-02-08 08:18:31

您可以使用Sesams rest和query本身来实现这一点,在检查网络状态时,它将尝试为系统创建一个网络套接字并返回状态。

系统配置:

代码语言:javascript
复制
{
  "_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
}

管道配置:

代码语言:javascript
复制
{
  "_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
  }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71030544

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档