Elasticsearch 轻量级监视器无法使用参数

问题描述 投票:0回答:1

我在我的@elastic/synthetics项目中定义了一个轻量级监视器,定义如下:

heartbeat.monitors:
 - type: http
   name: "XXXXX"
   id: "XXXX"
   enabled: true
   urls: ["${my_url}"]

我的 Synthetics.confing.ts 是

export default (env) => {
   const config: SyntheticsConfig = {
     params: {
       my_url: "https://test.com/api/test",
     },
     playwrightOptions: {
       ignoreHTTPSErrors: false,
     },
    
     monitor: {
      schedule: 10,
      locations: [],
      privateLocations: ["dev"],
    },
    project: {
      id: "monitoring",
      url: "https://kibana.net",
      space: "myspace",
    },
  }
  if (env !== "customenv") {      
  }
  return config
}

当我使用以下命令推动显示器时

NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_ENV="customenv" SYNTHETICS_API_KEY=ccccc== npx @elastic/synthetics push

我得到:

Error
   > Invalid Heartbeat configuration: monitor(XXXX)
       `http` project monitors must specify a valid URL for field `monitor.urls` in version `8.15.0`. Your monitor definition with ID `XXXX` was not saved.
elasticsearch kibana elastic-stack
1个回答
0
投票

这是一个已经修复的错误,它将被移植到 8.15.4 https://github.com/elastic/kibana/pull/197797

© www.soinside.com 2019 - 2024. All rights reserved.