首页 > 解决方案 > How do i get the public IP for my Sesam Instance

问题描述

I need to get the external IP for my Sesam instance, for firewall reasons. It's not available through the GUI and i do not have ssh to the box.

Is there any other way of doing this except contacting support?

标签: sesam

解决方案


您可以使用 URL 系统来实现这一点,有多种方法,但这是我使用过的一种。

添加以下系统:

{
  "_id": "IP",
  "type": "system:url",
  "url_pattern": "http://ip-api.com/%s"
}

添加以下管道:

{
  "_id": "ipjson",
  "type": "pipe",
  "name": "IP",
  "source": {
    "type": "json",
    "system": "IP",
    "url": "json"
  },
  "transform": {
    "type": "dtl",
    "rules": {
      "default": [
        ["add", "_id", "External-IP"],
        ["rename", "query", "IP"]
      ]
    }
  }
}

这应该输出到“ipjson”数据集,你会在那里找到 IP。

请注意,您的 IP 可能会发生变化。


推荐阅读