spacewander commented on code in PR #9012: URL: https://github.com/apache/apisix/pull/9012#discussion_r1134792279
########## docs/en/latest/get-data-planes-from-etcd.md: ########## @@ -0,0 +1,103 @@ +--- +id: get-data-planes-from-etcd +title: Get data planes from etcd +keywords: + - API gateway + - Apache APISIX +description: Get data planes from etcd +--- + +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +To query all data planes information from etcd, we move `server-info` plugin into the APISIX core, and use it to report data plane information. + +The data plane information keeps the same format of `server-info` plugin output: + +| Name | Type | Description | +|--------------|---------|------------------------------------------------------------------------------------------------------------------------| +| boot_time | integer | Bootstrap time (UNIX timestamp) of the APISIX instance. Resets when hot updating but not when APISIX is just reloaded. | +| id | string | APISIX instance ID. | +| etcd_version | string | Version of the etcd cluster used by APISIX. Will be `unknown` if the network to etcd is partitioned. | +| version | string | Version of APISIX instance. | +| hostname | string | Hostname of the machine/pod APISIX is deployed to. | + +## Admin API to query data planes + +* `GET /apisix/admin/data_planes` + +It returns a JSON array which contains all alive data planes. + +```bash +curl http://127.0.0.1:9180/apisix/admin/data_planes \ Review Comment: We can simply drop a link to the admin-api.md here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
