在 Analytics (分析) 群組中新增及刪除數據分析元件

您目前查看的是 Apigee Edge 說明文件。
前往 Apigee X 說明文件
info

在 Edge for Private Cloud 安裝作業中,您可能必須從現有 Analytics 群組中移除 Postgres 和 Qpid 伺服器,或將其新增至 Analytics 群組。本文說明如何在現有的 Edge 安裝中新增及移除 Postgres 和 Qpid 伺服器,適用於單一 Postgres 安裝和主備 Postgres 安裝。

詳情請參閱「為 Postgres 設定主要待命複寫」。

必要條件

可使用系統管理員憑證發出管理伺服器 API 呼叫。

將現有 Postgres 伺服器新增至 Analytics 群組

新增 Postgres 伺服器元件的程序,取決於 Postgres 是以單一伺服器安裝 (未啟用複寫),還是以啟用主機待命複寫的兩部伺服器安裝。

情境 1:單一 Postgres 伺服器,沒有 Postgres 複寫

  1. 決定分析和消費者群組的名稱。

    根據預設,分析群組的名稱為 axgroup-001,消費者群組的名稱為 consumer-group-001。在區域的無聲設定檔中,您可以使用 AXGROUP 屬性設定 Analytics 群組的名稱。

    如果不確定分析和消費者群組的名稱,請使用下列指令顯示這些名稱:

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    這項呼叫會傳回包含數據分析群組名稱的回應:

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ]
      …

    在本範例中,分析群組名稱為 axgroup-001.

  2. 使用下列 API 判斷 postgres-server 元件的 UUID:
    curl http://pg-IP:8084/v1/servers/self

    在下列 API 呼叫中,將 axgoupnameUUID 替換為上述判斷的 Analytics 群組名稱和 UUID。

  3. 使用下列 API 呼叫,將 Postgres 伺服器 UUID 新增至 postgres-server 元素:
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=UUID&type=postgres-server&force=true"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77&type=postgres-server&force=true"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "postgres-server" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. 使用下列 API 將 Postgres 伺服器 UUID 新增至消費者群組:
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/datastores?uuid=UUID"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "postgres-server" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  5. 在所有節點上重新啟動所有 edge-postgres-serveredge-qpid-server 元件,確保這些元件會採用變更:
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

