Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Task 8: Setup smart alerts to notify disruptions in cloud services using Contrail

 

Goal

You have seen how to create virtual networks and instances using Contrail and OpenStack in the previous tasks. In this task, you will see how Contrail can monitor and alert you with any critical issues or failures for these instances.

Disclaimer: The steps in this task are only applicable to Juniper’s Cloud Software Trial tool.

Some values and/or information may vary for users executing this task using a non-Juniper trial tool.

 

Step-by-Step Procedure

  1. Open the Contrail web interface in the browser by navigating to https://192.168.250.1:8143.

    Then, login to the Contrail dashboard using the below credentials.

    Username: admin

    Password: contrail123

    Domain: (leave blank)

  2. Create a virtual network called “red-network” (see task 1 for creating the networks). Expand the Subnets tab, and enter a subnet of 1.1.1.0/24. Leave all the other values at default and click on Save to complete the creation of virtual network.

  3. Log in to the OpenStack Dashboard. Open a new tab and go to https://192.168.250.1/horizon.

    Use the credentials below.

    Username: admin

    Password: contrail123

    After you login, select the project as “demo” using the drop down at the top of the page.

    Navigate under Project > Instances and click on the “Launch instance” button on the top right corner to start the creation of a VM.

    Enter the parameter values as below.

    • For “Instance name”, enter “Red-Instance”

    • For “Image Name”, enter “Cirros”

    • For “Flavor”, enter m.1.small

    • Click “Next” at the bottom of the “Launch instance” window until you arrive at the “Networks” tab

    • For “Networks”, select “red-network” which was created from previous step

    • Click “Launch Instance” to launch the red-instance

    Verify that the VM is in the running state. (Under Power State, the status should indicate it is Running.)

  4. Return to the Contrail web interface and navigate to the Monitor tab. Click on the Analytics Nodes in the left dropdown panel. Click on the Analytics Node, Host Name (nugget-cfg) which should take you to the Analytics Node’s dashboard.

  5. Click on the OpServer URL at the bottom of the page. Clicking this will take you to the Analytics OpServer REST API server.

    In the op-server page, click on the URL for analytics (ends with :8081/analytics), then click on the “uves”. In the following page, click on the UVE for virtual-machine interface; and finally, on the specific virtual-machine-interface UVE that corresponds to the red-instance we created in the previous step.

  6. The virtual machine interface UVE page is a JSON view of all the objects related to virtual machine interface and ordered in a hierarchical way. The open bracket, “ { “(pointed out in the screenshot below) can be used to expand or collapse different levels of hierarchy. Each level in the hierarchy is represented by an opening bracket. We will create an alarm for dropped packets by the vRouter using the UVE key hierarchy: UveVMInterfaceAgent.drop_stats.ds_drop_pkts. The next step is to create an alarm for this key (counter).

  7. On the Contrail web interface under the Configure tab, navigate to Configure > Alarms > Projects > default-domain > demo and click on the (+) sign in the top right corner to start the creation of an alarm.

    • For “Name”, Enter name “virtual_machine_dropped_packet_count”

    • Configure “Severity as “Major”

    • Under UVE Keys, add “virtual-machine-interface”

    • Under rule, for Operand1 enter “UveVMInterfaceAgent.drop_stats.ds_drop_pkt”

    • Under “UVE Key add “>=” and for Operand2, enter a value of 100.

    • Click Save to create the alarm

  8. Return to the OpenStack console and log in to VM1 using username/password: contrail/contrail123. Activate root user using command: sudo -i with root password: contrail123.

    • Configure IP address of 1.1.1.250 on the l/O interface and ping the vRouter gateway 1.1.1.1 with source as 1.1.1.250 (-I option) as well as count of 200 packets (-c option) and –f option to send the packets in a burst.

    vRrouter will drop the ping packets since it is coming from an unknown source of 1.1.1.250, and an alarm will be raised since the dropped packets cross the configured threshold of 100. The alarm can be viewed by clicking on the bell icon on the top right hand corner of Contrail web interface.

  9. Click on the acknowledge alarm symbol to acknowledge and clear the alarm.