Multi-account full-stack observability dashboard solution

Updated at:
Copy as MD

Overview

Observability is the ability to measure a system's internal state by examining its external outputs. An observability platform collects comprehensive system status data. It then displays metrics from various dimensions in a unified view. This helps you quickly identify potential risks in your system.

This solution shows how to build a unified, full-stack observability dashboard using Prometheus, Grafana, Application Real-Time Monitoring Service (ARMS), and Simple Log Service (SLS). It helps you configure a multi-account, full-stack observability dashboard with Grafana.

Solution advantages

Use Alibaba Cloud's rich, out-of-the-box product features

Compared to building a monitoring system with open source components, this solution uses mature Alibaba Cloud products. These products provide features such as default dashboards and data collection. This enables you to quickly build a mature production environment.

Support data aggregation and observability across accounts

For enterprise customers who use multiple accounts, it is critical to integrate data from all accounts for unified aggregation and display. This solution enables you to connect data sources from multiple accounts to achieve comprehensive observability.

Support permission scoping by department or team

The Grafana service offers three permission management methods to meet the needs of large enterprises.

Customer scenarios

Unified observability for multi-account metrics

Scenario description

To understand the overall state of a system, you must collect metrics from each component. You also need to know the historical state and how the state changes over a period of time. To do this, you must continuously collect status data from the components. After you obtain this metric data, you can build rich dashboard views, such as a Grafana dashboard.

Common metrics include those for Alibaba Cloud services, Platform as a Service (PaaS) components, application performance, containers, and business operations.

Applicable customers

  • Customers who use metrics for observability.

  • Enterprise customers who use multiple Alibaba Cloud accounts.

Unified observability for multi-account logs

Scenario description

Alibaba Cloud's Simple Log Service can collect system logs (such as hardware and operating system logs), business logs (such as page views and unique visitors), cloud network traffic logs (VPC Flow Logs), and cloud product logs (such as Web Application Firewall (WAF) logs and database logs) from each account. SLS also provides log storage, processing, retrieval, and complex analysis capabilities. You can derive different business metrics from the logs based on your needs.

Applicable customers

  • Enterprise customers who perform log-based analysis.

  • Enterprise customers who use multiple Alibaba Cloud accounts.

Display results of multi-account resource inspections

Scenario description

Alibaba Cloud's Cloud Config product supports resource inspections across multiple accounts to identify risks. Some enterprises want to consolidate the results of these risk inspections into a unified Grafana dashboard.

Applicable customers

  • Customers who use Cloud Config and want to display inspection results on a Grafana dashboard.

  • Enterprise customers who use multiple Alibaba Cloud accounts.

Solution architecture

Unified observability dashboard solution

Observability architecture layers

From an observability perspective, the system architecture can be divided into four layers. From bottom to top, they are the system layer, middleware layer, application layer, and user business layer. Each layer can be monitored using observability methods such as metrics, traces, and logs. You can also aggregate the observable data from each layer into a single Grafana dashboard for display.

  • System layer observability: This layer mainly relies on CloudMonitor. It includes key Alibaba Cloud services such as Elastic Compute Service (ECS), ApsaraDB RDS (RDS), and Server Load Balancer (SLB). CloudMonitor provides key availability and performance metrics for each service.

  • Container performance layer observability: This refers to observability for the container abstraction layer of a system built on Container Service for Kubernetes (ACK). It includes monitoring cluster performance, events, container performance, and container components.

  • Application performance layer observability: This refers to specific application scenarios in a system built on ACK. It includes application performance metrics, system call tracing, and log monitoring. For example, for a Java application built on Container Service, this would include metrics such as the number of Java application threads.

  • User business layer observability: This refers to specific business scenarios for a business system built on ACK. Examples include building a high-availability, scalable website on Container Service and monitoring business operations data such as page views (PV) and unique visitors (UV). Another example is application cost auditing.

Multi-account unified observability architecture

You can use the GlobalView feature of Prometheus and Grafana to unify and visualize observable data from all accounts.

