Skip to content

Instantly share code, notes, and snippets.

@ryanmaclean
Created September 2, 2022 07:02
Show Gist options
  • Save ryanmaclean/f075c01599bc23ac8bb849bb7d12ea33 to your computer and use it in GitHub Desktop.
Save ryanmaclean/f075c01599bc23ac8bb849bb7d12ea33 to your computer and use it in GitHub Desktop.
IIS Datadog Configuration
## All options defined here are available to all instances.
#
init_config:
## @param use_localized_counters - boolean - optional - default: false
## Whether performance object and counter names should refer to their
## locale-specific versions rather than their English name.
#
# use_localized_counters: false
## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
##
## Additionally, this sets the default `service` for every log source.
#
# service: <SERVICE>
## Every instance is scheduled independent of the others.
#
instances:
-
## @param sites - list of strings or mapping - optional
## The `sites` parameter allows you to specify a list of sites you want to
## read metrics from. With sites specified, metrics are tagged with the
## site name. If you don't define any sites, the check pulls all of the
## sites, and tags each one with the site name.
##
## On Agent versions 7.34 or higher, this may also be defined as a mapping
## with `include` and/or `exclude` keys representing arrays of regular
## expressions strings.
#
# sites:
# include:
# - <PATTERN_1>
# - <PATTERN_2>
# exclude:
# - <PATTERN_1>
# - <PATTERN_2>
## @param app_pools - list of strings or mapping - optional
## The `app_pools` parameter allows you to specify a list of application pools you want to
## read metrics from. With application pools specified, metrics are tagged with the
## application pool name. If you don't define any application pools, the check pulls all of the
## application pools, and tags each one with the application pool name.
##
## On Agent versions 7.34 or higher, this may also be defined as a mapping
## with `include` and/or `exclude` keys representing arrays of regular
## expressions strings.
#
# app_pools:
# include:
# - <PATTERN_1>
# - <PATTERN_2>
# exclude:
# - <PATTERN_1>
# - <PATTERN_2>
## @param server - string - optional
## The server with which to connect, defaulting to the local machine.
#
# server: <SERVER>
## @param username - string - optional
## The username used to connect to the `server`.
#
# username: <USERNAME>
## @param password - string - optional
## The password of `username`.
#
# password: <PASSWORD>
## @param enable_health_service_check - boolean - optional - default: true
## Whether or not to send a service check named `<NAMESPACE>.windows.perf.health`, which reports
## the health of the `server`.
#
# enable_health_service_check: true
## @param server_tag - string - optional
## The name used for tagging `server`. The value defined here replaces the `server:` tag key.
#
# server_tag: <SERVER_TAG>
## @param extra_metrics - mapping - optional
## This mapping defines which metrics to collect from the performance
## counters on the `server`. For more information, see:
## https://docs.microsoft.com/en-us/windows/win32/perfctrs/about-performance-counters
##
## The top-level keys are the names of the desired performance objects:
##
## metrics:
## System:
## <OPTION_1>: ...
## <OPTION_2>: ...
## LogicalDisk:
## <OPTION_1>: ...
## <OPTION_2>: ...
##
## The available performance object options are:
##
## name (required): This becomes the prefix of all metrics submitted for each counter.
## counters (required): This is the list of counters to collect.
## tag_name: This is the name of the tag used for instances. For example, if the tag name for
## the `LogicalDisk` performance object is `disk`, a possible tag would be `disk:C`.
## If not set, the default tag name is `instance`.
## include: This is the list of regular expressions used to select which instances to monitor.
## If not set, all instances are monitored.
## exclude: This is the list of regular expressions used to select which instances to ignore.
## If not set, no instances are ignored. Note: `_Total` instances are always ignored.
## instance_counts: This is a mapping used to select the count of instances to submit, where each
## key is a count type and the value is the metric name to use, ignoring `name`.
## The `total` count type represents the total number of encountered instances.
## The `monitored` count type represents the number of monitored instances after
## `include`/`exclude` filtering. The `unique` count type represents the number
## of unique instance names that are monitored.
## use_localized_counters: Whether or not performance object and counter names should refer to their
## locale-specific versions rather than by their English name. This overrides
## any defined value in `init_config`.
##
## The key for each counter object represents the name of the desired counter.
## Counters can be defined in the following ways:
##
## 1. Mapping the counter name to a string. If a value is a string, then it represents the suffix of the sent metric
## name, for example:
##
## counters:
## - '% Free Space': usable
## - Current Disk Queue Length: queue_length.current
##
## 2. Mapping the counter name to a set of options. If a value is a mapping, then it must have a `name` or
## `metric_name` key that represents the suffix or full metric name of the
## sent metric name, for example:
##
## counters:
## - '% Free Space':
## name: usable
## type: rate
## - Current Disk Queue Length:
## metric_name: queue_length.current
## average: true
##
## The available counter options are:
##
## type: This represents how the metric is handled, defaulting to `gauge`. The available types are:
## gauge, rate, count, monotonic_count, service_check, temporal_percent, and time_elapsed.
## average: When there are multiple values for the same instance name (for example, multiple processes
## spawned with the same name) the check submits the sum. Setting this option to `true`
## instructs the check to calculate the average instead.
## aggregate: Whether or not to send an additional metric that is the aggregation of all values for
## every monitored instance. If `average` is set to `true` the check submits the average as
## a metric suffixed by `avg`, otherwise it submits the sum as a metric suffixed by `sum`.
## If this is set to `only`, the check does not submit a metric per instance.
## metric_name: This represents the full metric name in lieu of a `name` key and is not be prefixed by
## the parent object's `name` key.
#
# extra_metrics:
# Web Service:
# name: httpd_request_method
# counters:
# - CGI Requests/sec: cgi
## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
##
## Learn more about tagging at https://docs.datadoghq.com/tagging
#
# tags:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>
## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
##
## Overrides any `service` defined in the `init_config` section.
#
# service: <SERVICE>
## @param min_collection_interval - number - optional - default: 15
## This changes the collection interval of the check. For more information, see:
## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval
#
# min_collection_interval: 15
## @param empty_default_hostname - boolean - optional - default: false
## This forces the check to send metrics with no hostname.
##
## This is useful for cluster-level checks.
#
# empty_default_hostname: false
## @param metric_patterns - mapping - optional
## A mapping of metrics to include or exclude, with each entry being a regular expression.
##
## Metrics defined in `exclude` will take precedence in case of overlap.
#
# metric_patterns:
# include:
# - <INCLUDE_REGEX>
# exclude:
# - <EXCLUDE_REGEX>
## Log Section
##
## type - required - Type of log input source (tcp / udp / file / windows_event)
## port / path / channel_path - required - Set port if type is tcp or udp.
## Set path if type is file.
## Set channel_path if type is windows_event.
## source - required - Attribute that defines which integration sent the logs.
## encoding - optional - For file specifies the file encoding, default is utf-8, other
## possible values are utf-16-le and utf-16-be.
## service - optional - The name of the service that generates the log.
## Overrides any `service` defined in the `init_config` section.
## tags - optional - Add tags to the collected logs.
##
## Discover Datadog log collection: https://docs.datadoghq.com/logs/log_collection/
#
logs:
- type: file
path: C:\inetpub\logs\LogFiles\W3SVC1\u_ex*
source: iis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment