Dianping CAT
Dianping-cat Cat is an open-source distributed real-time monitoring system mainly used to monitor the performance, capacity, and business indicators of the system. It is a monitoring system developed by Meituan Dianping Company and is currently open source and widely used.
Cat collects various indicator data of the system, such as CPU, memory, network, disk, etc., for real-time monitoring and analysis, helping developers quickly locate and solve system problems. At the same time, it also provides some commonly used monitoring functions, such as alarms, statistics, log analysis, etc., to facilitate system monitoring and analysis by developers.
Data Type¶
Data transmission protocol:
-
Plaintext: Plain text mode, currently not supported by DataKit.
-
Native: Text form separated by specific symbols, currently supported by DataKit.
Data Classification:
type | long type | doc | DataKit support | Corresponding data type |
---|---|---|---|---|
t | transaction start | transaction start | true | trace |
T | transaction end | transaction end | true | trace |
E | event | event | false | - |
M | metric | metric | false | - |
L | trace | trace | false | - |
H | heartbeat | heartbeat | true | metric |
CAT start mode¶
The data is all in the DataKit, and the web page of cat no longer has data, so the significance of starting is not significant.
Moreover, the cat server will also send transaction data to the dk, causing a large amount of garbage data on the Guance page. It is not recommended to start a cat_ Home (cat server) service.
The corresponding configuration can be configured in client.xml, please refer to the following text.
Configuration¶
client config:
<?xml version="1.0" encoding="utf-8"?>
<config mode="client">
<servers>
<!-- datakit ip, cat port , http port -->
<server ip="10.200.6.16" port="2280" http-port="9529"/>
</servers>
</config>
Note: The 9529 port in the configuration is the HTTP port of the DataKit. 2280 is the 2280 port opened by the cat input.
Go to the conf.d/cat
directory under the DataKit installation directory, copy cat.conf.sample
and name it cat.conf
. Examples are as follows:
[[inputs.cat]]
## tcp port
tcp_port = "2280"
##native or plaintext, datakit only support native(NT1) !!!
decode = "native"
## This is default cat-client Kvs configs.
startTransactionTypes = "Cache.;Squirrel."
MatchTransactionTypes = "SQL"
block = "false"
routers = "127.0.0.1:2280;"
sample = "1.0"
## global tags.
# [inputs.cat.tags]
# key1 = "value1"
# key2 = "value2"
# ...
The collector can now be turned on by ConfigMap Injection Collector Configuration.
Notes on configuration files:
startTransactionTypes
MatchTransactionTypes
block
routers
sample
is the data returned to the client endrouters
is DataKit IP or Domaintcp_port
client configservers ip
address
Tracing¶
cat
¶
This is the field description for the trace.
- Tags
Tag | Description |
---|---|
base_service | Span Base service name |
container_host | Container hostname. Available in OpenTelemetry. Optional. |
db_host | DB host name: ip or domain name. Optional. |
db_name | Database name. Optional. |
db_system | Database system name:mysql,oracle... Optional. |
dk_fingerprint | DataKit fingerprint is DataKit hostname |
endpoint | Endpoint info. Available in SkyWalking, Zipkin. Optional. |
env | Application environment info. Available in Jaeger. Optional. |
host | Hostname. |
http_method | HTTP request method name. Available in DDTrace, OpenTelemetry. Optional. |
http_route | HTTP route. Optional. |
http_status_code | HTTP response code. Available in DDTrace, OpenTelemetry. Optional. |
http_url | HTTP URL. Optional. |
operation | Span name |
out_host | This is the database host, equivalent to db_host,only DDTrace-go. Optional. |
project | Project name. Available in Jaeger. Optional. |
service | Service name. Optional. |
source_type | Tracing source type |
span_type | Span type |
status | Span status |
version | Application version info. Available in Jaeger. Optional. |
- Metrics
Metric | Description |
---|---|
duration | Duration of span Type: int Unit: time,μs |
message | Origin content of span Type: string Unit: N/A |
parent_id | Parent span ID of current span Type: string Unit: N/A |
resource | Resource name produce current span Type: string Unit: N/A |
span_id | Span id Type: string Unit: N/A |
start | start time of span. Type: int Unit: timeStamp,usec |
trace_id | Trace id Type: string Unit: N/A |
Metric¶
Metric cat
¶
- Tags
Tag | Description |
---|---|
domain | IP address. |
hostName | Host name. |
os_arch | CPU architecture:AMD/ARM. |
os_name | OS name:'Windows/Linux/Mac',etc. |
os_version | The kernel version of the OS. |
runtime_java-version | Java version. |
runtime_user-dir | The path of jar. |
runtime_user-name | User name. |
- Metrics
Metric | Description |
---|---|
disk_free | Free disk size. Type: float Unit: digital,B |
disk_total | Total disk size of data nodes. Type: float Unit: digital,B |
disk_usable | Used disk size. Type: float Unit: digital,B |
memory_free | Free memory size. Type: float Unit: count |
memory_heap-usage | The usage of heap memory. Type: float Unit: count |
memory_max | Max memory usage. Type: float Unit: count |
memory_non-heap-usage | The usage of non heap memory. Type: float Unit: count |
memory_total | Total memory size. Type: float Unit: count |
os_available-processors | The number of available processors in the host. Type: float Unit: count |
os_committed-virtual-memory | Committed virtual memory size. Type: float Unit: digital,B |
os_free-physical-memory | Free physical memory size. Type: float Unit: digital,B |
os_free-swap-space | Free swap space size Type: float Unit: digital,B |
os_system-load-average | Average system load. Type: float Unit: percent,percent |
os_total-physical-memory | Total physical memory size. Type: float Unit: digital,B |
os_total-swap-space | Total swap space size. Type: float Unit: digital,B |
runtime_start-time | Start time. Type: int Unit: time,s |
runtime_up-time | Runtime. Type: int Unit: time,ms |
thread_cat_thread_count | The number of threads used by cat. Type: float Unit: count |
thread_count | Total number of threads. Type: float Unit: count |
thread_daemon_count | The number of daemon threads. Type: float Unit: count |
thread_http_thread_count | The number of http threads. Type: float Unit: count |
thread_peek_count | Thread peek. Type: float Unit: count |
thread_pigeon_thread_count | The number of pigeon threads. Type: float Unit: count |
thread_total_started_count | Total number of started threads. Type: float Unit: count |