Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titlealarm_on.json
collapsetrue
{
        "event":        {
                "commonEventHeader":{
                        "sourceId":"example-vserver-name-val-75044",
                        "startEpochMicrosec":1413378172000000,
                        "eventId":"ab305d54-85b4-a31b-7db2-fb6b9e546015",
                        "sequence":0,
                        "domain":"fault",
                        "lastEpochMicrosec":1413378172000000,
                        "eventName":"Fault_MultiCloud_VMFailure",
                        "sourceName":"example-vserver-name-val-75044",
                        "priority":"High",
                        "version":3.0,
                        "reportingEntityName":"Multi-Cloud"
                },

                "faultFields":  {

                        "eventSeverity":"CRITICAL",

                        "alarmCondition":"Guest_Os_Failure",

                        "faultFieldsVersion":2.0,

                        "specificProblem":"Fault_MultiCloud_VMFailure",

                        "alarmInterfaceA":"aaaa",

                        "eventSourceType":"other",

                        "vfStatus":"Active"
                }
        }
}
Code Block
languagebash
titlealarm_off.json
collapsetrue
{

        "event":        {

                "commonEventHeader":{

                        "sourceId":"example-vserver-name-val-75044",

                        "startEpochMicrosec":1413378172000000,

                        "eventId":"ab305d54-85b4-a31b-7db2-fb6b9e546015",

                        "sequence":0,

                        "domain":"fault",

                        "lastEpochMicrosec":1413378172000000,

                        "eventName":"Fault_MultiCloud_VMFailureCleared",

                        "sourceName":"example-vserver-name-val-75044",

                        "priority":"High",

                        "version":3.0,

                        "reportingEntityName":"Multi-Cloud"




                },

                "faultFields":  {

                        "eventSeverity":"CRITICAL",

                        "alarmCondition":"Guest_Os_Failure",

                        "faultFieldsVersion":2.0,

                        "specificProblem":"Fault_MultiCloud_VMFailure",

                        "alarmInterfaceA":"aaaa",

                        "eventSourceType":"other",

                        "vfStatus":"Active"




                }

        }

}
Code Block
languagebash
titlepolicy_onset_input.json
collapsetrue
{

  "closedLoopEventClient": null,

  "policyVersion": null,

  "policyName": null,

  "policyScope": null,

  "target_type": "VM",

  "AAI": {

    "vserver.prov-status": "example-prov-status-val-9845",

    "vserver.resource-version": "1509546979412",

    "vserver.is-closed-loop-disabled": "false",

    "vserver.vserver-name2": "example-vserver-name2-val-55230",

    "vserver.vserver-id": "example-vserver-id-val-64888",

    "vserver.vserver-selflink": "example-vserver-selflink-val-91298",

    "vserver.in-maint": "true",

    "vserver.vserver-name": "example-vserver-name-val-75044",

    "generic-vnf.vnf-id": "example-vnf-id-val-31366",

    "generic-vnf.service-instance-id": ""

  },

  "closedLoopAlarmStart": 1413378172000000,

  "closedLoopEventStatus": "ONSET",

  "version": "1.0.2",

  "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",

  "target": "vserver.vserver-name",

  "closedLoopAlarmEnd": 0,

  "requestID": "a0d549da-cd11-4425-af1f-fa40fdfc44ff",

  "from": "DCAE"

}
Code Block
languagebash
titlepolicy_abated_input.json
collapsetrue
{

  "closedLoopEventClient": null,

  "policyVersion": null,

  "policyName": null,

  "policyScope": null,

  "target_type": "VM",

  "AAI": {

    "vserver.vserver-name2": "example-vserver-name2-val-55230",

    "vserver.vserver-id": "example-vserver-id-val-64888",

    "vserver.vserver-selflink": "example-vserver-selflink-val-91298",

    "vserver.vserver-name": "example-vserver-name-val-75044"

  },

  "closedLoopAlarmStart": 1413378172000000,

  "closedLoopEventStatus": "ABATED",

  "version": "1.0.2",

  "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",

  "target": null,

  "closedLoopAlarmEnd": 1413378172000000,

  "requestID": "a0d549da-cd11-4425-af1f-fa40fdfc44ff",

  "from": "DCAE"

}
Code Block
languagebash
titlesampleves
collapsetrue
{

    "event":{

        "commonEventHeader":{

            "version": 3.0,

            "eventName": "Slave MPU is offline",

            "domain": "fault",

            "eventId": "1501489595451",

            "eventType": "applicationVnf",

            "nfcNamingCode": "",

            "nfNamingCode": "",

            "sourceId": "example-vnf-id-val-31366",

            "sourceName": "example-vnf-name-val-51172",

            "reportingEntityId": "0000ZTHX1",

            "reportingEntityName": "0000ZTHX1",

            "priority": "High",

            "startEpochMicrosec": 1501518702,

            "lastEpochMicrosec": 1501518702,

            "sequence": 960

        },

        "faultFields":{

            "faultFieldsVersion": 2.0,

            "eventSeverity": "CRITICAL",

            "eventSourceType": "PgwFunction",

            "eventCategory": "equipmentAlarm",

            "alarmCondition": "The slave MPU board is offline or abnormal",

            "specificProblem": "Slave MPU is offline",

            "vfStatus": "Active",

            "alarmInterfaceA": "VNF_194.15.13.138",

            "alarmAdditionalInformation": [{

                "name":"specificProblemID",

                "value": "315"

            }, {

                "name":"objectUID",

                "value":"0000ZTHX1PGWGJI6V1"

            }, {

                "name":"locationInfo",

                "value":"MPU_22_20_0"

            }, {

                "name":"addInfo",

                "value":"Aid:17;AlarmCode:110010;AlarmReasonCode:110010;Remark:\"DeployUnit=22,Node=21,SubNode=0\";"

            }]

        }

    }

}
Code Block
languagebash
titleabatedves
collapsetrue
{

    "event":{

        "commonEventHeader":{

            "version": 3.0,

            "eventName": "Slave MPU is offlineCleared",

            "domain": "fault",

            "eventId": "1501489595451",

            "eventType": "applicationVnf",

            "nfcNamingCode": "",

            "nfNamingCode": "",

            "sourceId": "example-vnf-id-val-31366",

            "sourceName": "example-vnf-name-val-51172",

            "reportingEntityId": "0000ZTHX1",

            "reportingEntityName": "0000ZTHX1",

            "priority": "High",

            "startEpochMicrosec": 1501518702,

            "lastEpochMicrosec": 1501518702,

            "sequence": 960

        },

        "faultFields":{

            "faultFieldsVersion": 2.0,

            "eventSeverity": "CRITICAL",

            "eventSourceType": "PgwFunction",

            "eventCategory": "equipmentAlarm",

            "alarmCondition": "The slave MPU board is offline or abnormal",

            "specificProblem": "The slave MPU board is offline or abnormal",

            "vfStatus": "Active",

            "alarmInterfaceA": "VNF_194.15.13.138",

            "alarmAdditionalInformation": [{

                "name":"specificProblemID",

                "value": "315"

            }, {

                "name":"objectUID",

                "value":"0000ZTHX1PGWGJI6V1"

            }, {

                "name":"locationInfo",

                "value":"MPU_22_20_0"

            }, {

                "name":"addInfo",

                "value":"Aid:17;AlarmCode:110010;AlarmReasonCode:110010;Remark:\"DeployUnit=22,Node=21,SubNode=0\";"

            }]

        }

    }

}
Code Block
languagebash
titleholmesrule
collapsetrue
{

"rulename": "VoLTE",

"loopcontrolname": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",

"description": "This rule is designed for the correlation analysis for the VoLTE use case.",

"content": "package org.onap.holmes.droolsRule;\n\nimport org.onap.holmes.common.dmaap.DmaapService;\nimport org.onap.holmes.common.api.stat.VesAlarm;\nimport org.onap.holmes.common.aai.CorrelationUtil;\nimport org.onap.holmes.common.dmaap.entity.PolicyMsg;\nimport org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;\nimport org.onap.holmes.common.utils.DroolsLog;\n \n\nrule \"Relation_analysis_Rule\"\nsalience 200\nno-loop true\n    when\n        $root : VesAlarm(alarmIsCleared == 0,\n            $sourceId: sourceId, sourceId != null && !sourceId.equals(\"\"),\n\t\t\t$sourceName: sourceName, sourceName != null && !sourceName.equals(\"\"),\n\t\t\t$startEpochMicrosec: startEpochMicrosec,\n            specificProblem in (\"Fault_MultiCloud_VMFailure\"),\n            $eventId: eventId)\n        $child : VesAlarm( eventId != $eventId, parentId == null,\n            CorrelationUtil.getInstance().isTopologicallyRelated(sourceId, $sourceId, $sourceName),\n            specificProblem in (\"Slave MPU is offline\"),\n            startEpochMicrosec < $startEpochMicrosec + 60000 && startEpochMicrosec > $startEpochMicrosec - 60000 )\n    then\n\t\t$child.setParentId($root.getEventId());\n\t\tupdate($child);\n\t\t\nend\n\nrule \"root_has_child_handle_Rule\"\nsalience 150\nno-loop true\n\twhen\n\t\t$root : VesAlarm(alarmIsCleared == 0, rootFlag == 0, $eventId: eventId)\n\t\t$child : VesAlarm(eventId != $eventId, parentId == $eventId)\n\tthen\n\t\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\n\t\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, $child, \"org.onap.holmes.droolsRule\");\n        dmaapService.publishPolicyMsg(policyMsg, \"unauthenticated.DCAE_CL_OUTPUT\");\n\t\t$root.setRootFlag(1);\n\t\tupdate($root);\nend\n\nrule \"root_no_child_handle_Rule\"\nsalience 100\nno-loop true\n    when\n        $root : VesAlarm(alarmIsCleared == 0, rootFlag == 0,\n            sourceId != null && !sourceId.equals(\"\"),\n\t\t\tsourceName != null && !sourceName.equals(\"\"),\n            specificProblem in (\"Fault_MultiCloud_VMFailure\"))\n    then\n\t\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\n\t\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \"org.onap.holmes.droolsRule\");\n        dmaapService.publishPolicyMsg(policyMsg, \"unauthenticated.DCAE_CL_OUTPUT\");\n\t\t$root.setRootFlag(1);\n\t\tupdate($root);\nend\n\nrule \"root_cleared_handle_Rule\"\nsalience 100\nno-loop true\n    when\n        $root : VesAlarm(alarmIsCleared == 1, rootFlag == 1)\n    then\n\t\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\n\t\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \"org.onap.holmes.droolsRule\");\n        dmaapService.publishPolicyMsg(policyMsg, \"unauthenticated.DCAE_CL_OUTPUT\");\n\t\tretract($root);\nend\n\nrule \"child_handle_Rule\"\nsalience 100\nno-loop true\n    when\n        $child : VesAlarm(alarmIsCleared == 1, rootFlag == 0)\n    then\n\t\tretract($child);\nend",

"enabled": 1

}



Before install Holmes dockers, you need to installĀ postgres

...