getTopPrcDetails

A MoogDb v2 method that returns the top most likely causal alerts, based on their Probable Root Cause value, for a Situation.

You can select the maximum number of causal alerts to return using a limit value. If not specified, the endpoint only returns the alert with the highest root cause probability.

The entries returned are ordered with the highest root cause probability first, for the specified Situation, irrespective of whether they have been labeled causal or are unlabeled. Alerts marked as symptoms are excluded from the return.

Back to MoogDb V2 API Method Reference.

Request arguments

Method getTopPrcDetails takes the following request arguments:

Name

Type

Required

Description

sitn_id

Integer

Yes

ID of the Situation you want to retrieve the Probable Root Cause details for.

limit

Integer

No

Maximum number of causal or unlabeled alerts to return. Default is 1, if not specified, returning one alert with the highest root cause probability.

Response

Method getTopPrcDetails returns the following response:

Type

Description

JSON Array

An array of objects containing the details of the causal or unlabeled alerts with the highest root cause probability in the specified Situation.

The following details are returned for each alert:

Name

Type

Description

rc_probability

Number

Root cause probability of the alert.

description

String

Description of the alert.

rc_label

Integer

Label defining whether the alert is causal or unlabeled. Alerts marked as symptoms are excluded from the return.

  • 1 = causal

  • 0 = unlabeled

  • -1 = symptom

alert_id

Integer

Alert ID.

Examples

The following examples demonstrate typical use of method getTopPrcDetails:

Request example

Example request to return the top three causal alerts with the highest root cause probability in Situation 145:

var result = JSON.stringify(moogdb.getTopPrcDetails(145,3))

Response example

Example response returning the top three causal or unlabeled alerts for Situation ID 145:

{
    "alerts": [
    {
        "rc_probability":0.9933107459030244,
        "description":"Web Server HTTPD is DOWN",
        "rc_label":1,
        "alert_id":53
    },
    {
        "rc_probability":0.9933092393241993,
        "description":"Web Server HTTPD is DOWN",
        "rc_label":1,
        "alert_id":8
    },
    {
        "rc_probability":0.22480057080448923,
        "description":"Web Server HTTPD is DOWN",
        "rc_label":0,
        "alert_id":39
    }]
}