Skip to content

[Uptime] Kibana always tries to save service monitors to all locations, not only the selected ones #132314

@lucasfcosta

Description

@lucasfcosta

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:

  1. 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
    
  2. 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"
        }
      }
    }
  3. Save that manifest to a service_manifest folder as manifest.json and serve it using the command below
    npx http-server service_manifest --port 8081
    
  4. 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
    
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SyntheticsTeam:Uptime - DEPRECATEDSynthetics & RUM sub-team of Application ObservabilitybugFixes for quality problems that affect the customer experienceimpact:criticalThis issue should be addressed immediately due to a critical level of impact on the product.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions