Integrated power Istio on ACK TSDB Observability

Ali cloud container services Kubernetes (referred to as ACK) to support the deployment of a key Istio, can refer to the documentation deployed using Isito on ACK. Istio on ACK provides rich monitoring capabilities for grid service collects telemetry data, which is responsible for providing Istio Mixer policy control components and telemetry collection. Prometheus is one of the monitored using monitoring capabilities Istio provided. Prometheus is an open source monitoring and alarm systems, less reliance Prometheus, full-featured, widely used for surveillance system Kubernetes cluster. Istio since the beginning of the default version 0.8 will be included Prometheus, Mixer Adapter for support to the monitoring facilities of Prometheus. Users can see the operating status and Prometheus addresses by querying service or pod. You can also view the monitoring data through clear and concise Prometheus UI interface.

Prometheus storage challenges and solutions

Prometheus local storage design can reduce the complexity of their operation and maintenance and management to meet the needs of most users monitor size, but also means that the local store persistent data Prometheus can not, can not store large amounts of historical data, but also not flexible expansion . Prometheus itself does not attempt to solve the above problems, but by defining a set of remote storage adapter standard interface, so that users can decide which set of standard interfaces based on the monitoring sample Promthues of data storage to third-party remote storage services to solve local storage problems caused.

TSDB for Prometheus is a high performance, low cost, stable and reliable online sequence database service, built by Prometheus realized the remote storage adapter, as Promtheus natural native support for third-party online remote storage services.

Compared to other third-party remote storage purposes, TSDB for Prometheus has a high degree of integration, while supporting literacy and other advantages.

  • High degree of integration
    mainstream practice Prometheus docking third-party storage system is to achieve an independent third-party storage to remote storage adapter system, the adapter requires a separate deployment and operation and maintenance, remote storage adapter Separately deployed there and read single point of failure write performance issues.

TSDB for Prometheus built-in server Prometheus remote storage adapter to achieve, just in the configuration file prometheus.yaml Prometheus's modified remote read and write configuration, you can directly read and write native support for Prometheus TSDB, high degree of integration, no additional deployment alone adapter, which greatly reduces the risk of failure and operation and maintenance costs of a single point adapter.

  • Supports reading and writing
    of the current third-party support only remote storage Prometheus will monitor the sample data is written, does not support reading. For example OpenTSDB, Graphite and Elasticsearch and other third-party storage, adapter Prometheus community to provide support only write mode, read mode is not supported. The TSDB for Prometheus supports both reading and writing. To learn more the degree of support for third-party storage systems to read and write Prometheus, see Remote Endpoints and Storage .

TSDB for Prometheus

Temporal sequence database (Time Series & Spatial Temporal Database, TSDb of abbreviation) is a high performance, low cost, reliable timing temporal line database services, provide efficient reading and writing, high compression ratio is stored, and the polymerization time series data interpolation computing services . TSDB second stage includes the sequential data writing one million performance, low-cost storage to provide high compression ratio, pre-downsampling, interpolation calculation multidimensional polymerization, the results of visual query functions.

TSDB for Prometheus is a high performance cloud Ali timing spatio-temporal database TSDB to provide Prometheus, low-cost, reliable online remote storage service that offers the ability to:

  • Provide efficient reading and writing, high compression storage capacity than can be seamlessly integrated Prometheus, Prometheus protocol natively support docked to remote storage TSDB.
  • To solve the problem in the past need to develop remote storage adapter for additional Prometheus, greatly reducing the cost of Prometheus remote storage docking TSDB.
  • TSDB for the greatest degree of Prometheus Prometheus is PromQL compatible query syntax, thus reducing the user development, migration and maintenance costs.
  • Problem solving Prometheus local stroge not store large amounts of historical data of the scene, and can not be extended.
  • Prometheus achieved through the built-in remote storage adapter, as Promtheus natural native support for third-party online remote storage services.
  • Compared to other third-party remote storage purposes, TSDB for Prometheus has a high degree of integration, while supporting literacy and other advantages.

TSDB for Prometheus can be found using the requirements of a particular use requirements

TSDB examples of different specifications provided by Ali cloud, set different maximum write TPS, TPS avoid excessive lead TSDB examples unavailable protection TSDB instances running. When writing TPS TPS exceed the maximum allowable TSDB example, it will trigger TSDB protection rules limiting example, can cause abnormal write failure. It is necessary to adjust the configuration Prometheus remote_write specifications according TSDB example, to achieve smooth and reliable indicators of the Prometheus collected in the writing TSDB.

About Remote Write configuration, in addition to the official reference Prometheus Remote Write configuration instructions, you can also write reference configuration when Prometheus docking Ali cloud TSDB best practices .

