Table of Contents |
---|
Prerequisites
MSB must be installed and started and the user knows the IP address of the MSB API gateway service. Regarding how to install MSB, please go to MSB Test Environment Setup.
PostgreSQL(v9.5) must be installed and started. For the guidance on how to run a PostgreSQL, please refer to Offical Repository of PostgreSQL.
Info While setting up PostgreSQL, a database and a user named ‘holmes’ must be created. The corresponding password should be set to ‘holmespwd’. Otherwise, Holmes could not be started up successfully.
...
As a DCAE Analytics Application
<<TO BE DONE>>
As an Independent Application
Installation
When integrated with DCAE, there's not too much to do from Holmes' perspective. DCAE spins up Holmes, deploys the default rules and provides the configuration infomation to Holmes so that Holmes could complete self-configuration using those information.
Anyway, if you want to test whether Holmes is woking as expected. Please follow the steps below.
Info |
---|
Before we start, please make sure that DCAE is deployed correctly and Holmes has been started. |
Check whether the containers of Holmes are running.
Log in to the ONAP docker repo:
Code Block language bash sudo docker login -u docker -p docker nexus3.onap.org:10001
Start Holmes using the commands below:
Code Block language bash # DB_IP - the IP address of Postgres. Do not specify the port. The default port(5432) is adopted. # MSB_IP - the IP address of the MSB API gateway service. # HOST_IP - the IP address of the host (not the docker daemon) on which the docker container is running. # If the 'TESTING' variable is set to '1', you're telling Holmes not to query the IP address of the Holmes containers from the DCAE config binding service but to get it directly from the environment variable 'HOST_IP'. sudo docker run --name holmes-rule-management -p 9101:9101 -d -e URL_JDBC=$DB_IP -e MSB_ADDR=$MSB_IP -e TESTING=1 -e HOST_IP=$HOST_IP nexus3.onap.org:10001/onap/holmes/rule-management sudo docker run --name holmes-engine-management -p 9102:9102 -d -e URL_JDBC=$DB_IP -e MSB_ADDR=$MSB_IP -e TESTING=1 -e HOST_IP=$HOST_IP nexus3.onap.org:10001/onap/holmes/engine-management
curl http://${MSB_IP}/api/holmes-rule-mgmt/v1/healthcheck curl http://${MSB_IP}/api/holmes-engine-mgmt/v1/healthcheck
If the returned value is true and the status code is 200, it means that Holmes is ready. Also, this could be done by checking the status shown on the DCAE Consul page.
Check whether the rule of Holmes has been deployed.
Code Block language bash curl http://${MSB_IP}/api/holmes-rule-mgmt/v1/rule
If the rule is deployed, the API should return an array with a rule in it. Otherwise, an empty array is returned. If the rule is not deployed successfully, you have to check whether there are any exceptions inside the holmes-rule-management docker container.
Alternatively, you could deploy the rule manually by calling "curl -X PUT -H 'Content-Type: application/json' -d @holmes-rule.txt http://${MSB_IP}/api/holmes-rule-mgmt/v1/rule". Please notice that this is not a normal way in which the rule is supposed to be deployed when Holmes is integrated with DCAE. But for testing purpose, it's OK for us to do so.- Mock some data into A&AI to support alarm correlation analysis.
PUT the model info into A&AI. The API to be used is: https://${AAI_IP}:${AAI_PORT}/aai/v11/service-design-and-creation/models/model/example-model-invariant-id-val-16059
Code Block language js title A&AI Model Info for Testing linenumbers true collapse true { "model-invariant-id": "example-model-invariant-id-val-16059", "model-type": "example-model-type-val-52170", "model-vers": { "model-ver": [{ "model-version-id": "example-model-version-id-val-72981", "model-name": "example-model-name-val-96366", "model-version": "example-model-version-val-61339", "model-description": "example-model-description-val-71137", "model-elements": { "model-element": [{ "model-element-uuid": "example-model-element-uuid-val-6400", "new-data-del-flag": "example-new-data-del-flag-val-92365", "cardinality": "example-cardinality-val-17526", "linkage-points": [ "example-linkage-points-val-63192-1", "example-linkage-points-val-65943-2" ], "model-elements": { "model-element": [{ "model-element-uuid": "example-model-element-uuid-val-70051", "new-data-del-flag": "example-new-data-del-flag-val-53292", "cardinality": "example-cardinality-val-8144" }] }, "model-constraints": { "model-constraint": [{ "model-constraint-uuid": "example-model-constraint-uuid-val-67204", "constrained-element-set-uuid-to-replace": "example-constrained-element-set-uuid-to-replace-val-61313", "constrained-element-sets": { "constrained-element-set": [{ "constrained-element-set-uuid": "example-constrained-element-set-uuid-val-21689", "constraint-type": "example-constraint-type-val-14991", "check-type": "example-check-type-val-55014", "element-choice-sets": { "element-choice-set": [{ "element-choice-set-uuid": "example-element-choice-set-uuid-val-23286", "element-choice-set-name": "example-element-choice-set-name-val-65362", "cardinality": "example-cardinality-val-64417", "model-elements": { "model-element": [{ "model-element-uuid": "example-model-element-uuid-val-41764", "new-data-del-flag": "example-new-data-del-flag-val-34059", "cardinality": "example-cardinality-val-27702" }] } }] } }] } }] } }] }, "metadata": { "metadatum": [{ "metaname": "example-metaname-val-51216", "metaval": "example-metaval-val-63262" }] } }] } }
PUT the VNF info into A&AI. The API to be used is: https://${AAI_IP}:${AAI_PORT}/aai/v11/network/generic-vnfs/generic-vnf/example-vnf-id-val-92494
Code Block language js title A&AI VNF Info for Testing linenumbers true collapse true { "vnf-id": "example-vnf-id-val-92494", "vnf-name": "example-vnf-name-val-94632", "vnf-name2": "example-vnf-name2-val-57999", "vnf-type": "example-vnf-type-val-44589", "service-id": "example-service-id-val-37872", "regional-resource-zone": "example-regional-resource-zone-val-26446", "prov-status": "example-prov-status-val-58027", "operational-status": "example-operational-status-val-83556", "license-key": "example-license-key-val-47454", "equipment-role": "example-equipment-role-val-95205", "orchestration-status": "example-orchestration-status-val-63112", "heat-stack-id": "example-heat-stack-id-val-93893", "mso-catalog-key": "example-mso-catalog-key-val-15726", "management-option": "example-management-option-val-84960", "ipv4-oam-address": "example-ipv4-oam-address-val-93234", "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-34415", "nm-lan-v6-address": "example-nm-lan-v6-address-val-97486", "management-v6-address": "example-management-v6-address-val-21199", "vcpu": 96896460, "vcpu-units": "example-vcpu-units-val-90774", "vmemory": 54650581, "vmemory-units": "example-vmemory-units-val-28553", "vdisk": 6772586, "vdisk-units": "example-vdisk-units-val-60716", "in-maint": true, "is-closed-loop-disabled": true, "summary-status": "example-summary-status-val-4653", "encrypted-access-flag": true, "entitlement-assignment-group-uuid": "example-entitlement-assignment-group-uuid-val-1539", "entitlement-resource-uuid": "example-entitlement-resource-uuid-val-19693", "license-assignment-group-uuid": "example-license-assignment-group-uuid-val-97604", "license-key-uuid": "example-license-key-uuid-val-50052", "model-invariant-id": "example-model-invariant-id-val-16059", "model-version-id": "example-model-version-id-val-72981", "model-customization-id": "example-model-customization-id-val-85355", "widget-model-id": "example-widget-model-id-val-27507", "widget-model-version": "example-widget-model-version-val-31544", "as-number": "example-as-number-val-59007", "regional-resource-subzone": "example-regional-resource-subzone-val-20027", "nf-type": "example-nf-type-val-25665", "nf-function": "example-nf-function-val-75554", "nf-role": "example-nf-role-val-26425", "nf-naming-code": "example-nf-naming-code-val-49878", "selflink": "example-selflink-val-21826", "ipv4-oam-gateway-address": "example-ipv4-oam-gateway-address-val-97716", "ipv4-oam-gateway-address-prefix-length": 24045, "vlan-id-outer": 79368687, "nm-profile-name": "example-nm-profile-name-val-34412", "l-interfaces": { "l-interface": [{ "interface-name": "example-interface-name-val-93936", "interface-role": "example-interface-role-val-66853", "v6-wan-link-ip": "example-v6-wan-link-ip-val-88688", "selflink": "example-selflink-val-55665", "interface-id": "example-interface-id-val-67717", "macaddr": "example-macaddr-val-23267", "network-name": "example-network-name-val-47462", "management-option": "example-management-option-val-70926", "interface-description": "example-interface-description-val-87495", "is-port-mirrored": true, "in-maint": true, "prov-status": "example-prov-status-val-38189", "is-ip-unnumbered": true, "vlans": { "vlan": [{ "vlan-interface": "example-vlan-interface-val-89208", "vlan-id-inner": 40966025, "vlan-id-outer": 75095096, "speed-value": "example-speed-value-val-77467", "speed-units": "example-speed-units-val-16178", "vlan-description": "example-vlan-description-val-61559", "backdoor-connection": "example-backdoor-connection-val-48246", "vpn-key": "example-vpn-key-val-23889", "orchestration-status": "example-orchestration-status-val-59011", "in-maint": true, "prov-status": "example-prov-status-val-69212", "is-ip-unnumbered": true, "l3-interface-ipv4-address-list": [{ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-57705", "l3-interface-ipv4-prefix-length": 68991253, "vlan-id-inner": 81814342, "vlan-id-outer": 63547853, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-45262", "neutron-subnet-id": "example-neutron-subnet-id-val-72732" }], "l3-interface-ipv6-address-list": [{ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-65016", "l3-interface-ipv6-prefix-length": 70490146, "vlan-id-inner": 73786663, "vlan-id-outer": 58999077, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-28659", "neutron-subnet-id": "example-neutron-subnet-id-val-34897" }] }] }, "sriov-vfs": { "sriov-vf": [{ "pci-id": "example-pci-id-val-68520", "vf-vlan-filter": "example-vf-vlan-filter-val-87152", "vf-mac-filter": "example-vf-mac-filter-val-43325", "vf-vlan-strip": true, "vf-vlan-anti-spoof-check": true, "vf-mac-anti-spoof-check": true, "vf-mirrors": "example-vf-mirrors-val-14440", "vf-broadcast-allow": true, "vf-unknown-multicast-allow": true, "vf-unknown-unicast-allow": true, "vf-insert-stag": true, "vf-link-status": "example-vf-link-status-val-75712", "neutron-network-id": "example-neutron-network-id-val-99961" }] }, "l-interfaces": { "l-interface": [{ "interface-name": "example-interface-name-val-38798", "interface-role": "example-interface-role-val-68137", "v6-wan-link-ip": "example-v6-wan-link-ip-val-9711", "selflink": "example-selflink-val-72136", "interface-id": "example-interface-id-val-20579", "macaddr": "example-macaddr-val-91498", "network-name": "example-network-name-val-2116", "management-option": "example-management-option-val-85226", "interface-description": "example-interface-description-val-30672", "is-port-mirrored": true, "in-maint": true, "prov-status": "example-prov-status-val-11785", "is-ip-unnumbered": true }] }, "l3-interface-ipv4-address-list": [{ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-82243", "l3-interface-ipv4-prefix-length": 24495932, "vlan-id-inner": 28179703, "vlan-id-outer": 54424777, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-31355", "neutron-subnet-id": "example-neutron-subnet-id-val-99593" }], "l3-interface-ipv6-address-list": [{ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-68768", "l3-interface-ipv6-prefix-length": 65760501, "vlan-id-inner": 28664712, "vlan-id-outer": 8735137, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-96024", "neutron-subnet-id": "example-neutron-subnet-id-val-34924" }] }] }, "lag-interfaces": { "lag-interface": [{ "interface-name": "example-interface-name-val-34047", "interface-description": "example-interface-description-val-53131", "speed-value": "example-speed-value-val-4822", "speed-units": "example-speed-units-val-61530", "interface-id": "example-interface-id-val-12274", "interface-role": "example-interface-role-val-56207", "prov-status": "example-prov-status-val-65777", "in-maint": true, "l-interfaces": { "l-interface": [{ "interface-name": "example-interface-name-val-34884", "interface-role": "example-interface-role-val-87559", "v6-wan-link-ip": "example-v6-wan-link-ip-val-63930", "selflink": "example-selflink-val-36800", "interface-id": "example-interface-id-val-49667", "macaddr": "example-macaddr-val-62161", "network-name": "example-network-name-val-98512", "management-option": "example-management-option-val-77280", "interface-description": "example-interface-description-val-75207", "is-port-mirrored": true, "in-maint": true, "prov-status": "example-prov-status-val-34894", "is-ip-unnumbered": true, "vlans": { "vlan": [{ "vlan-interface": "example-vlan-interface-val-3258", "vlan-id-inner": 67730037, "vlan-id-outer": 92584256, "speed-value": "example-speed-value-val-59308", "speed-units": "example-speed-units-val-77835", "vlan-description": "example-vlan-description-val-61466", "backdoor-connection": "example-backdoor-connection-val-81618", "vpn-key": "example-vpn-key-val-30739", "orchestration-status": "example-orchestration-status-val-19920", "in-maint": true, "prov-status": "example-prov-status-val-46706", "is-ip-unnumbered": true, "l3-interface-ipv4-address-list": [{ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-18444", "l3-interface-ipv4-prefix-length": 28663965, "vlan-id-inner": 34433225, "vlan-id-outer": 19585224, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-520", "neutron-subnet-id": "example-neutron-subnet-id-val-70175" }], "l3-interface-ipv6-address-list": [{ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-32093", "l3-interface-ipv6-prefix-length": 59220210, "vlan-id-inner": 26953530, "vlan-id-outer": 95287352, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-7841", "neutron-subnet-id": "example-neutron-subnet-id-val-18777" }] }] }, "sriov-vfs": { "sriov-vf": [{ "pci-id": "example-pci-id-val-56555", "vf-vlan-filter": "example-vf-vlan-filter-val-5714", "vf-mac-filter": "example-vf-mac-filter-val-68263", "vf-vlan-strip": true, "vf-vlan-anti-spoof-check": true, "vf-mac-anti-spoof-check": true, "vf-mirrors": "example-vf-mirrors-val-4988", "vf-broadcast-allow": true, "vf-unknown-multicast-allow": true, "vf-unknown-unicast-allow": true, "vf-insert-stag": true, "vf-link-status": "example-vf-link-status-val-47153", "neutron-network-id": "example-neutron-network-id-val-38263" }] }, "l-interfaces": { "l-interface": [{ "interface-name": "example-interface-name-val-2345", "interface-role": "example-interface-role-val-86205", "v6-wan-link-ip": "example-v6-wan-link-ip-val-51523", "selflink": "example-selflink-val-20841", "interface-id": "example-interface-id-val-27749", "macaddr": "example-macaddr-val-85999", "network-name": "example-network-name-val-45375", "management-option": "example-management-option-val-35314", "interface-description": "example-interface-description-val-55234", "is-port-mirrored": true, "in-maint": true, "prov-status": "example-prov-status-val-78261", "is-ip-unnumbered": true }] }, "l3-interface-ipv4-address-list": [{ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-97565", "l3-interface-ipv4-prefix-length": 80004837, "vlan-id-inner": 33788064, "vlan-id-outer": 22891526, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-17236", "neutron-subnet-id": "example-neutron-subnet-id-val-51389" }], "l3-interface-ipv6-address-list": [{ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-63123", "l3-interface-ipv6-prefix-length": 27701134, "vlan-id-inner": 85864201, "vlan-id-outer": 20123649, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-94145", "neutron-subnet-id": "example-neutron-subnet-id-val-4062" }] }] } }] }, "vf-modules": { "vf-module": [{ "vf-module-id": "example-vf-module-id-val-26067", "vf-module-name": "example-vf-module-name-val-75948", "heat-stack-id": "example-heat-stack-id-val-11477", "orchestration-status": "example-orchestration-status-val-36222", "is-base-vf-module": true, "model-invariant-id": "example-model-invariant-id-val-16059", "model-version-id": "example-model-version-id-val-72981", "model-customization-id": "example-model-customization-id-val-64571", "widget-model-id": "example-widget-model-id-val-48795", "widget-model-version": "example-widget-model-version-val-94968", "contrail-service-instance-fqdn": "example-contrail-service-instance-fqdn-val-11723", "module-index": 34659, "selflink": "example-selflink-val-8217" }] }, "licenses": { "license": [{ "group-uuid": "example-group-uuid-val-3075", "resource-uuid": "example-resource-uuid-val-20113" }] }, "entitlements": { "entitlement": [{ "group-uuid": "example-group-uuid-val-60813", "resource-uuid": "example-resource-uuid-val-13404" }] } }
PUT the VM into into A&AI. The API to be used is: https://${AAI_IP}:${AAI_PORT}/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/example-cloud-owner-val-45051/example-cloud-region-id-val-56689
Code Block language js title A&AI VM Info for Testing linenumbers true collapse true { "cloud-owner": "example-cloud-owner-val-45051", "cloud-region-id": "example-cloud-region-id-val-56689", "cloud-type": "example-cloud-type-val-72299", "owner-defined-type": "example-owner-defined-type-val-19903", "cloud-region-version": "example-cloud-region-version-val-64597", "identity-url": "example-identity-url-val-43785", "cloud-zone": "example-cloud-zone-val-79524", "complex-name": "example-complex-name-val-13553", "sriov-automation": true, "cloud-extra-info": "example-cloud-extra-info-val-24927", "cloud-epa-caps": "example-cloud-epa-caps-val-74832", "volume-groups": { "volume-group": [{ "volume-group-id": "example-volume-group-id-val-48316", "volume-group-name": "example-volume-group-name-val-33497", "heat-stack-id": "example-heat-stack-id-val-77034", "vnf-type": "example-vnf-type-val-73392", "orchestration-status": "example-orchestration-status-val-90280", "model-customization-id": "example-model-customization-id-val-706", "vf-module-model-customization-id": "example-vf-module-model-customization-id-val-29401" }] }, "tenants": { "tenant": [{ "tenant-id": "example-tenant-id-val-51834", "tenant-name": "example-tenant-name-val-49965", "tenant-context": "example-tenant-context-val-251", "vservers": { "vserver": [{ "vserver-id": "example-vserver-id-val-51834", "vserver-name": "example-vserver-name-val-5470", "vserver-name2": "example-vserver-name2-val-8319", "prov-status": "example-prov-status-val-31104", "vserver-selflink": "example-vserver-selflink-val-51079", "in-maint": true, "is-closed-loop-disabled": true, "volumes": { "volume": [{ "volume-id": "example-volume-id-val-97332", "volume-selflink": "example-volume-selflink-val-57983" }] }, "l-interfaces": { "l-interface": [{ "interface-name": "example-interface-name-val-95258", "interface-role": "example-interface-role-val-4341", "v6-wan-link-ip": "example-v6-wan-link-ip-val-70584", "selflink": "example-selflink-val-40727", "interface-id": "example-interface-id-val-9973", "macaddr": "example-macaddr-val-70727", "network-name": "example-network-name-val-71679", "management-option": "example-management-option-val-9872", "interface-description": "example-interface-description-val-11005", "is-port-mirrored": true, "in-maint": true, "prov-status": "example-prov-status-val-64302", "is-ip-unnumbered": true, "allowed-address-pairs": "example-allowed-address-pairs-val-75071", "vlans": { "vlan": [{ "vlan-interface": "example-vlan-interface-val-51106", "vlan-id-inner": 12024447, "vlan-id-outer": 93878794, "speed-value": "example-speed-value-val-93943", "speed-units": "example-speed-units-val-63753", "vlan-description": "example-vlan-description-val-74608", "backdoor-connection": "example-backdoor-connection-val-34343", "vpn-key": "example-vpn-key-val-13624", "orchestration-status": "example-orchestration-status-val-63774", "in-maint": true, "prov-status": "example-prov-status-val-50628", "is-ip-unnumbered": true, "l3-interface-ipv4-address-list": [{ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-70692", "l3-interface-ipv4-prefix-length": 14221462, "vlan-id-inner": 96387854, "vlan-id-outer": 46917828, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-82810", "neutron-subnet-id": "example-neutron-subnet-id-val-36432" }], "l3-interface-ipv6-address-list": [{ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-95967", "l3-interface-ipv6-prefix-length": 59957667, "vlan-id-inner": 9040289, "vlan-id-outer": 42203797, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-32924", "neutron-subnet-id": "example-neutron-subnet-id-val-1548" }] }] }, "sriov-vfs": { "sriov-vf": [{ "pci-id": "example-pci-id-val-68565", "vf-vlan-filter": "example-vf-vlan-filter-val-22646", "vf-mac-filter": "example-vf-mac-filter-val-62438", "vf-vlan-strip": true, "vf-vlan-anti-spoof-check": true, "vf-mac-anti-spoof-check": true, "vf-mirrors": "example-vf-mirrors-val-56496", "vf-broadcast-allow": true, "vf-unknown-multicast-allow": true, "vf-unknown-unicast-allow": true, "vf-insert-stag": true, "vf-link-status": "example-vf-link-status-val-78853", "neutron-network-id": "example-neutron-network-id-val-12609" }] }, "l-interfaces": { "l-interface": [{ "interface-name": "example-interface-name-val-61537", "interface-role": "example-interface-role-val-34313", "v6-wan-link-ip": "example-v6-wan-link-ip-val-9217", "selflink": "example-selflink-val-73451", "interface-id": "example-interface-id-val-81524", "macaddr": "example-macaddr-val-23242", "network-name": "example-network-name-val-91691", "management-option": "example-management-option-val-39698", "interface-description": "example-interface-description-val-42952", "is-port-mirrored": true, "in-maint": true, "prov-status": "example-prov-status-val-71680", "is-ip-unnumbered": true, "allowed-address-pairs": "example-allowed-address-pairs-val-85276" }] }, "l3-interface-ipv4-address-list": [{ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-37390", "l3-interface-ipv4-prefix-length": 53099753, "vlan-id-inner": 94559828, "vlan-id-outer": 35886590, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-9803", "neutron-subnet-id": "example-neutron-subnet-id-val-2738" }], "l3-interface-ipv6-address-list": [{ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-39142", "l3-interface-ipv6-prefix-length": 5124170, "vlan-id-inner": 89028845, "vlan-id-outer": 87938968, "is-floating": true, "neutron-network-id": "example-neutron-network-id-val-28541", "neutron-subnet-id": "example-neutron-subnet-id-val-23498" }] }] } }] } }] }, "flavors": { "flavor": [{ "flavor-id": "example-flavor-id-val-56953", "flavor-name": "example-flavor-name-val-72751", "flavor-vcpus": 6753, "flavor-ram": 45178, "flavor-disk": 30009, "flavor-ephemeral": 27929, "flavor-swap": "example-flavor-swap-val-19245", "flavor-is-public": true, "flavor-selflink": "example-flavor-selflink-val-41578", "flavor-disabled": true }] }, "group-assignments": { "group-assignment": [{ "group-id": "example-group-id-val-49634", "group-type": "example-group-type-val-80269", "group-name": "example-group-name-val-60820", "group-description": "example-group-description-val-93352" }] }, "snapshots": { "snapshot": [{ "snapshot-id": "example-snapshot-id-val-37608", "snapshot-name": "example-snapshot-name-val-63390", "snapshot-architecture": "example-snapshot-architecture-val-78748", "snapshot-os-distro": "example-snapshot-os-distro-val-28102", "snapshot-os-version": "example-snapshot-os-version-val-70514", "application": "example-application-val-92224", "application-vendor": "example-application-vendor-val-92823", "application-version": "example-application-version-val-28382", "snapshot-selflink": "example-snapshot-selflink-val-93022", "prev-snapshot-id": "example-prev-snapshot-id-val-824" }] }, "images": { "image": [{ "image-id": "example-image-id-val-13222", "image-name": "example-image-name-val-87877", "image-architecture": "example-image-architecture-val-92718", "image-os-distro": "example-image-os-distro-val-10351", "image-os-version": "example-image-os-version-val-45061", "application": "example-application-val-79741", "application-vendor": "example-application-vendor-val-49946", "application-version": "example-application-version-val-56159", "image-selflink": "example-image-selflink-val-15770", "metadata": { "metadatum": [{ "metaname": "example-metaname-val-58837", "metaval": "example-metaval-val-73078" }] } }] }, "dvs-switches": { "dvs-switch": [{ "switch-name": "example-switch-name-val-33498", "vcenter-url": "example-vcenter-url-val-16098" }] }, "oam-networks": { "oam-network": [{ "network-uuid": "example-network-uuid-val-64212", "network-name": "example-network-name-val-22313", "cvlan-tag": 43192772, "ipv4-oam-gateway-address": "example-ipv4-oam-gateway-address-val-28327", "ipv4-oam-gateway-address-prefix-length": 29455 }] }, "availability-zones": { "availability-zone": [{ "availability-zone-name": "example-availability-zone-name-val-76658", "hypervisor-type": "example-hypervisor-type-val-46950", "operational-status": "example-operational-status-val-37446" }] }, "esr-system-info-list": { "esr-system-info": [{ "esr-system-info-id": "example-esr-system-info-id-val-65714", "system-name": "example-system-name-val-71196", "type": "example-type-val-31621", "vendor": "example-vendor-val-6625", "version": "example-version-val-32348", "service-url": "example-service-url-val-56266", "user-name": "example-user-name-val-44415", "password": "example-password-val-87103", "system-type": "example-system-type-val-77938", "protocal": "example-protocal-val-66713", "ssl-cacert": "example-ssl-cacert-val-59256", "ssl-insecure": true, "ip-address": "example-ip-address-val-31479", "port": "example-port-val-1420", "cloud-domain": "example-cloud-domain-val-71236", "default-tenant": "example-default-tenant-val-31700", "system-status": "example-system-status-val-53478" }] } }
PUT the link info into A&AI. The API to be used is: https://${AAI_IP}:${AAI_PORT}/aai/v11/network/generic-vnfs/generic-vnf/example-vnf-id-val-92494/relationship-list/relationship
Code Block language js title A&AI Link Info for Testing linenumbers true collapse true { "related-to": "vserver", "relationship-data": [{ "relationship-key": "cloud-region.cloud-region-id", "relationship-value": "example-cloud-region-id-val-56689" } { "relationship-key": "tenant.tenant-id", "relationship-value": "example-tenant-id-val-51834" } { "relationship-key": "vserver.vserver-id", "relationship-value": "example-vserver-id-val-51834" }] }
Send alarms to the unauthenticated.SEC_FAULT_OUTPUT topic of DMaaP.
Code Block language js title Parent Alarm/Root Cause linenumbers true collapse true { "event": { "commonEventHeader": { "sourceId": "example-vserver-id-val-51834", // The value should be the same as what you set to the VM you just mocked. "startEpochMicrosec": 1413378172000000, "eventId": "ab305d54-85b4-a31b-7db2-fb6b977766", "sequence": 0, "domain": "fault", "lastEpochMicrosec": 1413378172000033, "eventName": "Fault_MultiCloud_VMFailure", "sourceName": "example-vserver-name-val-5470", // The value should be the same as what you set to the VM you just mocked. "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 language js title Child Alarm linenumbers true collapse true { "VESversion": "v5", "event": { "commonEventHeader": { "startEpochMicrosec": 1510572959000000, "sourceId": "example-vnf-id-val-92494", // The value should be the same as what you set to the VNF you just mocked. "eventId": "1510564232034", "nfcNamingCode": "", "reportingEntityId": "0000ZTHX1", "internalHeaderFields": { "collectorTimeStamp": "Mon, 11 13 2017 11:35:59 GMT" }, "eventType": "applicationVnf", "priority": "Normal", "version": 1.1, "reportingEntityName": "0000ZTHX1", "sequence": 5, "domain": "fault", "lastEpochMicrosec": 1510572959000000, "eventName": "Fault_IMSSBC_Backup MPU is down", "sourceName": "example-vnf-name-val-94632", // The value should be the same as what you set to the VNF you just mocked. "nfNamingCode": "" }, "faultFields": { "eventSeverity": "NORMAL", "alarmCondition": "Backup MPU is abnormal", "faultFieldsVersion": 2.1, "eventCategory": "vnf263ba4cd-4622-4a0a-ab7f-55a", "specificProblem": "Backup MPU is abnormal", "alarmAdditionalInformation": [{ "name": "specificProblemID", "value": "0" }, { "name": "locationInfo", "value": "rack=1,shelf=2,board=13,cpu=1" }, { "name": "origSeverity", "value": "1" }, { "name": "neUID", "value": "0000ZTHX1SBCGK1PQ3" }, { "name": "objectUID", "value": "0000ZTHX1SBCGK1PQ3" }, { "name": "addInfo", "value": "Aid:561306686;AlarmCode:23078;AlarmVMHOST:aa;Cause:0;Remark:\"PVFlag 0(PNF),IP IpType=IPV4-IpAddr=10.43.116.82,Port 331,Instance Id 1\";" }, { "name": "neName", "value": "a7b4e7df-2aed-4210-a3c9-bfad1a30b4a6" }, { "name": "objectType", "value": "SbcFunction" }, { "name": "alarmStatus", "value": "1" }, { "name": "alarmType", "value": "equipmentAlarm" }, { "name": "specificProblem", "value": "Backup MPU is abnormal" }, { "name": "eventTime", "value": "2017-10-31 09:51:15" }, { "name": "alarmId", "value": "1504850096608" }, { "name": "objectName", "value": "vnf263ba4cd-4622-4a0a-ab7f-55a" }, { "name": "alarmTitle", "value": "Backup MPU is down" }, { "name": "alarmSeq", "value": "960" }, { "name": "neType", "value": "IMSSBC" } ], "eventSourceType": "virtualNetworkFunction", "vfStatus": "Active" } } }
Info Note that the value of the sourceId and the sourceName field in the parent alarm should be identical with that in the VM info in A&AI. Similarly, the values of the specific fields of the child alarm should be the same with the corresponding info in VNF.
After the root cause (parent alarm) is sent, there should be a corresponding control loop event on the unauthenticated.DCAE_CL_OUTPUT topic of DMaaP. Also, you could find the corresponding message with a leading "policyMsg" in the log file in the holmes-engine-management docker container. If both the parent alarm and the child alarm exist in Holmes, there should be some log items saying "Correlation Identified" as well.
As an Independent Application
Installation
Log in to the ONAP docker repo:
Code Block language bash sudo docker login -u docker -p docker nexus3.onap.org:10001
Start Holmes using the commands below:
Code Block language bash # DB_IP - the IP address of Postgres. Do not specify the port. The default port(5432) is adopted. # MSB_IP - the IP address of the MSB API gateway service. # HOST_IP - the IP address of the host (not the docker daemon) on which the docker container is running. # If the 'TESTING' variable is set to '1', you're telling Holmes not to query the IP address of the Holmes containers from the DCAE config binding service but to get it directly from the environment variable 'HOST_IP'. sudo docker run --name holmes-rule-management -p 9101:9101 -d -e URL_JDBC=$DB_IP -e MSB_ADDR=$MSB_IP -e TESTING=1 -e HOST_IP=$HOST_IP nexus3.onap.org:10001/onap/holmes/rule-management sudo docker run --name holmes-engine-management -p 9102:9102 -d -e URL_JDBC=$DB_IP -e MSB_ADDR=$MSB_IP -e TESTING=1 -e HOST_IP=$HOST_IP nexus3.onap.org:10001/onap/holmes/engine-management
Call the health check API to check whether Holmes has been started up successfully.
Code Block language bash # the rule management component curl http://$MSB_IP/api/holmes-rule-mgmt/v1/healthcheck # the engine management component curl http://$MSB_IP/api/holmes-engine-mgmt/v1/healthcheck
If the component returns "true", it is spun up successfully. Otherwise you have to use the 'sudo docker ps' and 'sudo docker logs <container_name>' to check what happened during the service instantiation.
Configurations
When Holmes is run in the standalone mode, it has to be configured manually in order to perform the sub/pub actions on DMaaP.
Subscribing
Code Block language bash curl -X PUT -H 'Content-Type: application/json' \ -d "{\"name\":\"unauthenticated.SEC_FAULT_OUTPUT\", \"url\":\"http://$DMAAP_IP:$DMAAP_PORT/events/unauthenticated.SEC_FAULT_OUTPUT\"}" \
Call the health check API to check whether Holmes has been started up successfully.
Code Block language bash # the rule management component curl http://$MSB_IP/api/holmes-ruel-mgmt/v1/healthcheck # the engine management component curl http://$MSB_IP/api/holmes-engine-mgmt/v1/healthcheck
If the component returns "true", it is spun up successfully. Otherwise you have to use the 'sudo docker ps' and 'sudo docker logs <container_name>' to check what happened during the service instantiation.
Configurations
When Holmes is run in the standalone mode, it has to be configured manually in order to perform the sub/pub actions on DMaaP.
dmaap/sub
After setting the subscribing url, a timer task will be started using the default query interval (15s).
Publishing Subscribing
Code Block language bash curl -X PUT -H 'Content-Type: application/json' \ -d '"{\"name\":\"unauthenticated.SECDCAE_FAULTCL_OUTPUT\", \"url\":\"http://$DMAAP_IP:$DMAAP_PORT/events/unauthenticated.DCAE_CL_OUTPUT\"}" \ http://$MSB_IP/api/holmes-engine-mgmt//$DMAAP_IP:$DMAAP_PORT/events/unauthenticated.SEC_FAULT_OUTPUT"}' \ v1/dmaap/pub
Then you have to deploy the rule into Holmes by calling:
Code Block | ||
---|---|---|
| ||
curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://$MSB_IP/api/holmes- |
...
rule-mgmt/v1/ |
...
After setting the subscribing url, a timer task will be started using the default query interval (15s).
rule |
The rule is saved into a file named "holmesrule" and it is attached here.
Info |
---|
If there are modifications performed by yourself, please update the contents of the holmesrule file first. |
If you want to update an existing rule, you have to add a field named "ruleid" into the holmesrule file using the real id returned by the API called above and then call:
...
Code Block | ||
---|---|---|
| ||
curl -X |
...
POST -H 'Content-Type: application/json' |
...
-d |
...
@holmesrule http://$MSB_IP/api/holmes-rule-mgmt/v1/rule |
For more information, please refer to Rule Management - Beijing.
Theoretically, after the configurations are finished, when you push the fault data on to the topic named "unauthenticated.SEC_FAULT_OUTPUT" of DMaaP, the data will be fetched and processed by Holmes and then push back to the topic named "unauthenticated.DCAE_CL_OUTPUT"
...
of DMaaP. To support the correlation analysis, A&AI has to be ready with certain resource data in it and registered to MSB.
Sample Data
DMaaP Message for Alarms from the EMS Driver
Code Block | ||
---|---|---|
| ||
curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://10.96.33.33/api/holmes-rule-mgmt/v1/rule |
The rule is saved into a file named "holmesrule" and it is attached here.
Info |
---|
If there are modifications performed by yourself, please update the contents of the holmesrule file first. |
If you want to update an existing rule, you have to add a field named "ruleid" into the holmesrule file using the real id returned by the API called above and then call:
Code Block | ||
---|---|---|
| ||
curl -X POST -H 'Content-Type: application/json' -d @holmesrule http://10.96.33.33/api/holmes-rule-mgmt/v1/rule |
For more information, please refer to Rule Management.
Theoretically, after the configurations are finished, when you push the fault data on to the topic named "unauthenticated.SEC_FAULT_OUTPUT" of DMaaP, the data will be fetched and processed by Holmes and then push back to the topic named "unauthenticated.DCAE_CL_OUTPUT" of DMaaP. To support the correlation analysis, A&AI has to be ready with certain resource data in it and registered to MSB.
Sample Data
DMaaP Message for Alarms from the EMS Driver
| ||
["{\"VESversion\":\"v5\",\"event\":{\"commonEventHeader\":{\"sourceId\":\"VNF_194.15.13.138\",\"startEpochMicrosec\":1501518702,\"eventId\":\"1501489595451\",\"nfcNamingCode\":\"\",\"reportingEntityId\":\"0000ZTHX1\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Fri, 10 20 2017 01:49:27 GMT\"},\"eventType\":\"applicationVnf\",\"priority\":\"High\",\"version\":3,\"reportingEntityName\":\"0000ZTHX1\",\"sequence\":960,\"domain\":\"fault\",\"lastEpochMicrosec\":1501518702,\"eventName\":\"Slave MPU is offline\",\"sourceName | ||
Code Block | ||
---|---|---|
| ||
["{\"VESversion\":\"v5\",\"event\":{\"commonEventHeader\":{\"sourceId\":\"VNF_194.15.13.138\",\"startEpochMicrosecnfNamingCode\":1501518702,\"\"},\"faultFields\":{\"eventIdeventSeverity\":\"1501489595451CRITICAL\",\"nfcNamingCodealarmCondition\":\"The slave MPU board is offline or abnormal\",\"reportingEntityIdfaultFieldsVersion\":2,\"0000ZTHX1eventCategory\",:\"internalHeaderFieldsequipmentAlarm\":{,\"collectorTimeStampspecificProblem\":\"Fri, 10 20 2017 01:49:27 GMT\"},\"eventTypeThe slave MPU board is offline or abnormal\",\"alarmInterfaceA\":\"applicationVnfVNF_194.15.13.138\",\"priorityalarmAdditionalInformation\":[{\"Highname\",:\"versionspecificProblemID\":3,\"reportingEntityNamevalue\":\"0000ZTHX1315\"},{\"sequencename\":960\"objectUID\",\"domainvalue\":\"fault0000ZTHX1PGWGJI6V1\"},{\"lastEpochMicrosecname\":1501518702\"locationInfo\",\"eventNamevalue\":\"Slave MPU is offlineMPU_22_20_0\"},{\"sourceNamename\":\"VNF_194.15.13.138addInfo\",\"nfNamingCodevalue\":\"Aid:17;AlarmCode:110010;AlarmReasonCode:110010;Remark:\"},\"faultFields\":{\"eventSeverity\\"DeployUnit=22,Node=21,SubNode=0\\\";\"}],\"eventSourceType\":\"CRITICALPgwFunction\",\"alarmCondition\":\"The slave MPU board is offline or abnormal\",\"faultFieldsVersion\":2,\"eventCategory\":\"equipmentAlarm\",\"specificProblem\":\"The slave MPU board is offline or abnormal\",\"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\\\";\"}],\"eventSourceType\":\"PgwFunction\",\"vfStatus\":\"Active\"}}}"] |
Above is the literals returned by DMaaP. Hence some symbols are escaped. If you want to push the data onto DMaaP, please use the data contained in VES.
DMaaP Message for Control Loop Events from Holmes
vfStatus\":\"Active\"}}}"] |
Above is the literals returned by DMaaP. Hence some symbols are escaped. If you want to push the data onto DMaaP, please use the data contained in VES Component.
DMaaP Message for Control Loop Events from Holmes
Code Block | ||||
---|---|---|---|---|
| ||||
{
"target": "vserver.vserver-id",
"target_type": "VM",
"AAI": {
"vserver.in-maint": true,
"vserver.is-closed-loop-disabled": true,
"vserver.prov-status": "example-prov-status-val-2",
"vserver.resource-version": "1504912891060",
"vserver.vserver-id": "example-vserver-id-val-2",
"vserver.vserver-name": "example-vserver-name-val-2",
"vserver.vserver-name2": "example-vserver-name2-val-2",
"vserver.vserver-selflink": "example-vserver-selflink-val-2",
"generic-vnf.vnf-id": "5e49ca06-2972-4532-9ed4-6d071588d792",
"service-instance.service-instance-id": "USUCP0PCOIL0110UJZZ01"
} | ||||
Code Block | ||||
| ||||
{ "target": "vserver.vserver-id", "target_typeclosedLoopAlarmStart": "VM"1484855291527925, "AAIclosedLoopEventStatus": { "ONSET", "vserver.in-maintclosedLoopControlName": true"VoLTE", "version": "vserver.is-closed-loop-disabled": true, 1.0.2", "vserver.prov-statusrequestID": "example8c1b8bd8-prov06f7-status493f-val8ed7-2daaa4cc481bc", "from": "DCAE" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "vserver.resource-versiontarget": "1504912891060vserver.vserver-id", "vserver.vserver-id"target_type": "example-vserver-id-val-2VM", "vserver.vserver-nameAAI": "example-vserver-name-val-2",{ "vserver.vserver-name2id": "example-vserver-name2id-val-2", "vserver.vserver-selflinkname": "example-vserver-selflinkname-val-2", "generic-vnfvserver.vnfvserver-idname2": "5e49ca06example-2972vserver-4532name2-9ed4val-6d071588d7922", "service-instancevserver.servicevserver-instance-idselflink": "USUCP0PCOIL0110UJZZ01example-vserver-selflink-val-2" }, "closedLoopAlarmStart": 1484855291527925, "closedLoopAlarmEnd": 1484855278392541, "closedLoopEventStatus": "ONSETABATED", "closedLoopControlName": "VoLTE", "version": "1.0.2", "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc", "from": "DCAE" } |
A&AI Info That Needs to Be Registered to MSB
Code Block | |||||
---|---|---|---|---|---|
| |||||
# Please replace $AAI_IP, $AAI_PORT and $MSB_IP with the real ones. #aai-cloudInfrastructure curl -X POST \ -H "Content-Type: application/json" \ -d '{"serviceName": "aai-cloudInfrastructure", "version": "v11", "url": "/aai/v11/cloud-infrastructure", "protocol": "REST", "enable_ssl":"true", "visualRange":"0|1", "nodes": [ {"ip": "$AAI_IP","port": "$AAI_PORT"}]}' \ http://$MSB_IP/api/microservices/v1/services #aai-search curl -X POST \ -H "Content-Type: application/json" \ -d '{"serviceName": "aai-search", "version": "v11", "url": "/aai/v11/search", "protocol": "REST", "enable_ssl":"true", "visualRange":"0|1", "nodes": [ {"ip": "$AAI_IP","port": "$AAI_PORT"}]}' \ http://$MSB_IP/api/microservices/v1/services #aai-network curl -X POST \ -H "Content-Type: application/json" \ -d '{"serviceName": "aai-network", "version": "v11", "url": "/aai/v11/network", "protocol": "REST", "enable_ssl":"true", "visualRange":"0|1", "nodes": [ {"ip": "$AAI_IP","port": "$AAI_PORT"}]}' \ http://$MSB_IP/api/microservices/v1/services{ "target": "vserver.vserver-id", "target_type": "VM", "AAI": { "vserver.in-maint": true, "vserver.is-closed-loop-disabled": true, "vserver.prov-status": "example-prov-status-val-2", "vserver.resource-version": "1504912891060" "vserver.vserver-id": "example-vserver-id-val-2", "vserver.vserver-name": "example-vserver-name-val-2", "vserver.vserver-name2": "example-vserver-name2-val-2", "vserver.vserver-selflink": "example-vserver-selflink-val-2", "generic-vnf.vnf-id": "5e49ca06-2972-4532-9ed4-6d071588d792", "service-instance.service-instance-id": "USUCP0PCOIL0110UJZZ01" }, "closedLoopAlarmStart": 1484855291527925, "closedLoopAlarmEnd": 1484855278392541, "closedLoopEventStatus": "ABATED", "closedLoopControlName": "VoLTE", "version": "1.0.2", "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc", "from": "DCAE" } |