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

    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.

Installation Steps

As a DCAE Analytics Application

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.

Before we start, please make sure that DCAE is deployed correctly and Holmes has been started.

  1. Check whether the containers of Holmes are running. 

    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.

  2. Check whether the rule of Holmes has been deployed. 

    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.

  3. Mock some data into A&AI to support alarm correlation analysis.
    1. 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

      A&AI Model Info for Testing
      {
      	"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"
      				}]
      			}
      		}]
      	}
      }
    2. 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 

      A&AI VNF Info for Testing
      {
      	"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"
      		}]
      	}
      }
    3. 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 

      A&AI VM Info for Testing
      {
      	"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"
      		}]
      	}
      }
    4. 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 

      A&AI Link Info for Testing
      {
      	"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"
      	}]
      }
    After all above is done, check whether the relationship between the mocked VNF and VM has been set up successfully.
  4. Send alarms to the unauthenticated.SEC_FAULT_OUTPUT topic of DMaaP. 

    Parent Alarm/Root Cause
    {
    	"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"
    		}
    	}
    }
    Child Alarm
    {
    	"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"
    		}
    	}
    }

    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

  1. Log in to the ONAP docker repo: 

    sudo docker login -u docker -p docker nexus3.onap.org:10001
  2. Start Holmes using the commands below: 

    # 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
  3. Call the health check API to check whether Holmes has been started up successfully. 

    # 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. 

  1. Subscribing 

    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\"}" \
    http://$MSB_IP/api/holmes-engine-mgmt/v1/dmaap/sub

    After setting the subscribing url, a timer task will be started using the default query interval (15s).

  2. Publishing 

    curl -X PUT -H 'Content-Type: application/json' \
    -d "{\"name\":\"unauthenticated.DCAE_CL_OUTPUT\", \"url\":\"http://$DMAAP_IP:$DMAAP_PORT/events/unauthenticated.DCAE_CL_OUTPUT\"}" \
    http://$MSB_IP/api/holmes-engine-mgmt/v1/dmaap/pub

Then you have to deploy the rule into Holmes by calling:

curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://$MSB_IP/api/holmes-rule-mgmt/v1/rule

The rule is saved into a file named "holmesrule" and it is attached here.

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: 

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

