Skip to main content

getSituationTopology

A MoogDb v2 method that returns the topology details for a specified Situation and topology. The request returns a JSON object that lists the links and nodes affected by the Situation in a specified topology. It also returns the alert matching attributes for the nodes in the topology.

Back to MoogDb V2 API Method Reference.

Request arguments

Method getSituationTopology takes the following request arguments:

Name

Type

Required

Description

sigId

Number

Yes

Situation ID.

topologyName

String

Yes

Name of the topology for which to return the Situation's link, node and alert matching attribute details. A Situation can impact nodes in multiple topologies.

context

Integer

Yes

properties

Array of Strings

Yes

Response

The method returns the following response:

Type

Description

Object

A JSON object in NetJSON format that lists the links, nodes and alert matching attributes affected by the Situation.

Successful requests return an array of JSON objects containing the following:

Examples

The following examples demonstrate typical use of method getSituationTopology:

Request example

Example request to retrieve the topology link and node details for Situation ID 12 in the "host" topology within 4 hops:

var sigId = 12;
var context = 4;
var topologyName = "host";
var properties = ["severity", "vertex_entropy", "prc", "description"];
var situationTopology = moogdb.getSituationTopology(sigId, context, topologyName, properties);

Response example

Example response returning the links, nodes and alert matching attributes for the Situation:

{
    "links": [
    {
        "source":"appsvr02",
        "target":"appsvr03"
    },
    {
        "source":"appsvr01",
        "target":"sd-01"},
    {
        "source":"appsvr02",
        "target":"appsvr01"},
    {
        "source":"sd-02",
        "target":"sd-01"
    }],
    "nodes": [
    {
        "id":"appsvr02",
        "properties":
        {
            "prc":null,
            "severity":5,
            "context":0,
            "description":"node1",
            "vertex_entropy": 0.1794592472207979
        }
    },
    {
        "id":"appsvr03",
        "properties":
        {
            "prc":null,
            "severity":null,
            "context":1,
            "description":"node2",
            "vertex_entropy": 0.1794592472207979
        }
    },
    {
        "id":"appsvr01",
        "properties":
        {
            "prc":null,
            "severity":5,
            "context":0,
            "description":"node3",
            "vertex_entropy": 0.08976540495989357
        }
    },
    {
        "id":"sd-02",
        "properties":
        {
            "prc":null,
            "severity":0,
            "context":0,
            "description":"node4",
            "vertex_entropy": 0.08976540495989357
        }
    },
    {
        "id":"sd-01",
        "properties":
        {
            "prc":null,
            "severity":0,
            "context":0,
            "description":"node5",
            "vertex_entropy": 0.1794592472207979
        }
    }],
    "alertMatchingAttributes":["source"]
}