Skip to content
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

prometheus http sd support #8694

Closed
yuzhichang opened this issue Jul 6, 2022 · 4 comments
Closed

prometheus http sd support #8694

yuzhichang opened this issue Jul 6, 2022 · 4 comments
Assignees
Labels
Milestone

Comments

@yuzhichang
Copy link

Prometheus doesn't support Nacos service discovery, but it support generic http sd.
Here's an prometheus issue track this.

Nacos already provides API to fetch list of instances of a service:

curl -X GET 'http://192.168.101.105:8848/nacos/v1/ns/instance/list?serviceName=jax&username=xxx&password=xxx'
{
   "hosts":[
      {
         "ip":"192.168.101.105",
         "port":9999,
         "valid":true,
         "healthy":true,
         "marked":false,
         "instanceId":"192.168.101.105#9999#DEFAULT#DEFAULT_GROUP@@jax",
         "metadata":{
            "preserved.register.source":"SPRING_CLOUD"
         },
         "enabled":true,
         "weight":1.0,
         "clusterName":"DEFAULT",
         "serviceName":"jax",
         "ephemeral":true
      }
   ],
   "dom":"jax",
   "name":"DEFAULT_GROUP@@jax",
   "cacheMillis":3000,
   "lastRefTime":1656736565093,
   "checksum":"aed6473823bfba043f334c46b5ef577d",
   "useSpecifiedURL":false,
   "clusters":"",
   "env":"",
   "metadata":{
      
   }
}

Nacos need go a step ahead to adjust the output format per http sd.

@KomachiSion
Copy link
Collaborator

We may add an plugin like istio, to support and adjust other protocol.

@hujun-w-2
Copy link
Collaborator

good idea

@karsonto
Copy link
Contributor

karsonto commented Sep 8, 2022

@i will resolve it@

@onewe onewe assigned karsonto and unassigned onewe Sep 8, 2022
@KomachiSion
Copy link
Collaborator

refer to #1032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants