Skip to content

Allow users to specify connectors when configuring project monitorsΒ #794

Open

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions