我在我的@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.
这是一个已经修复的错误,它将被移植到 8.15.4 https://github.com/elastic/kibana/pull/197797