The solution includes three accounts:

  • Business Account A: An account owned by Business A. It runs the cloud resources required for Business A, such as ECS, SLB, ACK, and RDS. This account is responsible for the observability costs of Business A.

  • Business Account B: An account owned by Business B.

  • Operations Account C: An account owned by the Cloud Admin department. It is responsible for unified monitoring, operations and maintenance (O&M), and application CI/CD.

Product Pricing and Terms

Product costs

Product Name

Product Description

Product Cost

ARMS

ARMS Prometheus Monitoring fully integrates with the open source Prometheus ecosystem. It supports monitoring for a wide range of components, provides various out-of-the-box monitoring dashboards, and offers a fully managed Prometheus service. With ARMS Prometheus Monitoring, you do not need to build your own Prometheus monitoring system. This eliminates the need to manage underlying data storage, data visualization, and system O&M.

This is a paid service. For more information, see Product Billing.

CloudMonitor

CloudMonitor is a service that monitors Alibaba Cloud resources and internet applications. You can use CloudMonitor to collect metrics for Alibaba Cloud resources, detect the availability of internet services, and set alerts based on metrics.

Basic features are free, but advanced features are paid. For more information, see Product Billing.

Simple Log Service

Simple Log Service (SLS) is a cloud-native observability platform. It provides a large-scale, low-cost, real-time platform service for data such as logs, metrics, and traces. SLS offers a one-stop solution for data collection, processing, query and analysis, visualization, alerting, and delivery. It enhances your digital capabilities in scenarios such as R&D, O&M, operations, and security.

This is a paid service. For more information, see Product Billing.

Cloud Config

Configuration

Cloud Config is a resource auditing service that provides features such as resource configuration history tracking and configuration compliance auditing. It helps you easily achieve automated infrastructure supervision and ensure continuous compliance for your resources.

The Cloud Config product itself is free. For more information, see Product Billing.

Security

ARMS access control

Using Resource Access Management (RAM) users, you can delegate permissions as needed. Assigning different permissions to RAM users helps avoid security risks that arise from exposing your Alibaba Cloud account keys. For more information, see the official documentation.

Grafana identity security

Grafana has multiple structures for organizing resources and permissions. When a company has multiple teams, departments, or customers that require access, consider the following identity security scenarios:

  • How to assign accounts and manage permissions so that Department A cannot see information from Department B.

  • How to configure isolation when different departments have very different requirements for identity verification, plugins, and more.

  • How to allow users to view public content without authentication.

For more information, see the referenced document.

Multi-account control policies

You can use multi-account control policies to restrict RAM users in member accounts from configuring monitoring dashboards. This centralizes viewing permissions in a designated operations account.

For more information about control policies, see the official documentation.

Notes

Grafana logon issues

An account with Admin permissions cannot create other accounts. Only the Admin account has this permission. The logon method for the Admin account is as follows:

  • Log on to Grafana using the Admin account and password that you set for the workspace. If you forget the password, you can reset it on the Account Management page in the console.

  • Log on to the Alibaba Cloud account that you used to create the workspace. Then, on the Grafana logon page, click Sign in with Alibaba Cloud to log on with your Alibaba Cloud account.

Cost allocation

For enterprises with multiple accounts, deploying each business to a dedicated account simplifies cost attribution. The costs of shared resources, such as a Grafana workspace in the operations account, can then be proportionally allocated to different business teams using Landing Zone.

Permission management

Each business account has read and write permissions that are limited to the observable data of its own business department. The operations account has view permissions for all business departments. For more information, see the official documentation.

Procedure

Preparations

This demo is based on a multi-account environment that follows the standard multi-account architecture of Landing Zone. The multi-account architecture for this demo is as follows:

