Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Endpoint Monitoring with Service Groups

 

Service group is a logical collection of URL endpoints that can be monitored as a single entity. This feature performs continuous monitoring of all endpoints, monitors their reachability, and collects corresponding latency metrics. Contrail Insights supports charting of metrics collected for each endpoint.

There are two ways to add Service Groups in Contrail Insights:

  1. Add service groups using the Contrail Insights Dashboard.

  2. Add service groups using Ansible.

Note

Based on your system setup the REST calls being made can take more time. Use appformix_agent_timeout_rest_client in the group_vars/all file to set a timeout value suitable to your system. The default value is two (2) seconds.

Example:

Monitor Service Groups on User-Specified Agents

By default, service groups are monitored from the Contrail Insights Platform nodes. You can monitor service groups on specific Contrail Insights Agent by specifying them in the Ansible inventory.

Example:

In the Ansible inventory directory, edit the inventory/hosts file to add the following:

Now service groups are monitored on the Agents specified below the appformix_service_group_agents tag.

Add Service Groups Using Contrail Insights Dashboard

To add a service group to the Dashboard:

  1. Select Settings in the top right of the Dashboard as shown in Figure 1.
    Figure 1: Settings in Dashboard
    Settings in Dashboard
  2. Select Services Settings.
    Figure 2: Services Settings for Service Groups
    Services Settings for
Service Groups
  3. In the Services Settings panel, select the Service Groups tab and complete the necessary fields.
    Figure 3: Service Groups Tab
    Service Groups Tab
  4. Contrail Insights supports monitoring of OpenStack URLs, regular URLs, and ICMP (Internet Control Message Protocol) URLs.

    To monitor ICMP endpoint URLs:

    1. Click Add Service Group.
      Figure 4: Add Service Group to Monitor ICMP Endpoint URLs
      Add Service Group
to Monitor ICMP Endpoint URLs
    2. Complete the indicated fields, as shown in Figure 5.

      For Protocol, select ICMP Ping from the drop-down list.

      Figure 5: Add Service Group Details for ICMP
      Add Service Group
Details for ICMP
    3. Enter the ICMP endpoint you want to monitor in the URL field and the interval at which it needs to be monitored.
    4. Click Add Endpoint when done configuring the endpoint. Multiple endpoints can be monitored under a single service group.
    5. When done adding endpoints for this specific Service Group, click Setup.

    To monitor OpenStack endpoint URLs:

    1. Click Add Openstack Service Group.
      Figure 6: Add OpenStack Service Group
      Add OpenStack Service Group
    2. From the drop-down list, select the type of OpenStack service endpoint that needs to be monitored. This will autogenerate a service group name, which you can modify, if needed.
      Figure 7: Autogenerated Service Group Name
      Autogenerated Service Group Name
    3. Enter the Username and Password for the Contrail Insights Credentials.
    4. Enter the OpenStack endpoint you want to monitor in the URL field, the interval at which it needs to be monitored, and the type of REST call that needs to be made.
    5. Click Add Endpoint when done configuring the endpoint. Multiple endpoints can be monitored under a single service group.

    To monitor regular endpoint URLs:

    1. Click Add Service Group.

      Figure 8: Add Service Group to Monitor Regular Endpoint URLs
      Add Service
Group to Monitor Regular Endpoint URLs
    2. Complete the indicated fields, as shown in Figure 9. Default Protocol is HTTP/HTTPS.

      Figure 9: Add Service Group Endpoint Details
      Add Service
Group Endpoint Details
    3. To add more endpoints, click Add Endpoint. Following is an example where three endpoints are configured for one service group.

      Figure 10: Add Three Endpoints for One Service Group
      Add Three Endpoints for One Service Group
    4. When done adding endpoints for this specific Service Group, click Setup.

  5. The Service Group will show as successfully added. It can be deleted by clicking the Trash icon.
    Figure 11: Add Service Group Successful
    Add Service Group
Successful

Add Service Groups Using Ansible

Profile Overview

