-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Description
Kibana version: Top of main
(SHA 05b730858885a89e84207a55a9b602343a482285
)
Elasticsearch version: 8.13.0-SNAPSHOT
(Doesn't impact this issue)
Browser version: 101.0.4951.54 (Official Build) (x86_64)
Original install method (e.g. download page, yum, from source, etc.): Running Kibana from source and ES using elastic-package stack
.
Describe the bug: Kibana always tries to save service monitors to all locations, not only the selected ones.
Besides increasing the usage of all locations, it can also cause errors if there's a duplicated back-end URL in the manifest, even if the duplicated locations are not selected.
Steps to reproduce:
- Start three HTTP echo servers using the command below:
docker run -p 8033:80 -t mendhak/http-https-echo docker run -p 8034:80 -t mendhak/http-https-echo docker run -p 8035:80 -t mendhak/http-https-echo
- Create a new
manifest.json
with three locations, one for each HTTP echo server{ "throttling": { "download": 20, "upload": 10 }, "locations": { "Bin One": { "url": "http://localhost:8033", "geo": { "name": "BIN ONE", "location": {"lat": 41.25, "lon": -95.86} }, "status": "experimental" }, "Bin Two": { "url": "http://localhost:8034", "geo": { "name": "BIN TWO", "location": {"lat": 41.25, "lon": -95.86} }, "status": "experimental" }, "Bin Three": { "url": "http://localhost:8035", "geo": { "name": "BIN ONE", "location": {"lat": 41.25, "lon": -95.86} }, "status": "experimental" } } }
- Save that manifest to a
service_manifest
folder asmanifest.json
and serve it using the command belownpx http-server service_manifest --port 8081
- Set Kibana's
manifestUrl
so that it fetches locations from your local manifest# Make sure to comment the xpack.uptime.service.devUrl setting xpack.uptime.service.manifestUrl: http://localhost:8081/manifest.json
- Start Kibana and try to create a monitor, but select only the first location. You'll see that all three locations receive requests.
Expected behavior: Monitors should only be created in the selected locations.
Any additional context: I found this problem while investigating why one gets configmap already exists
when saving a monitor if there are two locations with the same URL, even if both locations aren't selected.