不要使用 manager 接口获取这些信息,这些接口是个manager用的







--

此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmin...@apache.org





在 2021-12-27 14:05:56,"温天柱" <wtz4...@163.com> 写道:
>Doris版本信息:
>Version : 0.14.12.4
>BuildInfo : root@f452bd1e571e
>BuildTime : Mon, 21 Jun 2021 09:04:15 UTC
>
>
>问题:采用http方式查询集群http、mysql的连接信息,根据官方文档 "Cluster Action" 拼接http 
>url,但是返回的是index.html;具体应该怎么使用呢?
>官方文档内容:
>Request
>
>GET /rest/v2/manager/cluster/cluster_info/conn_info
>
>集群连接信息
>
>GET /rest/v2/manager/cluster/cluster_info/conn_info
>
>Description
>
>用于获取集群http、mysql连接信息。
>
>Response
>{
>"msg":"success",
>"code":0,
>"data":{
>"http":[
>"fe_host:http_ip"
>],
>"mysql":[
>"fe_host:query_ip"
>]
>},
>"count":0
>}
>
>
>本地发送请求体:
>curl --location --request GET 
>'http://172.16.21.49:8030/rest/v2/manager/cluster/cluster_info/conn_info' \
>--header 'Cookie: PALO_SESSION_ID=ab5d2323-6cd8-4cb6-8e0d-a266ea28aa0d; 
>PALO_SESSION_ID=661b8f08-7b97-48e9-abef-4f9e4065140c' \
>--header 'Authorization: Basic cm9vdDo='
>实际返回内容:
><!--
>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.
>-->
>
>
><!DOCTYPE html>
><htmllang="en">
><script>
>letarr=location.pathname.split('/');
>letres='';
>if (arr.length>4) {
>arr=arr.slice(0, 5);
>res=arr.join('/') +'/';
>}
>varbaseItem=document.createElement('base');
>baseItem.setAttribute('href', res?location.origin+res:location.origin);
>document.getElementsByTagName('head')[0].appendChild(baseItem);
></script>
>
>
><head>
><metacharset="UTF-8">
><title>Apache Doris</title>
><metaname="viewport"content="width=device-width, initial-scale=1.0">
><metahttp-equiv="X-UA-Compatible"content="ie=edge">
><linkrel="shortcut icon"href="favicon.ico">
><linkhref="styles~31ecd969.ce64b8eb83a2f242dec2.css"rel="stylesheet">
></head>
>
>
><body>
><divid="root"></div>
><scripttype="text/javascript"src="styles~31ecd969.ce64b8eb83a2f242dec2.js"></script>
><scripttype="text/javascript"src="main.ce64b8eb83a2f242dec2.js"></script>
></body>
>
>
></html>

Reply via email to