search
数据采集 采集源配置 IIS 指标采集

IIS 指标采集

简介

使用windows performance counter 采集 IIS 服务的指标, 上报到 DataFlux 中

前置条件

配置

进入 DataKit 安装目录下的 conf.d/windows 目录,复制 win_perf_counters.conf.sample 并命名为 win_perf_counters.conf,并按如下配置:

设置:

[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
    # HTTP Service request queues in the Kernel before being handed over to User Mode.
    ObjectName = "HTTP Service Request Queues"
    Instances = ["*"]
    Counters = ["CurrentQueueSize","RejectedRequests"]
    Measurement = "iis_http_queues"
    #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).

[[inputs.win_perf_counters.object]]
    # IIS, ASP.NET Applications
    ObjectName = "ASP.NET Applications"
    Counters = ["Cache Total Entries","Cache Total Hit Ratio","Cache Total Turnover Rate","Output Cache Entries","Output Cache Hits","Output Cache Hit Ratio","Output Cache Turnover Rate","Compilations Total","Errors Total/Sec","Pipeline Instance Count","Requests Executing","Requests in Application Queue","Requests/Sec"]
    Instances = ["*"]
    Measurement = "iis_aspnet_app"
    #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).

[[inputs.win_perf_counters.object]]
    # IIS, ASP.NET
    ObjectName = "ASP.NET"
    Counters = ["Application Restarts","Request Wait Time","Requests Current","Requests Queued","Requests Rejected"]
    Instances = ["*"]
    Measurement = "iis_aspnet"
    #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).

[[inputs.win_perf_counters.object]]
    # IIS, Web Service
    ObjectName = "Web Service"
    Counters = ["Get Requests/sec","Post Requests/sec","Connection Attempts/sec","Current Connections","ISAPI Extension Requests/sec"]
    Instances = ["*"]
    Measurement = "iis_websvc"
    #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).

[[inputs.win_perf_counters.object]]
    # Web Service Cache / IIS
    ObjectName = "Web Service Cache"
    Counters = ["URI Cache Hits %","Kernel: URI Cache Hits %","File Cache Hits %"]
    Instances = ["*"]
    Measurement = "iis_websvc_cache"
    #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).`

配置好后,重启 DataKit 即可生效

采集指标

指标集 iis_aspnet

tags

名称
instance
objectname

fileds

名称 类型
Application_Restarts float
Request_Wait_Time float
Requests_Current float
Requests_Queued float
Requests_Rejected float

指标集 iis_aspnet_app

tags

名称
instance
objectname

fileds

名称 类型
Cache_Total_Entries float
Cache_Total_Hit_Ratio float
Cache_Total_Turnover_Rate float
Compilations_Total float
Errors_Total_persec float
Output_Cache_Entries float
Output_Cache_Hit_Ratio float
Output_Cache_Hits float
Output_Cache_Turnover_Rate float
Pipeline_Instance_Count float
Requests_Executing float
Requests_in_Application_Queue float
Requests_persec float

指标集 iis_http_queues

tags

名称
instance
objectname

fileds

名称 类型
CurrentQueueSize float
RejectedRequests float

指标集 iis_websvc

tags

名称
instance
objectname

fileds

名称 类型
Connection_Attempts_persec float
Current_Connections float
Get_Requests_persec float
ISAPI_Extension_Requests_persec float
Post_Requests_persec float

指标集 iis_websvc_cache

tags

名称
instance
objectname

fileds

名称 类型
File_Cache_Hits_Percent float
Kernel:_URI_Cache_Hits_Percent float
URI_Cache_Hits_Percent float