Creating TSDB examples

TSDB create a very simple example, login TSDB console , referring to create an instance of a document can be created.
Examples of obtaining TSDB opened the address, you can refer to the official documentation TSDB Quick Start

Prometheus confirm where the machine can be accessed TSDB instance. Direct access using the http address TSDB instance, if we can get that contains "Welcome to use the TSDB" string representing the Prometheus instance where the machine can access TSDB normal.

TSDB set an example for the public address: ts-xxxxxxxxxxxx.hitsdb.rds.aliyuncs.com:3242, in Istio where Kubernetes cluster of Prometheus enabled, execute the command:
kubectl exec -it -n istio-system $(kubectl get pods -n istio-system -l app=prometheus -o jsonpath='{.items[0].metadata.name}') sh

After entering the container Prometheus, execute the command wget -S ts-xxxxxxxxxxxx.hitsdb.rds.aliyuncs.com:3242, the following results can be obtained:

Connecting to ts-bp1839ak5uf20igcw.hitsdb.rds.aliyuncs.com:3242 (101.37.143.44:3242)
  HTTP/1.1 200 OK
  Content-Type: Content-Type

index.html           100% |*****************************************************************************************|   361   0:00:00 ETA

Then Run cat index.html, the following results can be obtained:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv=content-type content="text/html;charset=utf-8"><title>TSDB</title>
<style><!--
body{font-family:arial,sans-serif;margin-left:2em}A.l:link{color:#6f6f6f}A.u:link{color:green}.fwf{font-family:monospace;white-space:pre-wrap}//--></style><div>Welcome to use the TSDB!</div>

Integrated TSDB to Istio on ACK

The first deployment Istio

Ali cloud container services Kubernetes (referred to as ACK) to support the deployment of a key Istio, can refer to the documentation deploy Isito on ACK.
If this is the first time deployed using Isito, you can follow the steps to deploy a document directly.
Note, check Enable Prometheus metrics log collection option is enabled by default, and check the persistent storage , suggesting the need to provide access to the TSDB address. Fill this has been verified in the step above examples may be used TSDB address, e.g. ts-xxxxxxxxxxxx.hitsdb.rds.aliyuncs.com:3242.
_

Then click deployment Istio , start the deployment. After successful deployment, Prometheus monitoring persistent data corresponding to TSDB instance.

Change has Isito deployment configuration

If you have previously deployed Istio, but do not enable persistent storage Prometheus, you can configure the following steps.

  • Login container service management console.
  • In Kubernetes menu, click Apply in the left navigation bar> released into the publication page.
  • Click Helm, select the cluster, select Istio to be updated, click the operation to update the column.
    _
  • In the dialog box, the parameters of Prometheus Istio be modified:
Configuration Explanation
enabled true or false, indicating whether to enable Prometheus collect metrics log. Enabled by default, that is true.
replicaCount The number of copies prometheus groups of containers, the default value is 1.
persist true or false, indicating whether to enable persistent storage. When set to true, you must specify the instance TSDB address.
tsdbEndpoint TSDB instance address, you must specify when to enable persistent storage.
retention The default data retention time, 8760h0m0s that is 24 * 365 hours, that is 1 year
scrapeInterval The global default Fetch interval, the default is 15s

_

  • When you're done, click update .

View Prometheus Configuration

Log in container services management console, click the left-hand navigation application configuration under configuration items , configuration items into the list page. Click prometheus item name for the configuration, the process proceeds configuration item details page, as shown below, you can see an example of the address corresponding to FIG TSDB:
_

Write and read verification TSDB

TSDB write verification

Simply through the management console interface TSDB examples of "monitored instance" TPS interface, observe whether the change is written to verify. Usually the beginning without any data is written, the write TPS is 0; if the TPS starts from zero to a positive number, then the data will be reported Prometheus has to TSDB, as shown in the following figure.
_

Read verification

In Istio where Kubernetes cluster Prometheus is enabled, execute the command:
kubectl port-forward -n istio-system svc/prometheus 9090:9090

Open your browser and enter the address HTTP: // localhost: 9090 , Prometheus enter the console page.

Istio provides a set of default monitoring indicators to Prometheus to collect a monitoring index istio_request_bytes_count Istio an example query certified the results as shown below.
_

At this point, a complete integrated TSDB to process Istio observability Prometheus service has ended.

to sum up

Ali cloud Kubernetes container service basis, to quickly build a set for the connection of micro-management, and security services open platform Istio, to configure multiple applications and the introduction of related services. Prometheus is one of the monitored using monitoring capabilities Istio provided to address effectively by integrating TSDB persistent storage problems.

Guess you like

Origin yq.aliyun.com/articles/704840