Custom Resource Tags

Created:2024-06-01 Last Modified:2025-08-29

This document was translated by ChatGPT

#1. K8s Label

DeepFlow currently supports automatically associating K8s custom Label resources, including:

  • Container Service
  • Workload
    • Deployment
    • StatefulSet
    • DaemonSet
    • ReplicationController
    • CafeDeployment
    • CloneSet
  • ReplicaSet/InPlaceSet
  • Pod

#2. K8s Annotation

DeepFlow (Enterprise Edition only) currently supports automatically associating K8s custom Annotation resources, including:

  • Container Service
  • Pod

#3. K8s Env

DeepFlow (Enterprise Edition only) currently supports automatically associating K8s custom Annotation resources, including:

  • Pod

#4. Cloud Resource Custom Tags

DeepFlow (Enterprise Edition only) currently supports automatically associating cloud resource custom tags for the following resources:

  • Cloud Server

Supported public cloud providers include:

  • Aliyun
  • Tencent Cloud
  • Huawei Cloud

Supported private cloud providers include:

  • Alibaba Private Cloud

#5. Custom Auto Grouping Tags

The DeepFlow system provides two default auto-grouping tags: auto_instance and auto_service:

  • auto_instance: Automatically identifies the corresponding instance tag based on IP or process ID. The system has predefined recognizable tags and their priorities (Container POD > Process > Container Node > Others > IP)
Value DisplayName Description
0 Internet IP
1 Cloud Host
5 Router
6 VM Hypervisor
9 DHCP Gateway
10 K8s POD
11 K8s Service
12 Redis
13 RDS
14 K8s Node
15 Load Balancer
16 NAT Gateway
120 Process
255 IP

generate from csv file: auto_instance_type.en

  • auto_service: Automatically identifies the corresponding service tag based on IP or process ID. The system has predefined recognizable tags and their priorities (Custom Service > Container Service > Workload > Process > Container Cluster > Others > IP)
    • Compared to auto_instance, auto_service removes Container POD and adds Custom Service (Enterprise Edition only), Container Service, and Workload tags that better represent services. Among them, Container Service has a higher recognition priority than Workload. Therefore, when an IP belongs to both Container Service and Workload, it will be recognized as Container Service.
Value DisplayName Description
0 Internet IP
1 Cloud Host
5 Router
6 VM Hypervisor
9 DHCP Gateway
11 K8s Service
12 Redis
13 RDS
14 K8s Node
15 Load Balancer
16 NAT Gateway
101 K8s Workload
102 Service
103 K8s Cluster
104 Biz Service
105 Custom Biz Service
120 Process
130 Deployment
131 StatefulSet
132 ReplicationController
133 DaemonSet
134 ReplicaSetController
135 CloneSet
255 IP

generate from csv file: auto_service_type.en

DeepFlow also supports defining custom auto-grouping tags. You can configure the tags to be recognized and their priorities as needed. The configuration document is as follows:

querier:
  auto-custom-tags:
    # The Name of Custom Tag
    # Note: Cannot use colon, space, or backquote.
    - tag-name: auto_my_tag
      # The Value of Custom Tag
      # Note: Range of source tags for retrieving the field value. Each row of data will
      #   automatically use the first non-zero tag encountered from top to bottom as the
      #   value for the custom tag. Here you can enter any tags seen in the results of
      #   the `show tags from <table>` API.
      tag-fields:
        - k8s.label.app
        - auto_service
1
2
3
4
5
6
7
8
9
10
11
12
13

The $tag-name tag defined above works basically the same as auto_instance and auto_service, with the following additional restrictions:

  • The $tag-name defined here cannot be used for grouping together with *
  • The $tag-name defined here cannot be used for grouping together with any tags included in $tag-fields in its definition