How to force alerts to be enabled?

Hi,

How can I force alerts to be enabled when an extension is deployed or updated?

I followed this documentation to extract the alert in JSON format:

I tried this but it does not work :{    “id”: “XXXXX”,    “metricSelector”: “XXXXX”,    “name”: “XXX”,    “description”: “XXX”,    “severity”: “AVAILABILITY”,    “enabled”: true,[…]*}*Thanks.Julien

As far as I know we always ship them disabled to allow customers to enable it at will, rather than causing new problems which they didn’t set up any routing for or other rules.

Hi @Mike_L !

A side-effect is that the customer (or the partner :grinning_face:) doesn’t realize that he’s disabling alerts when he upgrades his extension. It almost becomes good practice to create the alert independently of the extension. What do you recommend?

I’d go with clone the alerts that you’re interested in, tweak them a bit to fit your need and then use those alerts, they won’t be disabled.