setPrcLabels
A MoogDb v2 method that sets the Probable Root Cause (PRC) labels for alerts within a Situation.
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 |
---|---|---|---|
| Number | Yes | Situation ID. |
| JSON Object | Yes | A JSON object containing the following fields:
|
Response
Method setPrcLabels
returns the following response:
API update behavior
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 IDs 1 and 2 as causal, alert IDs 3 and 7 as non-causal, and alert IDs 5 and 9 as unlabeled, in Situation ID 1:
var labelsSet = moogdb.setPrcLabels(1, { "causal" : [ 1, 2 ], "non_causal" : [ 3,7 ], "unlabelled" : [ 5, 9] });