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

Allow users to specify connectors when configuring project monitors #794

Open
jamesagarside opened this issue Jun 27, 2023 · 0 comments
Open

Comments

@jamesagarside
Copy link

To enhance the capability of our GitOps Project Monitors offering it would be great if we could specify connectors on a per-monitor basis rather than all using the default connector.

Use Case

I have a customer who would like to offer service monitoring as a service enabled by customers making pull requests to a centralised repo. Each customer would want unique connectors, for example a group email for that customers team.

A basic implementation could look something like this.

import { journey, step, monitor, expect } from '@elastic/synthetics';

journey('www.example.com', ({ page, params }) => {
  // Only relevant for the push command to create
  // monitors in Kibana
  monitor.use({
    id: 'https://www.example.com/',
    schedule: 5,
    
    connector: "slack-dev-channel",

  });
  step('Go to https://www.example.com/', async () => {
    await page.goto('https://www.example.com/');
  });
});

To add more CI/CD functionality, customers could even specify an email address if connector type is SMTP, something like this:

import { journey, step, monitor, expect } from '@elastic/synthetics';

journey('www.example.com', ({ page, params }) => {
  // Only relevant for the push command to create
  // monitors in Kibana
  monitor.use({
    id: 'https://www.example.com/',
    schedule: 5,
    
    connector: "Elastic-Cloud-SMTP",
    emailTo: "joe.blogs@example.com",

  });
  step('Go to https://www.example.com/', async () => {
    await page.goto('https://www.example.com/');
  });
});
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

1 participant