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 13 Next »


Reference

Wiki page DCAE mS Deployment (Standalone instantiation)

Sending Alarm Event to VES

Example of alarm event sent from VFC EMS driver:  sampleems

Curl command to send REST request to VES

ubuntu@vm03-dcae-controller:~$ curl -i  -X POST -d @sampleems --header "Content-Type: application/json" http://localhost:8080/eventListener/v5 -k


Receiving Event Sent by VES

Use browser to listen to DMAAP event topic, you may need to send REST request twice (the first one is register user)

http://{dmaap_ip}:3904/events/unauthenticated.SEC_FAULT_OUTPUT/xuyang11/1?timeout=120

or >curl http://{dmaap_ip}:3904/events/unauthenticated.SEC_FAULT_OUTPUT/xuyang11/1?timeout=120

Result shown on browser:
["{\"VESversion\":\"v5\",\"event\":{\"commonEventHeader\":{\"sourceId\":\"VNF_194.15.13.138\",\"startEpochMicrosec\":1501518702,\"eventId\":\"1501489595451\",\"nfcNamingCode\":\"\",\"reportingEntityId\":\"0000ZTHX1\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Thu, 10 19 2017 01:02:04 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\"}}}"]


VES Guidelines for VNF Vendors and Developers

Following are the Guidelines for VNF Vendors and Developers

How do you install the VES agent?

  Sample C VES Agents are provided in VES reporting virtual FireWall and VES reporting virtual Load Balancer

   VES Library and the sample agents are at

      https://gerrit.onap.org/r/gitweb?p=demo.git;a=tree;f=vnfs;hb=1f53eac7594b43be307224098432694d35503ae5

 

   The VES/bldjobs/Makefile shows how the library code is packaged transferred

   to VNF Target platform and VES Library is compiled.

   The C VES Library is typically installed into /opt/VES/libs/x86_64/

   The vFW Makefile shows how agent is compiled from the Library  https://gerrit.onap.org/r/gitweb?p=demo.git;a=blob;f=vnfs/VESreporting_vFW/Makefile;h=77ca5742e50d4b983736a79bbcac196a72e01667;hb=1f53eac7594b43be307224098432694d35503ae5

 

     Go-client.sh script shows how it is invoked at runtime with DCAE IP Address and Port number passed from HEAT template into /opt/config

    https://gerrit.onap.org/r/gitweb?p=demo.git;a=blob;f=vnfs/VESreporting_vFW/go-client.sh;h=3d1b159a59ba3e63792c0e4f6bd1aef87125bd02;hb=1f53eac7594b43be307224098432694d35503ae5

 

[demo.git] / vnfs / VESreporting_vLB / go-client.sh

   1 #!/bin/bash

   2

   3 export LD_LIBRARY_PATH="/opt/VES/libs/x86_64/"

   4 DCAE_COLLECTOR_IP=$(cat /opt/config/dcae_collector_ip.txt)

   5 DCAE_COLLECTOR_PORT=$(cat /opt/config/dcae_collector_port.txt)

   6 ./vpp_measurement_reporter $DCAE_COLLECTOR_IP $DCAE_COLLECTOR_PORT eth1

 

 

Do you confirm that no VES agent is automatically onboarded on VNF creation..not needed to get a valid heat template?

If it not in the heat used for the deployment of the VNF, we must deploy the agent manually?

 

While the VES code provides guidelines about installation and deployment of VES agent: options are with VNF Vendor.

There could be variety of deployments with different Linux flavors.

 

  Automated installation could pull VES Library from Repository(Nexus) and install into /usr/lib

  Install agent in Vendor code and invoke agent start in /etc/rc scripts. All this at VNF creation time.

 

  Or VES Library and Agent could be built into VNF OS QCOW2 or other Images.

 

 

What is the procedure?

I got the yaml description of the event for ONAP, I need to declare it only on the agent side.

The procedure is to download VES C or Java Library code and compile them for your VNF platform.

The Library .so or .jar needs to be linked with your Agent or VNF Application code.

 

Latest C Library

https://gerrit.onap.org/r/gitweb?p=demo.git;a=tree;f=vnfs/VES5.0;h=a7036a83d8878f2117569efc43b51373ed66f946;hb=5b35c140c63bb737f65077f96b5c3253c74643ea

 

Latest Java Library

https://gerrit.onap.org/r/gitweb?p=vnfsdk/compliance.git;a=tree;f=veslibrary/ves_javalibrary/evel_javalib2;h=cd8040c8cdb18dbcc8a1676b0096ba6de6a81e35;hb=671a6705ea59791ef96568fb48bd1ab0efbc30e9

 

Then lookup sample agent code in C or Java. Sample Makefile framework for C and Maven framework for Java is provided.

Sample C Agent:

https://gerrit.onap.org/r/gitweb?p=demo.git;a=tree;f=vnfs/VESreporting_vFW5.0;h=df59cbf346c50096a37125e847366d590b2d85e6;hb=5b35c140c63bb737f65077f96b5c3253c74643ea

Sample Java Agent:

https://gerrit.onap.org/r/gitweb?p=vnfsdk/compliance.git;a=blob;f=veslibrary/ves_javalibrary/evel_javalib2/src_test/maindir/Main.java;h=d3580e84e27ff536e2335337c33f2f76ff0d18e2;hb=671a6705ea59791ef96568fb48bd1ab0efbc30e9

 

Lookup the Yaml event in the VES Library API functions in evel.h or Java classes

 

1. Create your Event from the sample code provided.  

C:

       vpp_m = evel_new_measurement(READ_INTERVAL);

Java:

       EvelScalingMeasurement sm  = new EvelScalingMeasurement(10.0,"Measurements_vVNF", "vmname_ip");

 

2. Populate the mandatory and optional fields for the Event in Library API with your reporting data

 

C:

132       evel_measurement_vnic_use_add(vpp_m,              /* Pointer to the measurement      */

 133                                      vnic,              /* ASCII string with the vNIC's ID */

134                     packets_in_this_round,              /* Packets received                */

135                    packets_out_this_round,              /* Packets transmitted             */

136                                         0,              /* Broadcast packets received      */

137                                         0,              /* Broadcast packets transmitted   */

138                       bytes_in_this_round,              /* Total bytes received            */

139                      bytes_out_this_round,              /* Total bytes transmitted         */

140                                         0,              /* Multicast packets received      */

141                                         0,              /* Multicast packets transmitted   */

142                                         0,              /* Unicast packets received        */

143                                         0);             /* Unicast packets transmitted     */

Java:

115               MEASUREMENT_VNIC_PERFORMANCE vnic_p = sm.evel_measurement_new_vnic_performance("vnic1","true");\r

116               vnic_p.recvd_bcast_packets_acc.SetValue(2400000.0);\r

117               vnic_p.recvd_mcast_packets_delta.SetValue(5677888.0);\r

118               vnic_p.recvd_mcast_packets_acc.SetValue(5677888.0);\r

119               vnic_p.tx_ucast_packets_acc.SetValue(547856576.0);\r

120               vnic_p.tx_ucast_packets_delta.SetValue(540000.0);\r

121               sm.evel_meas_vnic_performance_add(vnic_p);\r


3. Post the Events with periodicity required. Some events like Faults may be one time posting under specific conditions

C:

evel_rc = evel_post_event(vpp_m_header);

Java:

AgentMain.evel_post_event(sm);

 






  • No labels