Skip to content

Infrastructure Integration

Configuration

  1. Install the Win32_PerfFormattedData_W3SVC WMI class to your machine.

    Run the following in powershell.exe:

    install-windowsfeature web-common-http
    

    To make sure that the classes has been installed correctly run:

    Get-WmiObject -List -Namespace root\cimv2 | select -Property name | where name -like "*Win32_PerfFormattedData_W3SVC*"
    

    The output should contain the following:

    Name
    ----
    Win32_PerfFormattedData_W3SVC_WebService
    Win32_PerfFormattedData_W3SVC_WebServiceCache
    Win32_PerfFormattedData_W3SVCW3WPCounterProvider_W3SVCW3WP
    
  2. Resync the WMI counters.

    winmgmt /resyncperf
    
  3. Configure the agent by editing C:\ProgramData\nutanix\epoch-dd-agent\conf.d\iis.yaml and C:\ProgramData\nutanix\epoch-dd-agent\conf.d\wmi_check.yaml:

    Example iis.yaml:

    init_config:
    instances:
      # By default, this check will run against a single instance - the current
      # machine that the Agent is running on. It will check the WMI performance
      # counters for IIS on that machine.
      #
      # If you want to check other remote machines as well, you can add one
      # instance per host. Note: If you also want to check the counters on the
      # current machine, you will have to create an instance with empty params.
      #
      # The optional `provider` parameter allows to specify a WMI provider
      # (default to `32` on dd-agent 32-bit or `64`).It is used to request
      # WMI data from the non-default provider. Available options are: `32` or `64`.
      # For more information: https://msdn.microsoft.com/en-us/library/aa393067(v=vs.85).aspx
      #
      # The `sites` parameter allows you to specify a list of sites you want to
      # read metrics from. With sites specified, metrics will be tagged with the
      # site name. If you don't define any sites, the check will pull the
      # aggregate values across all sites.
      #
      # Here's an example of configuration that would check the current machine
      # and a remote machine called MYREMOTESERVER. For the remote host we are
      # only pulling metrics from the default site.
      #
    
      # "." means the current host
      - host: .
      #   tags:
      #     - myapp1
      #   sites:
      #     - Default Web Site
      #
      # - host: MYREMOTESERVER
      #   username: MYREMOTESERVER\fred
      #   password: mysecretpassword
      #   is_2008: false  # NOTE: because of a typo in IIS6/7 (typically on W2K8)
                  # where perfmon reports TotalBytesTransferred as
                  # TotalBytesTransfered, you may have to enable this
                  # to grab the IIS metrics in that environment.
      #   tags:
      #     - myapp2
      #     - east
      #   sites:
      #     - Default Web Site
    

    Example wmi_check.yaml:

    init_config:
    
    instances:
      # Each WMI query has 2 required options, `class` and `metrics` and six
      # optional options, `host`, `namespace`, `filters`, `tag_by`, `constant_tags` and `tag_queries`.
      #
      # `host` is the optional target of the WMI query, `localhost` is assumed by default
      # if you set this option, make sure that Remote Management is enabled on the target host
      # see https://technet.microsoft.com/en-us/library/Hh921475.aspx for more information
      #
      # `class` is the name of the WMI class, for example Win32_OperatingSystem
      # or Win32_PerfFormattedData_PerfProc_Process. You can find many of the
      # standard class names on the MSDN docs at
      # http://msdn.microsoft.com/en-us/library/windows/desktop/aa394084.aspx.
      # The Win32_FormattedData_* classes provide many useful performance counters
      # by default.
      #
      # `namespace` is the optionnal WMI namespace to connect to (default to `cimv2`).
      #
      # `provider` is the optional WMI provider (default to `32` on Datadog Agent 32-bit or `64`).
      # It is used to request WMI data from the non-default provider. Available options are: `32` or `64`.
      # For more information: https://msdn.microsoft.com/en-us/library/aa393067(v=vs.85).aspx
      #
      # `metrics` is a list of metrics you want to capture, with each item in the
      # list being a set of [WMI property name, metric name, metric type].
      #
      # - The property name is something like `NumberOfUsers` or `ThreadCount`.
      #   The standard properties are also available on the MSDN docs for each
      #   class.
      #
      # - The metric name is the name you want to show up in Datadog.
      #
      # - The metric type is from the standard choices for all agent checks, such
      #   as gauge, rate, histogram or counter.
      #
      # `filters` is a list of filters on the WMI query you may want. For example,
      # for a process-based WMI class you may want metrics for only certain
      # processes running on your machine, so you could add a filter for each
      # process name. You can also use the '%' character as a wildcard.
      # See below for examples.
      #
      # `tag_by` optionally lets you tag each metric with a property from the
      # WMI class you're using. This is only useful when you will have multiple
      # values for your WMI query. The examples below show how you can tag your
      # process metrics with the process name (giving a tag of "name:app_name").
      #
      # `constant_tags` optionally lets you tag each metric with a set of fixed values.
      #
      # `tag_queries` optionally lets you specify a list of queries, to tag metrics
      # with a target class property. Each item in the list is a set of
      # [link source property, target class, link target class property, target property]
      # where:
      #
      # - 'link source property' contains the link value
      #
      # - 'target class' is the class to link to
      #
      # - 'link target class property' is the target class property to link to
      #
      # - 'target property' contains the value to tag with
      #
      # It translates to a WMI query:
      # SELECT 'target property' FROM 'target class'
      #                 WHERE 'link target class property' = 'link source property'
      #
      # Note: setting this will cause any instance number to be removed from tag_by values
      # i.e. name:process#1 => name:process
      #
      # This feature is available starting with version 5.3 of the agent
    
      # Fetch the number of processes and users.
      - class: Win32_OperatingSystem
        metrics:
          - [NumberOfProcesses, system.proc.count, gauge]
          - [NumberOfUsers, system.users.count, gauge]
          - [MaxProcessMemorySize, system.proc.maxmemory, gauge]
    
      - class: Win32_PerfFormattedData_PerfProc_Process
        metrics:
          - [ThreadCount, iis.threads.count, gauge]
          - [PercentProcessorTime, iis.cpu_pct, gauge]
          - [WorkingSet, iis.working_set, gauge]
        tag_by: Name
        filters:
          - Name: w3wp%
    
      - class: Win32_PerfFormattedData_W3SVC_WebService
        metrics:
          - [TotalAllowedAsyncIORequests, iis.async_io.allowed_req, gauge]
          - [TotalRejectedAsyncIORequests, iis.async_io.rejected_req, gauge]
          - [TotalBlockedAsyncIORequests, iis.async_io.blocked_req, gauge]
          - [TotalCopyRequests, iis.httpd_request_method.copy_total, gauge]
          - [TotalDeleteRequests, iis.httpd_request_method.delete_total, gauge]
          - [TotalGetRequests, iis.httpd_request_method.get_total, gauge]
          - [TotalHeadRequests, iis.httpd_request_method.head_total, gauge]
          - [TotalLockRequests, iis.httpd_request_method.lock_total, gauge]
          - [TotalMethodRequests, iis.httpd_request_method.total, gauge]
          - [TotalMoveRequests, iis.httpd_request_method.move_total, gauge]
          - [TotalPostRequests, iis.httpd_request_method.post_total, gauge]
          - [TotalPutRequests, iis.httpd_request_method.put_total, gauge]
          - [TotalSearchRequests, iis.httpd_request_method.search_total, gauge]
          - [TotalTraceRequests, iis.httpd_request_method.trace_total, gauge]
          - [TotalUnlockRequests, iis.httpd_request_method.unlock_total, gauge]
        tag_by: Name
    
      - class: Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues
        metrics:
          - [CurrentQueueSize, iis.requests.queue_size, gauge]
        tag_by: Name
    
      - class: Win32_PerfFormattedData_W3SVCW3WPCounterProvider_W3SVCW3WP
        metrics:
          - [RequestsPerSec, iis.worker.request_persec, gauge]
          - [ActiveThreadsCount, iis.worker.active_threads, gauge]
          - [TotalThreads, iis.worker.total_threads, gauge]
        tag_by: Name
    
  4. Check and make sure that all yaml files are valid with following command:

    & "C:\Program Files\nutanix\epoch\collectors\embedded\python.exe" "C:\Program Files\nutanix\epoch\collectors\agent\agent.py" configcheck
    
  5. Restart the Agent:

    sc stop EpochAgent
    sc start EpochAgent
    