["{\"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\":\"VNF_194.15.13.138\",\"nfNamingCode\":\"\"},\"faultFields\":{\"eventSeverity\":\"CRITICAL\",\"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 Component.

DMaaP Message for Control Loop Events from Holmes

ONSET
{
	   "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,
       "closedLoopEventStatus": "ONSET",
       "closedLoopControlName": "VoLTE",
       "version": "1.0.2",       
       "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc",
       "from": "DCAE"
}
ABATED
{
	   "target": "vserver.vserver-id",
       "target_type": "VM",
       "AAI": {
           "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"
       },
       "closedLoopAlarmStart": 1484855291527925,
       "closedLoopAlarmEnd": 1484855278392541,
       "closedLoopEventStatus": "ABATED",
       "closedLoopControlName": "VoLTE",
       "version": "1.0.2",       
       "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc",
       "from": "DCAE"
}

A&AI Info That Needs to Be Registered to MSB

# 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






  • No labels

30 Comments

  1. Hi,

    Has anyone tried the below curl command?

    curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://$MSB_IP/api/holmes-rule-mgmt/v1/rule

    I keep getting the below error " unable to process JSON". I made sure the json is a valid json.

    "code": 400,
    "message": "Unable to process JSON"

    -Chaitanya

    1. Greetings Chaitanya,

      Which version of Holmes did you deploy? The sample I attached here is only applicable for v1.0.0.

      If you want to try the latest version (tagged "latest"), you have to change the name of the fields into the camel-case style, which means that you have to change "rulename" into "ruleName" and "loopcontrolname" into "loopControlName".

      Feel free to reach out if you have further questions.

      Guangrong

  2. Hi,

    Is there a way to access holmes GUI for the standalone holmes setup ?

    -Sangeeth G

    1. The GUI of Holmes is temparorily unvailable at the moment. We are still working on that and for now, it's sort of deferred by other high priority issues.

      1. Is the Holmes GUI still unavailable? If not, how I can get into it in Casablanca with Kubernetes. What is its node port? 

  3. Hi Guangrong, 

    Thanks for your response on my previous query. I am able to post the correlation rule to Holmes now.

    However i am not able to see any CL out put event on DCAE_CL_OUTPUT queue after posting the parent and child alarms to the SEC_FAULT_OUTPUT queue. i can see in engine-d-debug.log that the posted alarms have reached the holmes engine but no corresponding correlation happening. 

    I also see the below error in the log file :


    2018-05-03 09:16:19 848 ERROR [org.onap.holmes.engine.dcae.DcaeConfigurationPolling][pool-5-thread-1] invocationID:{InvocationID} - Failed to poll the DCAE configurations. Can not resolve configurations from DCAE. The configuration string is empty.
    org.onap.holmes.common.exception.CorrelationException: Can not resolve configurations from DCAE. The configuration string is empty.
    at org.onap.holmes.common.dcae.utils.DcaeConfigurationParser.parse(DcaeConfigurationParser.java:40)
    at org.onap.holmes.common.dcae.DcaeConfigurationQuery.getDcaeConfigurations(DcaeConfigurationQuery.java:28)


    2018-05-03 09:16:11 221 ERROR [org.onap.holmes.engine.dmaap.DMaaPAlarmPolling][Thread-32] invocationID:{InvocationID} - Failed to process alarms. Sleep for 60 seconds to restart.
    org.onap.holmes.common.exception.CorrelationException: Failed to convert the response data to VES alarms.
    at org.onap.holmes.dsa.dmaappolling.Subscriber.subscribe(Subscriber.java:81)
    at org.onap.holmes.engine.dmaap.DMaaPAlarmPolling.run(DMaaPAlarmPolling.java:49)

    I also dont see any data in the connected Postgres DB as well. i only see the empty tables alarm_info and aplus_rule.

    Can you please help? I am running HOLMES as an independent application.


    -Chaitanya 

  4. Hi Guangrong, 

    i am able to see the alarm info and the rue in the postgre db now. but again no correlation response, i see the below errors? any idea how to resolve these?

    I am also seeing the below errors in the engine mgmt debug log.

    2018-05-07 09:23:19 865 ERROR [org.onap.holmes.engine.dcae.DcaeConfigurationPolling][pool-5-thread-1] invocationID:{InvocationID} - Failed to poll the DCAE configurations. Can not resolve configurations from DCAE. The configuration string is empty.

    org.onap.holmes.common.exception.CorrelationException: Can not resolve configurations from DCAE. The configuration string is empty.


    2018-05-07 09:23:28 756 ERROR [org.onap.holmes.engine.dmaap.DMaaPAlarmPolling][Thread-32] invocationID:{InvocationID} - Failed to process alarms. Sleep for 60 seconds to restart.
    org.onap.holmes.common.exception.CorrelationException: Failed to convert the response data to VES alarms.
    at org.onap.holmes.dsa.dmaappolling.Subscriber.subscribe(Subscriber.java:81)
    at org.onap.holmes.engine.dmaap.DMaaPAlarmPolling.run(DMaaPAlarmPolling.java:49)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException: null


    -Chaitanya

  5. Hi Guangrong,

    After following all the steps for running Holmes as an independent application I have very similar problem like P Chaitanya Reddy. I can see alert info in database but no any data under "unauthenticated.DCAE_CL_OUTPUT" topic in DmaaP.

    My debug logs from engine-management:

     2018-06-20 10:44:57 567 ERROR [org.onap.holmes.engine.dcae.DcaeConfigurationPolling][pool-5-thread-1] invocationID:{InvocationID} - Failed to poll the DCAE configurations. Can not resolve configurations from DCAE. The configuration string is empty. org.onap.holmes.common.exception.CorrelationException: Can not resolve configurations from DCAE. The configuration string is empty. at org.onap.holmes.common.dcae.utils.DcaeConfigurationParser.parse(DcaeConfigurationParser.java:40) at org.onap.holmes.common.dcae.DcaeConfigurationQuery.getDcaeConfigurations(DcaeConfigurationQuery.java:28) at org.onap.holmes.engine.dcae.DcaeConfigurationPolling.run(DcaeConfigurationPolling.java:45) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)


    Any advise or guidance would be greatly appreciated.


    -Robert B


  6. Hi Guangrong,

    I am trying to run HOLMES In stand alone mode following the steps detailed in the above page. I ran this with Beijing release of HOLMES in the hope that it would have fixed the issue i was facing earlier. But unfortunately i still face the same issue as before. Below is the error i get. 

    With Beijing release i am also facing the issue of posting the rule to rule-engine. Some times it throws "Failed to call the rule verification RESTful API" error. If i rebuild the dockers then it will work again. 

    Also, the rules and alarms seem to disappear from the Postgres DB after a while. I am not sure if this is designed this way or if its an error. 


    Are the rules supposed to be posted to engine-mgmt docker as well? I dont see any thing happenning once the alarms are posted to DMaaP. i could see the alarms reaching the engine-mgmt and getting saved to DB from the debug log. But no correlation happening after that. 


    Can you please provide any help? 


    2018-07-02 08:05:01 179 INFO [org.glassfish.jersey.process.internal.ExecutorProviders][pool-3-thread-1] invocationID:{InvocationID} - Selected ExecutorServiceProvider implementation [org.glassfish.jersey.client.DefaultClientAsyncExecutorProvider] to be used for injection of executor qualified by [org.glassfish.jersey.client.ClientAsyncExecutor] annotation.
    2018-07-02 08:05:01 180 INFO [org.glassfish.jersey.client.internal.HttpUrlConnector][pool-3-thread-1] invocationID:{InvocationID} - Restricted headers are not enabled using [sun.net.http.allowRestrictedHeaders] system property (setting only takes effect on connections created after the property has been set/changed).
    2018-07-02 08:05:01 181 DEBUG [org.jvnet.hk2.logger][Finalizer] invocationID:{InvocationID} - Shutdown ServiceLocator ServiceLocatorImpl(__HK2_Generated_130,132,1165322451)
    2018-07-02 08:05:01 181 DEBUG [org.jvnet.hk2.logger][Finalizer] invocationID:{InvocationID} - ServiceLocator ServiceLocatorImpl(__HK2_Generated_130,132,1165322451) has been shutdown
    2018-07-02 08:05:01 182 DEBUG [org.jvnet.hk2.logger][Finalizer] invocationID:{InvocationID} - Shutdown ServiceLocator ServiceLocatorImpl(__HK2_Generated_126,128,446674383)
    2018-07-02 08:05:01 183 DEBUG [org.jvnet.hk2.logger][Finalizer] invocationID:{InvocationID} - ServiceLocator ServiceLocatorImpl(__HK2_Generated_126,128,446674383) has been shutdown
    2018-07-02 08:05:01 190 DEBUG [org.jvnet.hk2.logger][Finalizer] invocationID:{InvocationID} - Shutdown ServiceLocator ServiceLocatorImpl(__HK2_Generated_127,129,1897294039)
    2018-07-02 08:05:01 190 DEBUG [org.jvnet.hk2.logger][Finalizer] invocationID:{InvocationID} - ServiceLocator ServiceLocatorImpl(__HK2_Generated_127,129,1897294039) has been shutdown
    2018-07-02 08:05:01 189 WARN [org.onap.holmes.common.config.MicroServiceConfig][pool-3-thread-1] invocationID:{InvocationID} - URI is not absolute
    javax.ws.rs.ProcessingException: URI is not absolute
    at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:264)
    at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:684)
    at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:681)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
    at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:681)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.method(Jer



    2018-07-02 07:49:01 195 INFO [org.onap.holmes.common.config.MicroServiceConfig][pool-3-thread-1] invocationID:{InvocationID} - The query url is: null/service_component/10.53.172.137:9101. The corresponding configurations are null
    2018-07-02 07:49:01 195 ERROR [org.onap.holmes.rulemgt.dcae.DcaeConfigurationPolling][pool-3-thread-1] invocationID:{InvocationID} - Failed to fetch DCAE configurations. Can not resolve configurations from DCAE. The configuration string is empty.
    org.onap.holmes.common.exception.CorrelationException: Can not resolve configurations from DCAE. The configuration string is empty.
    at org.onap.holmes.common.dcae.utils.DcaeConfigurationParser.parse(DcaeConfigurationParser.java:40)
    at org.onap.holmes.common.dcae.DcaeConfigurationQuery.getDcaeConfigurations(DcaeConfigurationQuery.java:28)
    at org.onap.holmes.rulemgt.dcae.DcaeConfigurationPolling.run(DcaeConfigurationPolling.java:69)


    -Chaitanya

    Failed to call the rule verification RESTful API.

  7. Hi Guangrong Fu ,

    When I run step 3d of [ Installation Steps ] → [ As a DCAE Analytics Application ] ( Step 3a to 3c had been executed successfully ), error showed up:


    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Fault>
    <requestError>
    <serviceException>
    <messageId>SVC3000</messageId>
    <text>Invalid input performing %1 on %2 (msg=%3) (ec=%4)</text>
    <variables>
    <variable>PUT_EDGE</variable>
    <variable>network/generic-vnfs/generic-vnf/example-vnf-id-val-92494</variable>
    <variable>Invalid input performing %1 on %2:Could not parse relationship-list object: null</variable>
    <variable>ERR.5.2.3000</variable>
    </variables>
    </serviceException>
    </requestError>
    </Fault>


    The logs are:

    2018-09-14T10:16:05.051+0000|2018-09-14T10:16:05.180+0000|5c6e55ae-a239-4692-a758-3200633a05b6||qtp1756819670-80||PUT /aai/v11/network/generic-vnfs/generic-vnf/example-vnf-id-val-92494/relationship-list/relationship|jimmy-postman|DB|process PUT_EDGE|ERROR|400|Invalid input performing %1 on %2:3000:Bad Request:Could not parse relationship-list object: null||INFO||127.0.1.1|129|liuzheng-virtual-machine||org.onap.aai.logging.ErrorLogHelper||||||||co=jimmy-postman:ERR.5.2.3000 root cause=java.lang.NullPointerException ClassName- org.onap.aai.introspection.MoxyStrategy :LineNumber- 298 :MethodName- findKey ClassName- org.onap.aai.introspection.Introspector :LineNumber- 493 :MethodName- getURI ClassName- org.onap.aai.parsers.relationship.RelationshipToURI :LineNumber- 199 :MethodName- processRelationshipData ClassName- org.onap.aai.parsers.relationship.RelationshipToURI :LineNumber- 99 :MethodName- parse ClassName- org.onap.aai.parsers.relationship.RelationshipToURI :LineNumber- 81 :MethodName- <init> ClassName- org.onap.aai.parsers.query.RelationshipQueryParser :LineNumber- 58 :MethodName- <init> ClassName- org.onap.aai.parsers.query.TraversalStrategy :LineNumber- 60 :MethodName- buildRelationshipParser ClassName- org.onap.aai.query.builder.TraversalQuery :LineNumber- 112 :MethodName- createQueryFromRelationship ClassName- org.onap.aai.serialization.db.DBSerializer :LineNumber- 1187 :MethodName- createEdge ClassName- org.onap.aai.rest.db.HttpEntry :LineNumber- 318 :MethodName- process


    I tried to debug, and found cloud-owner is null. So could you please provide some suggestions? Thanks.

    1. Liu,

      For the AAI part, I could provide no more information than what I've written above. I'm not an expert of AAI, so I suggest you forward this question to the AAI team.

      Sorry about that.

      Guangrong


  8. Seems like HOLMES and VES collector are not getting installed in the standard ONAP installation. I am looking for installing these  components and integrating with DCAE. Can somebody help me with the procedure?


    1. Veera,


      As an analytics application of DCAE, Holmes is not part of the OOM deployment. As you said, it's not part of the ONAP installation but a part of the DCAE installation.


      Theoretically, once DCAE has been deployed by OOM, it'll start deploying its own applications, such as Holmes, VES and TCA, etc.


      If you want to know the whole OOM deployment, I suggest you go to the OOM team for help. Since I mainly work with the DCAE team, I'm not familiar with OOM.


      If you want to deploy/re-deploy some of the DCAE components after DCAE has been completely deployed, you could go to Cloudify Blueprint validation under OOM and take a look. For further guidance, I think Vijay Venkatesh Kumar would be happy to help.


      Thanks,

      Guangrong

  9. Hi Guangrong Fu

    I am currently exploring Holmes to check if we can use it for our project. I am able to run Holmes as standalone set of docker images. Is it possible to get some examples of the Holmes work without A&AI or DCAE etc.? I mean I would really appreciate if you could provide some requests that I can send to some Holmes' endpoint and the resulting response. In this way I could understand better how Holmes work.

    Thank you in advance,
    Igor

  10. Hi ,

    I am getting 401 Authorization Required error while doing subscription for the fault topic using below command.


    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\"}" \
    http://$MSB_IP/api/holmes-engine-mgmt/v1/dmaap/sub


    Any help will be appreciated. 

    1. Hi Vishal,

      Which version of ONAP or Holmes have you deployed? Would you please share more details, like logs from Holmes, with me?

      Theoretically, there shouldn't be authorization errors in Holmes because currently there are no such security functionalities intended. But I need more information for troubleshooting.

      BR,

      Guangrong

  11. Thanks Guangrong Fu  for reply.
    We are trying to install standalone holmes (dockerised) with below versions.
    msb-1.3.0,

    consul-1.4.3,

    holmes-12.0.0

  12. Hi Guangrong Fu ,

    we are using Holmes 12.0.0 version images i.e. the latest ONAP release codebase.

    We are getting below 401 error while executing subscription api.

  13. Hi Vishal Varvate and Viresh Navalli ,

    According to what I've known from the mailing list, the problem has been solved. Or, is this another thread?

    BR,

    Guangrong

    1. hi Guangrong Fu 


      yes there is another thread, we are able to subscribe and publish the rule but when we are trying to push the rule it is giving the following error.
      "Failed to verify the rule. The contents of the rule are invalid."

      The file in below curl command referring to older dropwizard code, could you please share correct file 
      curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://$MSB_IP/api/holmes-rule-mgmt/v1/rule

      Thanks in advance.

      please find the logs below.


      text=Error importing : 'org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder'], Message [id=2, kieBase=defaultKieBase, level=ERROR, path=rules/rule.drl, line=45, column=0
         text=Rule Compilation error Only a type can be imported. org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder resolves to a package
      ServiceLocatorHolder cannot be resolved], Message [id=3, kieBase=defaultKieBase, level=ERROR, path=rules/rule.drl, line=73, column=0
         text=Rule Compilation error Only a type can be imported. org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder resolves to a package], Message [id=4, kieBase=defaultKieBase, level=ERROR, path=rules/rule.drl, line=11, column=0
         text=Rule Compilation error Only a type can be imported.

      1. Hi,

        If you're looking for examples of rules, I think those under https://gerrit.onap.org/r/gitweb?p=holmes/rule-management.git;a=tree;f=rules;h=ff908e1f19b7d7e4513984a92b09135fc919ec98;hb=HEAD could be of help.

        Let me know if there's any further problem. (smile)

        1. Thanks Guangrong Fu we can now create a rule with the shared file.

          I have couple of questions on MSB and AAI. Could you please clarify.

          01. Is there any hard dependency of MSB as we can access rule/engine APIs without MSB. (With MSB getting some error)

          02. Also does AAI is mandatory to perform a sample alarm correlation. 

          1. Hi,

            The truth is neither of them is mandatory.

            The reason Holmes depends on MSB is that at the very beginning of ONAP, k8s was not introduced. So we have to use MSB for routing. But as ONAP evolved, MSB is not the only option at the moment. As a matter of fact, MSB is now fading out gradually as Ingress was recommended.

            As for AAI, if your correlation does not depend on any resource/inventory data, you don't even have to install AAI.


            Regards,

            Guangrong 

  14. Hi Guangrong Fu ,

    Now we are able to push the rules using Holmes Rule Management REST API directly but when we use MSB gateway API to push the rule , we are getting above error.


  15. Hi Guangrong Fu 

    Need some info on the sequence field used in alram_info table. We re getting below error after sending  parent alram using the command (curl -i  -X POST -d @parentalarm --header "Content-Type: application/json" http://<<ip>>:<<port>>/eventListener/v5 -k )

    The sequence field seems not getting incremented for each alarm trigger. Is this a SQL sequence or a normal field , we are not seeing any info on this. Have tried by changing  (eventid, sequence, sourcename) values but still getting duplicate key value issue, sequence always remains Zero even the value is changed in the event while triggering parent alarm.

    Could you please assist on this.

    ________________________________________________________________________________________________________________________________________________________________________
    2023-08-08 07:12:46 884 ERROR [org.onap.holmes.engine.dmaap.DMaaPAlarmPolling][Thread-2][][] - Failed to save alarm to database
    org.onap.holmes.common.exception.AlarmInfoException: Can not access the database. Please contact the administrator for help.
            at org.onap.holmes.engine.db.AlarmInfoDaoService.saveAlarm(AlarmInfoDaoService.java:38)
            at org.onap.holmes.engine.dmaap.DMaaPAlarmPolling.lambda$run$0(DMaaPAlarmPolling.java:58)
            at java.base/java.util.ArrayList.forEach(Unknown Source)
            at org.onap.holmes.engine.dmaap.DMaaPAlarmPolling.run(DMaaPAlarmPolling.java:53)
            at java.base/java.lang.Thread.run(Unknown Source)
    Caused by: org.jdbi.v3.core.statement.UnableToExecuteStatementException: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "alarm_info_pkey"
      Detail: Key (eventid, sequence, sourcename)=(ab305d54-85b4-a31b-7db2-fb6b977770, 0, example-vserver-name-val-5474) already exists. [statement:"INSERT INTO ALARM_INFO  (EVENTID,EVENTNAME,STARTEPOCHMICROSEC,SOURCEID,SOURCENAME,SEQUENCE,ALARMISCLEARED,ROOTFLAG,LASTEPOCHMICROSEC) VALUES (:eventId,:eventName,:startEpochMicroSec,:sourceId,:sourceName,:sequence,:alarmIsCleared,:rootFlag,:lastEpochMicroSec)", arguments:{positional:{}, named:{}, finder:[{lazy bean property arguments "org.onap.holmes.common.api.entity.AlarmInfo@355af811"}]}]
    ________________________________________________________________________________________________________________________________________________________________________

    However the events are saved in postgres

    1. Hi Viresh Navalli ,

      Sorry for the confusion we've caused. The sequence field is not a SQL sequence but a normal one (which should be set by the real alarm producer). 

      This a legacy problem. We initially determined to use the three fields you mentioned above as the primary key of an alarm, but in fact, we found that eventid + sourcename was enough to identify it. So the sequence is not actually used (see https://gerrit.onap.org/r/gitweb?p=holmes/engine-management.git;a=blob;f=engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java;h=5e8da833d5969e38bd081d1a3be6277325920bbc;hb=HEAD).

      Implemetation
          private AlarmInfo getAlarmInfo(VesAlarm vesAlarm) {
              AlarmInfo alarmInfo = new AlarmInfo();
              alarmInfo.setAlarmIsCleared(vesAlarm.getAlarmIsCleared());
              alarmInfo.setSourceName(vesAlarm.getSourceName());
              alarmInfo.setSourceId(vesAlarm.getSourceId());
              alarmInfo.setStartEpochMicroSec(vesAlarm.getStartEpochMicrosec());
              alarmInfo.setLastEpochMicroSec(vesAlarm.getLastEpochMicrosec());
              alarmInfo.setEventId(vesAlarm.getEventId());
              alarmInfo.setEventName(vesAlarm.getEventName());
              alarmInfo.setRootFlag(vesAlarm.getRootFlag());
              return alarmInfo;
          }

      So please make sure that you use different combinations of eventid and sourcename to specify different alarms when you're mocking them. 


      BR,

      Guangrong

        1. Good point! You could raise a Jira ticket for tracking, and we'll remove it from the constraint accordingly in the next release. (big grin)