Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »


See Guangrong's wiki Installation of Holmes (for Testing Purpose)


Test Resource

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

                "faultFields":  {

                        "eventSeverity":"CRITICAL",

                        "alarmCondition":"Guest_Os_Failure",

                        "faultFieldsVersion":2.0,

                        "specificProblem":"Fault_MultiCloud_VMFailure",

                        "alarmInterfaceA":"aaaa",

                        "eventSourceType":"other",

                        "vfStatus":"Active"
                }
        }
}



Before install Holmes dockers, you need to install postgres

Install Postgres
root@vm03-dcae-controller:~# docker login -u docker -p docker nexus3.onap.org:10001
Login Succeeded
root@vm03-dcae-controller:~# docker run --name postgres -p 5432:5432 -e POSTGRES_USER=holmes -e POSTGRES_PASSWORD=holmespwd -d postgres:9.5


Holmes can be deployed as standalone component by using the following steps

Holmes Manual Setup Steps
# Remove the current running instances
docker rm -f holmes-rule-management 
docker rm -f holmes-engine-management 

# Download latest images
docker login -u docker -p docker nexus3.onap.org:10001
docker pull nexus3.onap.org:10001/onap/holmes/rule-management
docker pull nexus3.onap.org:10001/onap/holmes/engine-management

# Start two Holmes docker containers
sudo docker run --name holmes-rule-management -p 9101:9101 -d -e URL_JDBC=10.0.4.1 -e MSB_ADDR=10.0.14.1 -e TESTING=1 -e HOST_IP=10.0.4.1 nexus3.onap.org:10001/onap/holmes/rule-management
sudo docker run --name holmes-engine-management -p 9102:9102 -d -e URL_JDBC=10.0.4.1 -e MSB_ADDR=10.0.14.1 -e TESTING=1 -e HOST_IP=10.0.4.1 nexus3.onap.org:10001/onap/holmes/engine-management

# Check health
curl http://10.0.14.1/api/holmes-rule-mgmt/v1/healthcheck
curl http://10.0.14.1/api/holmes-engine-mgmt/v1/healthcheck

# Start with an old image
#sudo docker run --name holmes-engine-management -p 9102:9102 -d -e URL_JDBC=10.0.4.1 -e MSB_ADDR=10.0.14.1 -e TESTING=1 -e HOST_IP=10.0.4.1 e7d17bb9a869
# Configure sub and pub topics for Holmes by using registered msb url
curl -X PUT -H 'Content-Type: application/json' -d '{"name":"unauthenticated.SEC_FAULT_OUTPUT", "url":"http://10.0.11.1:3904/events/unauthenticated.SEC_FAULT_OUTPUT"}' http://10.0.14.1/api/holmes-engine-mgmt/v1/dmaap/sub 
curl -X PUT -H 'Content-Type: application/json' -d '{"name":"unauthenticated.DCAE_CL_OUTPUT", "url":"http://10.0.11.1:3904/events/unauthenticated.DCAE_CL_OUTPUT"}'  http://10.0.14.1/api/holmes-engine-mgmt/v1/dmaap/pub

# Upload Holmes rules defined in file holmesrule
curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://10.0.14.1/api/holmes-rule-mgmt/v1/rule

# Simulate alarm_on event from MultiVIM to VES
curl -i -X POST -d @alarm_on.json --header "Content-Type: application/json" http://localhost:8080/eventListener/v5 -k


Update Holmes rules by deleting the existing rule with rule_id and upload the new rule

Update Holmes Rules
curl -X GET http://10.0.14.1/api/holmes-rule-mgmt/v1/rule |python -m json.tool
curl -X DELETE http://10.0.14.1/api/holmes-rule-mgmt/v1/rule/rule_1508902811935
curl -X PUT -H 'Content-Type: application/json' -d @holmesrule http://10.0.14.1/api/holmes-rule-mgmt/v1/rule



  • No labels