Holmes User Guide - Casablanca

DRAFT

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.

Standalone Mode

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 

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

  2. Publishing 

Rule Deployment

Using Shell Commands

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

The rule has to be saved into a file named "holmesrule" in advance. Otherwise, you have to type in an extremely long command to deploy your rule.

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: 

Here's an example rule:

Holmes Rule

Using Holmes GUI

To make things easier, from Casablanca on, Holmes provides its own GUI for rule management. Users could perform CRUD operations on all Holmes rules via GUI.

URL: https://${HOLMES_RULE_MANAGEMENT_MODULE_IP}:9104/iui/holmes/default.html

Adding a Rule

Click on the "Add" button, then a rule creation page will be displayed.

Fill in all the required fields (those with a red asterisk mark) and click on "Save".

If you want to verify whether your rule is valid, click "Check" and further information will be shown in a pop-up window.

After rules are created, they'll be listed on the main page of the rule management module.

Users could view the details of a specific rule by clicking on the "Rule Name" column. Also, some operations could be performed on the rules via the buttons provided in the "Operations" column.

DCAE Analytics App

TBD