Custom Resource Tags

Created:2024-06-01 Last Modified:2024-08-23

This document was translated by ChatGPT

#1. K8s Label

DeepFlow currently supports automatically associating K8s custom Labels with the following resources:

  • Container services
  • Workloads
    • Deployment
    • StatefulSet
    • DaemonSet
    • ReplicationController
    • CafeDeployment
    • CloneSet
  • ReplicaSet/InPlaceSet
  • Pod

#2. K8s Annotation

DeepFlow (Enterprise Edition only) currently supports automatically associating K8s custom Annotations with the following resources:

  • Container services
  • Pod

#3. K8s Env

DeepFlow (Enterprise Edition only) currently supports automatically associating K8s custom Annotations with the following resources:

  • Pod

#4. Cloud Resource Custom Tags

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

  • Cloud servers

Supported public cloud providers include:

  • Aliyun
  • Tencent Cloud
  • Huawei Cloud

Supported private cloud providers include:

  • Aliyun Dedicated 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 sets 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 sets recognizable tags and their priorities (Container Service > Workload > Process > Container Cluster > Others > IP).
    • Compared to auto_instance, auto_service removes Container POD and adds Container Service and Workload tags that better reflect services. The Container Service tag has a higher priority than Workload, so when an IP belongs to both Container Service and Workload, it will be identified 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
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 the ability to customize auto-grouping tags. You can configure the tags and their priorities as needed. The configuration document is as follows:

querier:
  auto-custom-tag:
    # 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-values:
      - k8s.label.app
      - auto_service
1
2
3
4
5
6
7
8
9
10
11
12
13

The $tag-name tag defined above is used similarly to auto_instance and auto_service, with the following additional restrictions:

  • The $tag-name defined here cannot be used for grouping with * simultaneously.
  • The $tag-name defined here cannot be used for grouping with any tags included in the $tag-values definition simultaneously.