Not able to setup the service discovery

Hi,

I’m trying to connect the eureka service registry and trigger a endpoint of that service.

my exported json is,

“proxy”: {
“preserve_host_header”: false,
“listen_path”: “”,
“target_url”: “”,
“strip_listen_path”: true,
“enable_load_balancing”: false,
“target_list”: [],
“check_host_against_uptime_tests”: false,
“service_discovery”: {
“use_discovery_service”: true,
“query_endpoint”: “http://10.135.140.167:8761/eureka/apps/book-service”,
“use_nested_query”: true,
“parent_data_path”: “application.instance”,
“data_path”: “hostName”,
“port_data_path”: “port.$”,
“target_path”: “/books/”,
“use_target_list”: true,
“cache_timeout”: 60,
“endpoint_returns_list”: false
}
}

but it is giving 404.

Also, i’m not able to get what would be the value of “target_url” in this case.

With eureka you need create a custom API / Endpoint that tell Eureka to output JSON instead of XML. Then have the SD system query that with the config specified on our site, SD doesn’t handle XML output, only JSON.

See the test output here for Eureka that we use to test - you’ll need to make sure yours matches.

Hi Martin,

Thanks a lot.

It worked.