Skip to content

Dianping CAT

Version-1.9.0 · Experimental



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 TrueWatch 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:

  1. startTransactionTypes MatchTransactionTypes block routers sample is the data returned to the client end
  2. routers is DataKit IP or Domain
  3. tcp_port client config servers ip address

Tracing

cat

Following is tags/fields of tracing data

Tags & Fields Description
base_service
(tag)
Span base service name
container_host
(tag)
Container hostname. Available in OpenTelemetry. Optional.
db_host
(tag)
DB host name: ip or domain name. Optional.
db_name
(tag)
Database name. Optional.
db_system
(tag)
Database system name:mysql,oracle... Optional.
dk_fingerprint
(tag)
DataKit fingerprint(always DataKit's hostname)
endpoint
(tag)
Endpoint info. Available in SkyWalking, Zipkin. Optional.
env
(tag)
Application environment info. Available in Jaeger. Optional.
host
(tag)
Hostname.
http_method
(tag)
HTTP request method name. Available in DDTrace, OpenTelemetry. Optional.
http_route
(tag)
HTTP route. Optional.
http_status_code
(tag)
HTTP response code. Available in DDTrace, OpenTelemetry. Optional.
http_url
(tag)
HTTP URL. Optional.
operation
(tag)
Span name
out_host
(tag)
This is the database host, equivalent to db_host,only DDTrace-go. Optional.
project
(tag)
Project name. Available in Jaeger. Optional.
service
(tag)
Service name. Optional.
source_type
(tag)
Tracing source type
span_type
(tag)
Span type
status
(tag)
Span status
version
(tag)
Application version info. Available in Jaeger. Optional.
duration Duration of span
Type: int | (gauge)
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 | (gauge)
Unit: timeStamp,usec
trace_id Trace id
Type: string
Unit: N/A

Metric

Metric cat

Tags & Fields Description
domain
(tag)
IP address.
hostName
(tag)
Host name.
os_arch
(tag)
CPU architecture:AMD/ARM.
os_name
(tag)
OS name:'Windows/Linux/Mac',etc.
os_version
(tag)
The kernel version of the OS.
runtime_java-version
(tag)
Java version.
runtime_user-dir
(tag)
The path of jar.
runtime_user-name
(tag)
User name.
disk_free Free disk size.
Type: float | (gauge)
Unit: digital,B
disk_total Total disk size of data nodes.
Type: float | (gauge)
Unit: digital,B
disk_usable Used disk size.
Type: float | (gauge)
Unit: digital,B
memory_free Free memory size.
Type: float | (gauge)
Unit: count
memory_heap-usage The usage of heap memory.
Type: float | (gauge)
Unit: count
memory_max Max memory usage.
Type: float | (gauge)
Unit: count
memory_non-heap-usage The usage of non heap memory.
Type: float | (gauge)
Unit: count
memory_total Total memory size.
Type: float | (gauge)
Unit: count
os_available-processors The number of available processors in the host.
Type: float | (gauge)
Unit: count
os_committed-virtual-memory Committed virtual memory size.
Type: float | (gauge)
Unit: digital,B
os_free-physical-memory Free physical memory size.
Type: float | (gauge)
Unit: digital,B
os_free-swap-space Free swap space size
Type: float | (gauge)
Unit: digital,B
os_system-load-average Average system load.
Type: float | (gauge)
Unit: percent,percent
os_total-physical-memory Total physical memory size.
Type: float | (gauge)
Unit: digital,B
os_total-swap-space Total swap space size.
Type: float | (gauge)
Unit: digital,B
runtime_start-time Start time.
Type: int | (gauge)
Unit: time,s
runtime_up-time Runtime.
Type: int | (gauge)
Unit: time,ms
thread_cat_thread_count The number of threads used by cat.
Type: float | (gauge)
Unit: count
thread_count Total number of threads.
Type: float | (gauge)
Unit: count
thread_daemon_count The number of daemon threads.
Type: float | (gauge)
Unit: count
thread_http_thread_count The number of http threads.
Type: float | (gauge)
Unit: count
thread_peek_count Thread peek.
Type: float | (gauge)
Unit: count
thread_pigeon_thread_count The number of pigeon threads.
Type: float | (gauge)
Unit: count
thread_total_started_count Total number of started threads.
Type: float | (gauge)
Unit: count