Infrastructure Datasources

Datasource Available Aggregations Integration source Unit Description
iis.uptime avg max min sum iis.yaml second The amount of time the IIS server has been running
iis.net.bytes_sent avg max min sum iis.yaml byte/second The number of bytes served per second
iis.net.bytes_rcvd avg max min sum iis.yaml byte/second The number of bytes received per second
iis.net.bytes_total avg max min sum iis.yaml byte/second The total number of bytes transferred per second
iis.net.num_connections avg max min sum iis.yaml connection The number of active connections
iis.net.files_sent avg max min sum iis.yaml file/second The number of files sent per second
iis.net.files_rcvd avg max min sum iis.yaml file/second The number of files received per second
iis.threads.count avg max min sum wmi_check.yaml threads The number of threads belonging to an IIS process
iis.cpu_pct avg max min sum wmi_check.yaml percentage The percentage of processor time used by an IIS process
iis.working_set avg max min sum wmi_check.yaml bytes Maximum number, in bytes, in the working set of an IIS process
iis.async_io.allowed_req avg max min sum wmi_check.yaml request The total number of allowed async IO requests
iis.async_io.rejected_req avg max min sum wmi_check.yaml request The total number of rejected async IO requests
iis.async_io.blocked_req avg max min sum wmi_check.yaml request The total number of blocked async IO requests
iis.requests.queue_size avg max min sum wmi_check.yaml request The number of requests in queue
iis.requests.cgi avg max min sum iis.yaml request/second The number of Common Gateway Interface requests executed per second
iis.requests.isapi avg max min sum iis.yaml request/second The number of ISAPI requests executed per second
iis.worker.request_persec avg max min sum wmi_check.yaml request The number of all requests per second per worker process
iis.worker.active_threads avg max min sum wmi_check.yaml request The number of active threads per worker process
iis.worker.total_threads avg max min sum wmi_check.yaml request The total number of threads per worker process
iis.net.connection_attempts avg max min sum iis.yaml connection/second The number of connection attempts per second
iis.httpd_request_method.get avg max min sum iis.yaml request/second The number of GET requests per second
iis.httpd_request_method.post avg max min sum iis.yaml request/second The number of POST requests per second
iis.httpd_request_method.head avg max min sum iis.yaml request/second The number of HEAD requests per second
iis.httpd_request_method.put avg max min sum iis.yaml request/second The number of PUT requests per second
iis.httpd_request_method.delete avg max min sum iis.yaml request/second The number of DELETE requests per second
iis.httpd_request_method.options avg max min sum iis.yaml request/second The number of OPTIONS requests per second
iis.httpd_request_method.trace avg max min sum iis.yaml request/second The number of TRACE requests per second
iis.httpd_request_method.total avg max min sum wmi_check.yaml request The total number of all requests
iis.httpd_request_method.copy_total avg max min sum wmi_check.yaml request The total number of COPY requests
iis.httpd_request_method.delete_total avg max min sum wmi_check.yaml request The total number of DELETE requests
iis.httpd_request_method.get_total avg max min sum wmi_check.yaml request The total number of GET requests
iis.httpd_request_method.head_total avg max min sum wmi_check.yaml request The total number of HEAD requests
iis.httpd_request_method.lock_total avg max min sum wmi_check.yaml request The total number of LOCK requests
iis.httpd_request_method.move_total avg max min sum wmi_check.yaml request The total number of MOVE requests
iis.httpd_request_method.post_total avg max min sum wmi_check.yaml request The total number of POST requests
iis.httpd_request_method.put_total avg max min sum wmi_check.yaml request The total number of PUT requests
iis.httpd_request_method.search_total avg max min sum wmi_check.yaml request The total number of SEARCH requests
iis.httpd_request_method.trace_total avg max min sum wmi_check.yaml request The total number of TRACE requests
iis.iis.httpd_request_method.unlock_total avg max min sum wmi_check.yaml request The total number of UNLOCK requests
iis.errors.not_found avg max min sum iis.yaml error/second The number of not found errors per second (typically reported as an HTTP 404 response code)
iis.errors.locked avg max min sum iis.yaml error/second The number of locked errors per second (typically reported as an HTTP 423 response code)
iis.users.anon avg max min sum iis.yaml request/second The number of requests from users over an anonymous connection per second
iis.users.nonanon avg max min sum iis.yaml request/second The number of requests from users over a non-anonymous connection per second