情境 2:兩個 Postgres 伺服器,採用主備複寫機制

  1. 決定分析和消費者群組的名稱。

    根據預設,分析群組的名稱為 axgroup-001,消費者群組的名稱為 consumer-group-001。在區域的無聲設定檔中,您可以使用 AXGROUP 屬性設定 Analytics 群組的名稱。

    如果不確定分析和消費者群組的名稱,請使用下列指令顯示這些名稱:

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    這項呼叫會傳回包含已定義數據分析群組名稱的回應:

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ]
      …

    在本範例中,分析群組名稱為 axgroup-001.

  2. 使用下列 API 呼叫,找出每個主要 postgres-server 元件和待命 postgres-server 元件的 UUID:
    curl http://pg-IP:8084/v1/servers/self

    在下列 API 呼叫中,您必須將 axgoupname 替換為 axgroup-001,且在主要伺服器上於步驟 2 取得的 UUID 必須用於取代 masteruuid,而備用伺服器在步驟 2 中傳回的 UUID 則必須用於取代 slaveuuid

  3. 使用下列 API 將 Postgres 伺服器 UUID 新增至 postgres-server 元素:
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=masteruuid,slaveuuid&type=postgres-server&force=true"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0&type=postgres-server&force=true"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : ["54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. 使用下列 API 將 Postgres 伺服器 UUID 新增至消費者群組:
    curl -v -u adminEmail:pword -X POST -H -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/datastores?uuid=masteruuid,slaveuuid"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : ["54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  5. 在所有節點上重新啟動所有 edge-postgres-serveredge-qpid-server 元件,確保這些元件會採用變更:
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

將現有 Qpid 伺服器新增至 Analytics 群組

  1. 使用下列 API 找出 Analytics 群組名稱:
    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    這項指令應會傳回包含數據分析群組和範圍名稱的回應:

    [  {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ]
      …

    在本範例中,分析群組名稱為 axgroup-001.

  2. 請使用下列 API 呼叫,找出要新增至 Analytics 群組的每個 Qpid 伺服器元件 UUID:
    curl http://qp-IP:8083/v1/servers/self
  3. 使用下列 API 呼叫,將單一 Qpid 伺服器 UUID 新增至 qpid-server 元素 (視需要重複操作):
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=qpiduuid&type=qpid-server"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X POST -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=94c96375-1ca7-412d-9eee-80fda94f6e0&type=qpid-server"
    [  {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. 使用下列 API 呼叫,將單一 Qpid 伺服器 UUID 新增至消費者群組的消費者元素 (視需要重複執行):
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/consumers?uuid=qpiduuid" 

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X POST -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001//consumer-groups/consumer-group-001/consumers?uuid=94c96375-1ca7-412d-9eee-80fda94f6e0"
    [  {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07","54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  5. 在所有節點上重新啟動所有 edge-qpid-server 元件,確保這些元件會採用變更:
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready

從分析群組中移除 Postgres 伺服器

移除 Postgres 伺服器的程序取決於是否已啟用 Postgres 複寫功能。

情境 1:單一 PostgreSQL 伺服器,沒有複製功能

  1. 決定分析和消費者群組的名稱。

    根據預設,分析群組的名稱為 axgroup-001,消費者群組的名稱為 consumer-group-001。在區域的無聲設定檔中,您可以使用 AXGROUP 屬性設定 Analytics 群組的名稱。

    如果不確定分析和消費者群組的名稱,請使用下列指令顯示這些名稱:

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    這項指令應會傳回類似以下的回應:

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "datastores" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }

    在這個範例中,分析群組名稱為 axgroup-001,消費者群組名稱為 consumer-group-001,而 postgres-server UUID 為 8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77。請注意,這個 ID 與 consumer-groups 底下的 postgres-serverdatastores 元素相關聯。

    使用在下列步驟中取得的 Analytics 群組名稱、消費者群組名稱和 UUID。

  2. 使用下列 API 呼叫,從消費者群組的 datastores 元素中移除 postgres-server UUID:
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumergroupname/datastores/UUID"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores/8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  3. 使用下列 API 從 postgres-server 元素中移除 postgres-server UUID:
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=UUID&type=postgres-server"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77&type=postgres-server"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "postgres-server" : [ ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. 視您是取代還是刪除 Postgres 伺服器而定:
    • 如果更換 Postgres 伺服器,請參閱「新增 Postgres 伺服器」,瞭解新增 Postgres 伺服器的步驟。
    • 如果刪除 Postgres 伺服器,請在所有節點上重新啟動所有 edge-postgres-serveredge-qpid-server 元件,確保這些元件會透過執行下列指令擷取變更:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

情境 2:兩個 Postgres 伺服器,採用主備複寫機制

  1. 使用下列 API 找出目前註冊的 Analytics 群組名稱和 Postgres 伺服器 UUID:

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    這項呼叫會傳回類似以下的回應:

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }

    在本例中,分析群組名稱為 axgroup-001postgres-server UUID 則為 8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77731c8c43-8c35-4b58-ad1a-f572b69c5f0。請注意,postgres-serverdatastores 元素的值相同。

    在下列步驟中,請使用這個步驟取得的 Analytics 群組名稱、消費者群組名稱和 UUID。

  2. 使用下列 API 從消費者群組的 datastores 元素中移除 postgres-server UUID (請注意,API 中的主要和從屬 UUID 會以半形逗號分隔,但上述分析群組呼叫的輸出內容會以半形冒號分隔):
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumergroupname/datastores/masteruuid,slaveuuid"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores/8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  3. 使用下列 API 從 postgres-server 元素中移除 postgres-server UUID:
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=masteruuid,slaveuuid&type=postgres-server"

    呼叫和輸出內容範例:

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0&type=postgres-server"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "postgres-server" : [ ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. 視您是取代還是刪除 Postgres 伺服器而定:
    • 如果更換 Postgres 伺服器,請參閱「新增 Postgres 伺服器」,瞭解新增 Postgres 伺服器的步驟。
    • 如果刪除 Postgres 伺服器,請在所有節點上重新啟動所有 edge-postgres-serveredge-qpid-server 元件,確保這些元件會透過執行下列指令擷取變更:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

    從 Analytics 群組中移除 Qpid 伺服器

    1. 使用下列 API 找出目前已註冊的 Qpid 伺服器 UUID:
      curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"
      這應該會傳回以下形式的回應:
      [  {
        "name" : "axgroup-001",
        "properties" : {
        },
        "scopes" : [ "example~prod", "example~test" ],
        "uuids" : {
              "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
              "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-001",
          "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
          "datastores" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0" ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }

      在這個範例中,分析群組名稱為 axgroup-001,Qpid 伺服器 UUID 則為 94c96375-1ca7-412d-9eee-80fda94f6e054a96375-33a7-4fba-6bfa-80fda94f6e07。 請注意,qpid-serverconsumers 元素的值相同。

      在下列步驟中,請使用這個步驟取得的 Analytics 群組名稱、消費者群組名稱和 UUID。

    2. 使用下列 API 呼叫,從消費者群組的 consumers 元素中移除單一 qpid-server UUID (視需要重複操作):
      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/consumers/qpiduuid"

      呼叫和輸出內容範例:

      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/consumers/94c96375-1ca7-412d-9eee-80fda94f6e0"
      [  {
        "name" : "axgroup-001",
        "properties" : {
        },
        "scopes" : [ "example~prod", "example~test" ],
        "uuids" : {
              "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
              "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-001",
          "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
          "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }
    3. 使用下列 API 呼叫,從 qpid-server 元素中移除單一 qpid-server UUID (視需要重複操作):
      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=qpiduuid&type=qpid-server"

      呼叫和輸出內容範例:

      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=94c96375-1ca7-412d-9eee-80fda94f6e0&type=qpid-server"
      [  {
        "name" : "axgroup-001",
        "properties" : {
        },
        "scopes" : [ "example~prod", "example~test" ],
        "uuids" : {
              "qpid-server" : ["54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
              "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-001",
          "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
          "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }
    4. 在所有節點上重新啟動所有 edge-qpid-server 元件,確保這些元件會採用變更:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready