You can create a service group to manage a group of services collectively. You can observe aggregated metrics for the services in the group or consistently enforce policies across the service group.

A service group is a type of resource groups. A service group is a collection of services that share certain characteristics. A service group defines one or more conditions that a service must satisfy to be included in that group. For example, a service group can define a condition for the service name to begin with shopping.

Service groups serve two main purposes:

  • You can create a service group to monitor relevant metrics (such as requests per seconds, latency, and error rate) for the services in the group collectively.

  • You can also define and apply consistent policies to the entire service group.

You can use a sample service group to create a service group in Tanzu Service Mesh. The service group is used to collectively manage all cart services deployed in clusters located in California. The sample service group defines conditions for the service name to begin with cart , for the cluster name to be prod-cluster-ca, and for the services to be in the default or sample namespace in the cluster.

You can access and observe metrics for the services in a service group.



  1. In Tanzu Service Mesh Console, in the navigation panel on the left, click Inventory > Service Groups.

    The Service Groups tab displays a list of existing service groups.

  2. If you want to view information about a service group, perform these steps.
    1. To view the membership conditions defined for a service group, click the arrow to the left of the service group name.
    2. To view details about the service group on the service group details page, click its name on the list.
  3. In the upper-right corner, click New Service Group and provide the required information.



    Group Name

    Enter a descriptive name for the group to help distinguish it from other service groups.


    Optionally, provide a description for the group.

  4. Define conditions for membership in the group.
    1. Under Membership Conditions, click Add Condition and select a service attribute or metric for which you want to define a condition (for example, Service Name or Namespace).
    2. In the new condition row, select an operator (for example, Is Exactly or Starts with) in the second drop-down menu and select or enter a value in the third drop-down menu.
    3. To define additional conditions, repeat steps a–b.

      If you have multiple conditions, by default the conditions are joined with the AND operator. A service is matched if all the conditions are true.

    4. To join the conditions with the OR operator to specify that any of the conditions can be true for a match, click the AND button on the left.

      The label on the button changes to OR to indicate that the conditions are joined with the OR operator.

    5. To combine two or more conditions in a complex condition, point to one of the condition rows that you want to combine and click at the right end of the row and click Add Condition to add another condition to combine.
      For the example, the following conditions for membership are defined in the service group. The conditions include a complex condition for the default and sample-namespace namespaces where the conditions are joined with OR.

      According to these conditions, a service is included in the service group if it meets these requirements:
      • If the name of a service starts with cart.

      • The service is located in the prod-cluster-ca cluster.

      • The service is contained in the default namespace or the sample-namespace namespace.

  5. To view a list of the services that satisfy the membership conditions, click Membership Preview.
  6. Click Save.
  7. View the metrics for the services in a service group.
    1. On the Service Groups tab, click the name of the service group.

      At the top of the service group details page, next to the service group name, a summary of aggregated key metrics, such as requests per second, 99th percentile latency, and percentage of errors, is displayed for the group.

    2. Click the Performance tab.

      The charts on the Performance tab show metrics, such as requests per seconds, 99th percentile latency and error percentage, aggregated for the services in the group.

      The metrics are shown for the time period selected in the Metric Time Range drop-down menu in the upper-right corner.

    3. To specify which metrics to display, click Chart Settings and select the check box next to each metric to display.

      You can select a maximum of four metrics to be displayed.