Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch lightweight monitors unable to use params #980

Closed
fabry00 opened this issue Nov 8, 2024 · 4 comments
Closed

Elasticsearch lightweight monitors unable to use params #980

fabry00 opened this issue Nov 8, 2024 · 4 comments

Comments

@fabry00
Copy link

fabry00 commented Nov 8, 2024

I have a lightweight monitor defined in my @elastic/synthetics project defined as follow:

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

and my synthetics.confing.ts is

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
}

when I push the monitors with the following command

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

I get:

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.
@shahzad31
Copy link
Contributor

@fabry00 thanks for using Elastic/Synthetics.

We just fixed this bug few weeks ago and it was backported to 8.15.4 as well, release is hopefully around the corner

elastic/kibana#197797

@vigneshshanmugam
Copy link
Member

Closing as the bug has been fixed and will be released in the coming week as pointed out.

@fabry00
Copy link
Author

fabry00 commented Nov 14, 2024

@vigneshshanmugam has this been fixed in 8.16.0? I just updated to 8.16.0 and I get inconsistent behaviour

@vigneshshanmugam
Copy link
Member

I get inconsistent behaviour

can you share more about what you are seeing and also an example if its different from the one you have on description? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants