数据采集 采集源配置 .NET CLR 指标采集
.NET CLR 指标采集
简介
实时采集 .NET CLR 服务的指标, 上报到 DataFlux 中
前置条件
- 已安装 DataKit(DataKit 安装文档)
- 只限 Windows 系统
配置
进入 DataKit 安装目录下的 conf.d/windows 目录,复制 dotnetclr.conf.sample 并命名为 dotnetclr.conf。示例如下:
设置:
[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
# ##(required)
ObjectName = ".NET CLR Exceptions"
# ##(required)
Counters = ["# of Exceps Thrown / sec"]
# ##(required) specify the .net clr instances, use '*' to apply all
Instances = ['*']
# ##(required) all object should use the same name
Measurement = 'dotnetclr'
# ##(optional)Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# ##(required)
ObjectName = ".NET CLR Jit"
# ##(required)
Counters = ["% Time in Jit","IL Bytes Jitted / sec"]
# ##(required) specify the .net clr instances, use '*' to apply all
Instances = ['*']
# ##(required) all object should use the same name
Measurement = 'dotnetclr'
# ##(optional)Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# ##(required)
ObjectName = ".NET CLR Loading"
# ##(required)
Counters = ["% Time Loading"]
# ##(required) specify the .net clr instances, use '*' to apply all
Instances = ['*']
# ##(required) all object should use the same name
Measurement = 'dotnetclr'
# ##(optional)Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# ##(required)
ObjectName = ".NET CLR LocksAndThreads"
# ##(required)
Counters = ["# of current logical Threads","# of current physical Threads","# of current recognized threads","# of total recognized threads","Queue Length / sec","Total # of Contentions","Current Queue Length"]
# ##(required) specify the .net clr instances, use '*' to apply all
Instances = ['*']
# ##(required) all object should use the same name
Measurement = 'dotnetclr'
# ##(optional)Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# ##(required)
ObjectName = ".NET CLR Memory"
# ##(required)
Counters = ['% Time in GC','# Bytes in all Heaps','# Gen 0 Collections','# Gen 1 Collections','# Gen 2 Collections','# Induced GC', 'Allocated Bytes/sec','Finalization Survivors','Gen 0 heap size','Gen 1 heap size','Gen 2 heap size','Large Object Heap size','# of Pinned Objects']
# ##(required) specify the .net clr instances, use '*' to apply all
Instances = ['*']
# ##(required) all object should use the same name
Measurement = 'dotnetclr'
# ##(optional)Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# ##(required)
ObjectName = ".NET CLR Security"
# ##(required)
Counters = ["% Time in RT checks","Stack Walk Depth","Total Runtime Checks"]
# ##(required) specify the .net clr instances, use '*' to apply all
Instances = ['*']
# ##(required) all object should use the same name
Measurement = 'dotnetclr'
# ##(optional)Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false
配置好后,重启 DataKit 即可生效
指标集 dotnetclr
tags
名称 | 描述 |
---|---|
instance | |
objectname |
fields
名称 | 描述 | 类型 |
---|---|---|
#_Bytes_in_all_Heaps | float | |
#_Gen_0_Collections | float | |
#_Gen_1_Collections | float | |
#_Gen_2_Collections | float | |
#_Induced_GC | float | |
#of_Exceps_Thrown/_sec | float | |
#_of_Pinned_Objects | float | |
#_of_current_logical_Threads | float | |
#_of_current_physical_Threads | float | |
#_of_current_recognized_threads | float | |
#_of_total_recognized_threads | float | |
Allocated_Bytes_persec | float | |
Current_Queue_Length | float | |
Finalization_Survivors | float | |
Gen_0_heap_size | float | |
Gen_1_heap_size | float | |
Gen_2_heap_size | float | |
IL_Bytes_Jitted_/_sec | float | |
Large_Object_Heap_size | float | |
Percent_Time_Loading | float | |
Percent_Time_in_GC | float | |
Percent_Time_in_Jit | float | |
Percent_Time_in_RT_checks | float | |
Queue_Length_/_sec | float | |
Stack_Walk_Depth | float | |
Total_#_of_Contentions | float | |
Total_Runtime_Checks | float |