-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
配置管理-监听查询-通过IP维度无法查询监听信息 #12282
Comments
Anyone in community interesting this issue? |
@i will solve it@ |
现在是有接口的,只是在调用的时候url错了,只有一个url,重新封装一下 接口代码
|
@GetMapping("/watcherConfigs")@GetMapping("/configWatchers")感觉这两个接口合并一下更合理些 |
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
不要动底层的两个原子接口,configWatchers和watcherConfigs不要动 两个方案:
新增
接口不建议合并,底层原子接口保持语义清晰 |
"/watcherConfigs""/configWatchers",ip作为检索数据的一个选项,应该是接口中的一个参数而已,现有的这两个接口从定义上就很让人疑惑。我现在的做法是增加新的接口@GetMapping("/config"),传参中通过一个查询类型是ip还是config去执行不同逻辑。 "/watcherConfigs""/configWatchers"这两个接口的具体实现我并没有动,但我标注了@deprecated |
复用原来的接口吧,不要加新接口了 |
…und through the IP dimension in the ListeningQuery
…und through the IP dimension in the ListeningQuery
…ough the IP dimension in the ListeningQuery (#12315)
…apexsoft * commit '197795a854992d3f88824e4cdde34c61d8f56cf4': (225 commits) Fix alibaba#12395, use request context replace session depend. (alibaba#12398) Revert "Add an id primary key column to both the roles and permissions tables.(mysql-schema.sql) (alibaba#12206)" (alibaba#12396) Upgrade to 2.4.0 (alibaba#12384) Develop support ram info switch (alibaba#12382) Close derby ops api default. (alibaba#12372) Upgrade grpc to 1.64.2 (alibaba#12369) fix(alibaba#12333): fixed auth Plugin resource parser can't parser v2 config openAPI namespaceId. (alibaba#12336) Adjust integration tests for common modules in the core module to comply with checkstyle. (alibaba#12349) [IT]Adjust integration tests for cluster,code,smoke modules in the core module to comply with checkstyle. (alibaba#12350) fix [ISSUE alibaba#12323] , using the project's logback packagingData configuration instead of logback-nacos.xml's packagingData configuration (alibaba#12360) Remove the accessToken from the URL. (alibaba#12353) feat(alibaba#12355): Record the cost of ConfigDump in Prometheus. (alibaba#12356) [IT]Adjust core module auth integration tests to meet checkstyle requirements. (alibaba#12368) [ISSUE alibaba#12282]Fix the issue where monitoring data cannot be found through the IP dimension in the ListeningQuery (alibaba#12315) Adjust integration tests for ability, base, and client modules in the core module to comply with checkstyle. (alibaba#12335) Develop refactor request context (alibaba#12331) fix unexpect exception from NetworkInterface.ifUp (alibaba#12325) fix(alibaba#12231): When inserting and updating configurations in the database, the time-related field values need to be set using the time obtained from the database's built-in time function. (alibaba#12244) add some UT for default auth plugin (alibaba#12318) [ISSUE alibaba#12219] 修复nacos-client中config的ServerListManager解析endpoint失败问题 (alibaba#12220) ... # Conflicts: # plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/persistence/ExternalPermissionPersistServiceImpl.java # pom.xml
在配置管理-监听查询-通过IP维度查询监听列表时,请求的接口是
nacos/v1/cs/listener?ip=xxxx$tenant=xxx
。此接口位于
com.alibaba.nacos.config.server.controller.ListenerController#getAllSubClientConfigByIp()
,调用了com.alibaba.nacos.config.server.service.ConfigSubService#getCollectSampleResultByIp()
方法,在方法内调用runConfigListenerCollectionJob()
,最终在runSingleJob()
方法内发送了一个resttemplate请求,请求的接口是/nacos/v1/cs/communication/configWatchers?&ip=xxx
,参数只有ip
。次接口位于com.alibaba.nacos.config.server.controller.CommunicationController
,代码如下,其中dataId和group为必输,因此前面发送的resttemplate请求与接口不匹配,会直接报错。需要请求参数附带dataId、group和tenant参数,请求进入到此接口,才能查询到监听信息
例如请求地址为:
http://127.0.0.1:8848/nacos/v1/cs/communication/configWatchers?ip=192.168.137.1&dataId=nacos-config-extend.yaml&group=DEFAULT_GROUP&tenant=dc9c503f-048e-4cad-925c-b85d359fd9ed
响应信息为:
但是这个请求的本质是通过IP查询监听信息,因此这个controller接口不合理
The text was updated successfully, but these errors were encountered: