Alerting Plugin

class opensearchpy.plugins.alerting.AlertingClient(client)[source]

Bases: NamespacedClient

Parameters:

client (Any) –

acknowledge_alert(monitor_id, body=None, params=None, headers=None)[source]

Acknowledges an alert.

Parameters:
  • monitor_id (Any) – The id of the monitor, the alert belongs to

  • body (Any) – The alerts to be acknowledged

  • monitor_id

  • body

  • params (Any) –

  • headers (Any) –

Return type:

Any

create_destination(body=None, params=None, headers=None)[source]

Creates a destination for slack, mail, or custom-webhook.

Parameters:
  • body (Any) – The configuration for the destination

  • body

  • params (Any) –

  • headers (Any) –

Return type:

Any

create_monitor(body=None, params=None, headers=None)[source]

Creates a monitor with inputs, triggers, and actions.

Parameters:
  • body (Any) – The configuration for the monitor (inputs, triggers, and actions)

  • body

  • params (Any) –

  • headers (Any) –

Return type:

Any

delete_destination(destination_id, params=None, headers=None)[source]

Deletes a specific destination.

Parameters:
  • destination_id (Any) – The id of the destination we are trying to delete

  • destination_id

  • params (Any) –

  • headers (Any) –

Return type:

Any

delete_monitor(monitor_id, params=None, headers=None)[source]

Deletes a specific monitor.

Parameters:
  • monitor_id (Any) – The id of the monitor we are trying to delete

  • monitor_id

  • params (Any) –

  • headers (Any) –

Return type:

Any

get_alerts(params=None, headers=None)[source]

Returns all alerts.

Parameters:
  • params (Any) –

  • headers (Any) –

Return type:

Any

get_destination(destination_id=None, params=None, headers=None)[source]

Returns the details of a specific destination.

Parameters:
  • destination_id (Any) – The id of the destination we are trying to fetch. If None, returns all destinations

  • destination_id

  • params (Any) –

  • headers (Any) –

Return type:

Any

get_monitor(monitor_id, params=None, headers=None)[source]

Returns the details of a specific monitor.

Parameters:
  • monitor_id (Any) – The id of the monitor we are trying to fetch

  • monitor_id

  • params (Any) –

  • headers (Any) –

Return type:

Any

run_monitor(monitor_id, params=None, headers=None)[source]

Runs/Executes a specific monitor.

Parameters:
  • monitor_id (Any) – The id of the monitor we are trying to execute

  • dryrun – Shows the results of a run without actions sending any message

  • monitor_id

  • params (Any) –

  • headers (Any) –

Return type:

Any

search_monitor(body, params=None, headers=None)[source]

Returns the search result for a monitor.

Parameters:
  • monitor_id – The configuration for the monitor we are trying to search

  • body (Any) –

  • params (Any) –

  • headers (Any) –

Return type:

Any

update_destination(destination_id, body=None, params=None, headers=None)[source]

Updates a destination’s inputs, triggers, and actions.

Parameters:
  • destination_id (Any) – The id of the destination we are trying to update

  • body (Any) – The configuration for the destination

  • destination_id

  • body

  • params (Any) –

  • headers (Any) –

Return type:

Any

update_monitor(monitor_id, body=None, params=None, headers=None)[source]

Updates a monitor’s inputs, triggers, and actions.

Parameters:
  • monitor_id (Any) – The id of the monitor we are trying to update

  • body (Any) – The configuration for the monitor (inputs, triggers, and actions)

  • monitor_id

  • body

  • params (Any) –

  • headers (Any) –

Return type:

Any