alerting icon indicating copy to clipboard operation
alerting copied to clipboard

Alerting Monitors should be exportable/importable objects

Open aimtsou opened this issue 3 years ago • 9 comments

Is your feature request related to a problem? Please describe. We see that alerts and destinations are not considered objects and they cannot be exported/imported.

Describe the solution you'd like Just export the alerts and destinations as json objects so we can import them either in another tenant or for future uasage.

Describe alternatives you've considered No alternatives considered.

aimtsou avatar Jun 25 '21 07:06 aimtsou

Thanks for creating this issue. I assume you meant Monitors and Destinations? We could support GET _opendistro/_alerting/monitors that gets all the monitors (export). Similarly POST _opendistro/_alerting/monitors to create multiple monitors (import).

skkosuri-amzn avatar Jul 14 '21 15:07 skkosuri-amzn

Good afternoon,

yes you are right Monitors and Destinations(I am not sure if the dashboard could be done also). They could belong to the saved objects in stack management like saved searches, graphs and dashboards. So you could export them and import them if needed.

I hope this clarifies the case. Also the console API could be used as an alternative.

aimtsou avatar Jul 14 '21 16:07 aimtsou

Monitors, Desitnations are OpenSearch objects. They can be created/modified/deleted without OpenSearch Dashboards (Kibana). They are not like Saved Searches, Dashboards which are stored as OpenSearch Dashboards (Kibana) objects.

skkosuri-amzn avatar Jul 14 '21 17:07 skkosuri-amzn

I understand the concept described. Considering them exportable / importable objects would facilitate the work in multi-tenancy.

aimtsou avatar Jul 15 '21 06:07 aimtsou

Yes, we are looking into export/import of monitors to start with. We will post an update in few weeks.

skkosuri-amzn avatar Jul 28 '21 17:07 skkosuri-amzn

First PR for this feature https://github.com/opensearch-project/alerting/pull/173

skkosuri-amzn avatar Sep 19 '21 20:09 skkosuri-amzn

Adding two new API to export and import monitors. /_plugins/_alerting/monitors/export /_plugins/_alerting/monitorsimport

skkosuri-amzn avatar Sep 30 '21 21:09 skkosuri-amzn

Adding two new API to export and import monitors. /_plugins/_alerting/monitors/export /_plugins/_alerting/monitorsimport

Is this functionality already working? If so, where can I find the documentation?

faabsen avatar Apr 26 '22 12:04 faabsen

In the UI (version 2.7), monitors can be exported, however it does not look like there's a way to import monitor JSON in the UI.

excalq avatar Aug 29 '23 21:08 excalq