Skip to content

Crons monitor upsert support in sentry-cli #1801

Closed

Description

@szokeasaurusrex

The Sentry CLI already supports monitoring the execution of an arbitrary script or command.

https://docs.sentry.io/product/crons/getting-started/cli/#job-monitoring

sentry-cli monitors run my-monitor-slug -- python path/to/file.py 

To ease usage, we should add support for upserting monitors. This could look something like this.

sentry-cli monitors run my-monitor-slug --schedule 0 * * * * --check_in_margin 5 --max_runtime 10 --time_zone Europe/Vienna  -- python path/to/file.py

Running this command should upsert a monitor on Sentry with the slug my-monitor-slug, a check-in margin of 5 minutes, and a max runtime of 10 minutes, a time zone set to Europe/Vienna, with a schedule that expects it to be run every hour.

https://develop.sentry.dev/sdk/check-ins/#monitor-upsert-support
https://docs.sentry.io/product/crons/getting-started/cli/

monitor_config: None,

Activity

  1. changed the title [-]Monitor upsert support in `sentry-cli`[/-] [+]Crons monitor upsert support in `sentry-cli`[/+] on Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions