Moogsoft Docs

setPrcLabels

A MoogDb v2 method that sets the Probable Root Cause (PRC) labels for alerts within a Situation. You must specify at least one PRC level and an alert ID for that level.

You can mark alerts as causal, non-causal or unlabeled within a Situation. An alert can have different PRC levels within different Situations.

Back to MoogDb V2 API Method Reference.

Request arguments

Method setPrcLabels takes the following request arguments:

Name

Type

Required

Description

situationId

Number

Yes

Situation ID.

causal

JSON List

No, if you specify non_causal or unlabelled.

A list of alert IDs that you want to be marked as causal.

non_causal

JSON List

No, if you specify causal or unlabelled.

A list of alert IDs that you want to be marked as non-causal.

unlabelled

JSON List

No, if you specify causal or non_causal.

A list of alert IDs that you want to be marked as unlabeled.

Response

Method setPrcLabels returns the following response:

API behavior in active and historic databases

The behavior of this method depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This method updates or returns information about the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of method setPrcLabels:

Request example

Example request to set alert ID 8 as causal, alert ID 4 as unlabeled, and alert IDs 2 and 3 as non-causal, in Situation ID 1:

var prcLabels = { causal: [8], unlabelled: [4], non_causal: [2,3] };
moogdb.setPrcLabels(1, prcLabels);

Response example