In the directory agent/tools/ansible/profiles/, there are five profiles each pertaining to an OpenStack service. The prefix of each file is the name of the OpenStack service; either cinder, glance, keystone, neutron, or nova. The suffix is *_default_service_profile.json.j2. For example, the profile for the OpenStack service Glance is named glance_default_service_profile.json.j2.

The default layout of the Glance profile is shown in the following example. The other profiles have an identical layout, just with the corresponding OpenStack service listed.

Glance Profile Example:

ICMP Profile Example:

Add an HTTP Profile

Profiles support unauthenticated and authenticated endpoints.

Unauthenticated Endpoint

To add an unauthenticated endpoint:

  1. Add the variable that the Url key is mapped to to your group_vars/all file.
  2. Confirm this variable is mapped to a working endpoint.

    For example: In the group_vars/all, if you are using the Glance profile, add the glance_url variable as shown here:

Authenticated Endpoint

To add an endpoint that needs authentication, a RefreshToken is required. A RefreshToken enables access to endpoints that require authentication, as well as keeps that access by getting a new token when the current one is about to expire.

To obtain a refresh token:

  1. Set the RefreshToken field in the RefreshTokenData dictionary to be True.
  2. Then provide Username, Password, and AuthUrl in the same RefreshTokenData.

GET and POST Examples for Refresh Token

GET Example:

POST Example:

Add a Profile or Multiple Profiles to Ansible

Using Ansible, a profile corresponding to a service group can be added to the Contrail Insights Dashboard during the installation.

To add a profile to the Contrail Insights Dashboard:

  1. Add the variable appformix_service_connectivity_profiles to your group_vars/all file.
  2. Map the variable to a list of dictionaries. Each dictionary in the list should only contain one key and one value.
    • The key should always be connectivity_profiles.

    • The value should be the path of the profile you want added to the Contrail Insights Dashboard during installation. An example follows:

    To add multiple profiles, repeat these steps for as many profiles as needed.

View Service Groups

Successfully added service groups are viewable from the Dashboard.

To view service groups from the Dashboard:

  1. Select Infrastructure > Service Groups.
  2. Select the Service Group you want to view.
  3. Click Charts to view data being collected for this Service Group's endpoints.

    Select Charts to view the Charts display and endpoint details.

Create Alarms for Service Groups

To create alarms for service groups:

  1. After a service group is created, navigate to the Alarms page and click Add Rule.
    Figure 12: Creating an Alarm for Service Group
    Creating an Alarm for Service Group
  2. For Scope, select Service Group and for Metric, select service_group.heartbeat (default). For Alarm Rule Type, both static and dynamic alarms are supported for service groups.
    Figure 13: Adding Alarm Rules for Service Group
    Adding Alarm Rules for Service Group
  3. Complete any further details and click Save to confirm.
    Figure 14: Saving Alarm Rules for Service Group
    Saving Alarm Rules for Service Group
  4. After the alarms are triggered, they are visible on the Dashboard as active or inactive based on the rules set.
    Figure 15: Service Group Triggered Alarm Visible on Dashboard
    Service Group Triggered Alarm Visible on Dashboard

Health and Risk SLA for Service Groups

To create health and risk service-level agreements (SLAs) for service groups:

  1. Select Settings in the top right of the Dashboard.
  2. In Settings, select SLA Settings.
  3. In Health Profile, click the Service Group tab.
    Figure 16: Health Profile Service Group Tab
    Health Profile Service Group Tab
  4. By default, Contrail Insights has a Health/Risk profile created for all the service groups. Click Delete Profile to add new profiles and set up a new SLA.
    Figure 17: Delete Profile in Service Groups to Add New Profile or New SLA
    Delete Profile in Service Groups to Add New Profile
or New SLA

    When a service group is in bad health, it is reflected on the service groups Dashboard view based on the profile.

    Figure 18: Example Service Group Alert for Missed Heartbeat on Dashboard
    Example Service Group Alert for Missed Heartbeat on
Dashboard

Service Group Configuration Examples

Following are service group configuration examples.

OpenStack Service Group configuration example:

ICMP Service Group configuration example:

Regular Service Group configuration example:

Service Group Alarm configuration example:

Service Group alarms have their own scope service_group.