Background Information
Apache APISIX is an open source cloud-native API gateway. As an API gateway, it has the characteristics of dynamic, real-time, and high performance. It provides load balancing, dynamic upstream, grayscale publishing, service fuse, identity authentication, and observability. traffic management function. You can use Apache APISIX to handle traditional north-south traffic and east-west traffic between services, or it can be used as a K8s Ingress controller. Thanks to the fully dynamic design of APISIX, configuration changes can be made at any time without restarting the service.
DataAnt full-stack cloud monitoring system can aggregate all operation and maintenance data of IaaS, PaaS and SaaS layers through big data and machine learning, and provide users with a unified visual interface. DataAnt allows users to move seamlessly and quickly between relevant monitoring data sources without having to switch tools and gain a more granular view of the state of their IT systems. The DataAnt Agent it provides can monitor APISIX in real time and upload its monitoring data to the DataAnt PaSS platform to realize one-stop cloud monitoring.
Introduction
1. Collection configuration
DataAnt Agent will first initialize and register the collector through the APISIX item configured in config.yaml
. The same Agent can register multiple collectors. After the collector collects the indicators exposed by APISIX, it encrypts the indicator data and uploads it to DataAnt Cloud.
2. Data visualization
After DataAnt Cloud receives the data, the data will be stored in the time series database after preliminary monitoring information supplementation and processing, and then APISIX can be monitored in real time through DataAnt's Dashboard.
3. Alarm notification
The data will also be distributed to the alarm matching processing through the message, and then the notification aggregation will be carried out. Finally, the alarm will be sent through the configured notification method, that is, the abnormal situation of APISIX can be received in real time.
Configuration Guide
- First, please visit DataAnt Cloud , register an account and log in to the platform.
Obtain the Agent of DataAnt through the following network disk link. After the download is complete, upload it to the machine where APISIX is located and add the execution permission.
- Extract link: https://pan.baidu.com/s/1fabvSiDLDh8ZRTjpzINHLg
- Extraction code: 87d4
- Create the configuration file required by DataAnt Agent
./config.yaml
in the current directory. The detailed configuration is as follows:
tenantId: 11 # 该 ID 是您的 DataAnt 平台的用户 ID。
hostIp: 127.0.0.1 # 主机的标识 IP
hostName: apisix
configs:
- uri: http://127.0.0.1:9091 # APISIX 监控指标所暴露的端口。
type: apisix # 监控类型选择 APISIX
asName: apisix_test # 别名
user: admin # 用户名可省略
- Start the Agent with the following command.
./agent
After successful startup, the following data will be returned:
2022/06/21 20:50:10 {"code":200,"msg":"请求成功","data":null}
2022/06/21 20:50:30 {"code":200,"msg":"请求成功","data":null}
2022-06-21 20:51:00:000 INFO apisix/apisix.go:25 获取对应监控数据,数据长度1675
2022-06-21 20:51:00:000 INFO prometheus/prometheusCollector.go:43 获取对应监控数据开始解析1675
2022-06-21 20:51:00:000 INFO prometheus/prometheusCollector.go:43 获取对应监控数据完成解析 解析指标数量21
2022-06-21 20:51:00:000 INFO collector/collector.go:82 apisix采集到数据数量21
2022-06-21 20:51:00:000 INFO runtime/asm_amd64.s:1581 apisix_test9091:指标数:21
- On the home page of the DataAnt platform, click Install Integration Plug-in > Monitoring Plug-in, select APISIX, and click
配置
under点击配置
. - On the home page of the DataAnt platform, click Dashboard in the left navigation bar and create a new dashboard.
Select the indicators you need and drag them to the dashboard. The configured indicators are as follows:
Precautions
DataAnt Agent will report data every 30 seconds, so there will be a certain delay.
Summarize
This article mainly introduces how to upload APISIX index data to the DATA ANT monitoring system through DataAnt Agent. You can use it later to configure relevant alarm rules and alarm contacts. When the service fails, you can be notified in time.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。