BobDu commented on issue #26971:
URL: https://github.com/apache/airflow/issues/26971#issuecomment-1274681039

   Verified #26598  overrideMappings
   
   ```
   statsd:
     overrideMappings:
       # === Counters ===
       - match: "(.+)\\.(.+)_start$"
         match_metric_type: counter
         name: "airflow_job_start"
         match_type: regex
         labels:
           airflow_id: "$1"
           job_name: "$2"
       - match: "(.+)\\.(.+)_end$"
         match_metric_type: counter
         name: "airflow_job_end"
         match_type: regex
         labels:
           airflow_id: "$1"
           job_name: "$2"
   ```
   
   ```
   # bobdu @ BobDu in ~ [17:35:34] 
   $ kubectl -n airflow2 get cm airflow-statsd -o yaml
   apiVersion: v1
   data:
     mappings.yml: |-
       mappings:
         - labels:
             airflow_id: $1
             job_name: $2
           match: (.+)\.(.+)_start$
           match_metric_type: counter
           match_type: regex
           name: airflow_job_start
         - labels:
             airflow_id: $1
             job_name: $2
           match: (.+)\.(.+)_end$
           match_metric_type: counter
           match_type: regex
           name: airflow_job_end
   kind: ConfigMap
   metadata:
     annotations:
       meta.helm.sh/release-name: airflow
       meta.helm.sh/release-namespace: airflow2
     creationTimestamp: "2022-10-11T09:09:41Z"
     labels:
       app.kubernetes.io/managed-by: Helm
       chart: airflow-1.7.0
       component: config
       heritage: Helm
       release: airflow
       tier: airflow
     name: airflow-statsd
     namespace: airflow2
     resourceVersion: "757709465"
     uid: 8438f60b-b7d0-46be-99dc-8415fcefb800
   ```
   
   ```
   # bobdu @ BobDu in ~ 
   $ kubectl get --raw 
'/api/v1/namespaces/airflow2/services/airflow-statsd:9102/proxy/metrics'
   # HELP airflow_localtaskjob_end Metric autogenerated by statsd_exporter.
   # TYPE airflow_localtaskjob_end counter
   airflow_localtaskjob_end 65
   # HELP airflow_localtaskjob_start Metric autogenerated by statsd_exporter.
   # TYPE airflow_localtaskjob_start counter
   airflow_localtaskjob_start 65
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to