In this solution, you will create a unified observability dashboard in the operations account. This dashboard aggregates and displays audit results from Account A, Account B, and the global scope. The accounts are described as follows:

  • Management account: This account is used to enable multi-account configuration audits and deliver non-compliant events and resources to SLS in the log archive account.

  • Log archive account: This account is used to enable SLS to receive non-compliant resource events and business logs from Account A and Account B.

  • Operations account: This account is used to create a Grafana dashboard to display metric data from Account A and Account B, and log data from the log archive account in a unified view.

  • Business account: This account is used to enable Hybrid Cloud Monitoring, create an ARMS instance to collect cloud service metrics, and configure cross-account log delivery to send business logs to the log archive account.

  • Use the management account or a RAM role with administrator permissions in the management account to call the OpenAPI. Set the delegated administrator role for the trusted service on the member account where you want to create a cross-account GlobalView instance (the operations account for this solution). The parameters are as follows:

    • Endpoint: Select China (Shanghai) for regions in the Chinese mainland, or Singapore for other regions.

    • AccountId: Enter the ID of the member account where you want to create the cross-account GlobalView instance (the operations account for this solution).

    • ServicePrincipal: Enter prometheus.aliyuncs.com.

Implementation time

After completing the preparations, this solution takes approximately 60 minutes to implement.

Scenario planning

This topic provides the steps to implement several common scenarios.

  • Scenario 1: Unified observability for cloud service metrics

  • Scenario 2: Unified view of resource inspection results

Scenario 1: Observability for cloud service metrics

Monitor cloud services in business accounts

The cloud service monitoring feature in Prometheus Monitoring collects monitoring data for basic cloud services, such as ECS, SLB, and RDS, and sends it to the Prometheus instances in the corresponding business accounts.

Log in to Business Accounts A and B to configure cloud service monitoring. For more information, see the product documentation.

Unify monitoring data

In the operations account, you can create a GlobalView instance as follows:

  • For cloud service monitoring, integrate Prometheus instances from member accounts A and B using the resource directory in GlobalView. This lets you centrally manage your cloud service monitoring dashboards.

    Parameters:

    • Global Aggregation Instance Name: Enter a name for the instance that is easy to identify.

    • Select Aggregated Instances: Select the member accounts and instances from the resource directory to aggregate.

For more information, see the product documentation.

Unify data visualization

Create a Grafana workspace in the operations account and configure its integration with Prometheus.

Log on to Grafana. The built-in dashboards for cloud services are displayed.

Scenario 2: Unified display of resource inspection results

Enable multi-account configuration audit

First, enable and configure Cloud Config for your management account.

Create a global account group
  1. Log on to the Cloud Config console.

  2. In the navigation pane on the left, click Account Groups.

  3. On the Account Groups page, click Create Account Group.

  4. On the Create Account Group page, set the account group name and description, and set Account Group Type to Global.

  5. Click Submit. The new account group appears in the Account Groups list with a status of Created. You can also view the name, description, number of member accounts, type, and creation time of the account group.

Configure data delivery to SLS
  1. Log on to the Cloud Config console.

  2. In the navigation pane on the left, click Deliveries.

  3. On the Deliveries page, click Create Delivery in the upper-left corner.

  4. On the Create Delivery page, enter a Delivery Name, set Delivery Channel to Simple Log Service (SLS), and then configure the SLS parameters. You can create a new log project or select an existing one from the current management account or another member account. This log project is used to receive resource delivery data from the management account and all member accounts.

For more information, see the product documentation.

This configuration allows non-compliant resource events from multiple accounts to be delivered to a specific SLS Project in the log archive account.

Configure Grafana in the operations account

First, purchase a dedicated workspace. If you already have a dedicated workspace, you can use the existing one.

Add a data source

You can add an SLS data source. For details about the parameters, see the documentation.

For Type, select log-service-datasource.

Create a dashboard panel

First, create a panel that summarizes the non-compliant items for each account.

Query syntax:

*| select regexp_extract("evaluationResultIdentifier", '"resourceOwnerId":(.*?),',1) as account,count(*) as number group by account

Then, create the second panel to summarize non-compliant resources for each audit rule.

Query syntax:

*| select regexp_extract("evaluationResultIdentifier", '"sourceIdentifier":"(.*?)",',1) as rule,count(*) as number group by rule

Related topics