我正在运行一个示例程序程序
rahul@g3ck0:~/programs/Remodel$ GOGCTRACE=1 go run main.go
gc1(1): 0+0+0 ms 0 -> 0 MB 422 -> 346 (422-76) objects 0 handoff
gc2(1): 0+0+0 ms 0 -> 0 MB 2791 -> 1664 (2867-1203) objects 0 handoff
gc3(1): 0+0+0 ms 1 -> 0 MB 4576 -> 2632 (5779-3147) objects 0 handoff
gc4(1): 0+0+0 ms 1 -> 0 MB 3380 -> 2771 (6527-3756) objects 0 handoff
gc5(1): 0+0+0 ms 1 -> 0 MB 3511 -> 2915 (7267-4352) objects 0 handoff
gc6(1): 0+0+0 ms 1 …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用正则表达式添加新标签.名称实例是pr-na01-na02-A
我试图只获取pr-na01
,所以我这样做:
- source_labels: ['__meta_ec2_tag_Name']
regex: '^[^-]*-[^-]*'
target_label: 'test'
replacement: '$1'
Run Code Online (Sandbox Code Playgroud)
仍然没有在Prometheus指标下看到新标签(测试).