Skip to content

Commit

Permalink
Add config specs (#8109)
Browse files Browse the repository at this point in the history
* Add config specs

* Fix typoe

* Resync after rebase
  • Loading branch information
FlorianVeaux authored Dec 2, 2020
1 parent 587cd69 commit 4288187
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 35 deletions.
71 changes: 71 additions & 0 deletions iis/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: IIS
files:
- name: iis.yaml
options:
- template: init_config
options:
- template: init_config/default
- template: instances
options:
- name: sites
required: false
display_priority: 1
description: |
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.
value:
example:
- <WEB_SITE_1>
- <WEB_SITE_2>
type: array
compact_example: false
items:
type: string
- name: app_pools
required: false
display_priority: 1
description: |
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.
value:
example:
- <APP_POOL_1>
- <APP_POOL_2>
type: array
compact_example: false
items:
type: string
- name: is_2008
required: false
display_priority: 1
description: |
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.
value:
example: false
type: boolean
- template: instances/pdh
overrides:
host.required: true
host.display_priority: 2
username.display_priority: 2
password.display_priority: 2
host.description: |
By default, this check runs against a single instance - the current
machine that the Agent is running on. It checks the PDH (Performance
Data Helper) performance counters for IIS on that machine.
"." means the current host, any other value makes the Agent attempt to connect to a remote host.
Note: Remote access requires additional permissions.
additional_metrics.value.example:
- ['Web Service', none, 'CGI Requests/sec', iis.httpd_request_method.cgi, gauge]
- template: instances/default
- template: logs
example:
- type: file
path: C:\inetpub\logs\LogFiles\W3SVC1\u_ex*
source: iis
115 changes: 80 additions & 35 deletions iis/datadog_checks/iis/data/conf.yaml.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## All options defined here are available to all instances.
#
init_config:

## @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 host - string - required
Expand All @@ -8,21 +19,21 @@ instances:
## Data Helper) performance counters for IIS on that machine.
##
## "." means the current host, any other value makes the Agent attempt to connect to a remote host.
## Note: Remote access requires additional permissions -
## Note: Remote access requires additional permissions.
#
- host: .

## @param username - string - optional
## Username for the remote access.
## The username from the credentials needed to connect to the host.
#
# username: <USERNAME>

## @param password - string - optional
## Password for the remote access.
## The password from the credentials needed to connect to the host.
#
# password: <PASSWORD>

## @param sites - list of string - optional
## @param sites - list of strings - 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
Expand All @@ -32,7 +43,7 @@ instances:
# - <WEB_SITE_1>
# - <WEB_SITE_2>

## @param app_pools - list of string - optional
## @param app_pools - list of strings - 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
Expand All @@ -42,52 +53,86 @@ instances:
# - <APP_POOL_1>
# - <APP_POOL_2>

## @param tags - list of key:value elements - optional
## List of tags to attach to every metric, event and service check emitted by this integration.
##
## Learn more about tagging: https://docs.datadoghq.com/tagging/
## @param is_2008 - boolean - optional - default: false
## 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:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>
# is_2008: false

## @param additional_metrics - list of strings - optional
## PDH provides hundreds of metrics for each service. Additional metrics
## can be specified using the `additional_metrics` configuration.
## The additional metrics is a list of additional counters to collect. The
## list is formatted as follows:
## @param additional_metrics - list of lists - optional
## The additional metrics is a list of items that represent additional counters to collect.
## Each item is a list of strings, formatted as follows:
##
## ['<COUNTERSET_NAME>', <COUNTER_INSTANCE_NAME>, '<COUNTER_NAME>', <METRIC_NAME>, <METRIC_TYPE>]
##
## <COUNTERSET_NAME> is the name of the PDH Counter Set (the name of the counter).
## <COUNTERSET_NAME> is the name of the PDH counter set (the name of the counter).
## <COUNTER_INSTANCE_NAME> is the specific counter instance to collect, for example
## "Default Web Site". Specify 'none' For all instances of the counter.
## "Default Web Site". Specify 'none' for all instances of
## the counter.
## <COUNTER_NAME> is the individual counter to report.
## <METRIC_NAME> is the name you want to show up in Datadog.
## <METRIC_TYPE> is from the standard choices for all agent checks, such as gauge,
## rate, histogram or counter
## <METRIC_NAME> is the name that displays in Datadog.
## <METRIC_TYPE> is from the standard choices for all Agent checks, such as gauge,
## rate, histogram, or count.
#
# additional_metrics:
# - ['Web Service', none, 'CGI Requests/sec', iis.httpd_request_method.cgi, gauge]
# - [Web Service, none, CGI Requests/sec, iis.httpd_request_method.cgi, gauge]

## @param is_2008 - boolean - optional - default: false
## Necause 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.
## @param counter_data_types - list of strings - optional
## counter_data_types is a list of <METRIC_NAME>,<DATA_TYPE> elements that
## allow the precision in which counters are queried on a per metric basis.
## <METRIC_NAME>: The name of your metric
## <DATA_TYPE> : The type of your metric (int or float)
#
# is_2008: false
# counter_data_types:
# - <METRIC_NAME>,<DATA_TYPE>
# - processor.time,int
# - processor.user.time,float

## @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

## Log Section (Available for Agent >=6.0)
## @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

## Log Section
##
## type - mandatory - Type of log input source (tcp / udp / file / windows_event)
## port / path / channel_path - mandatory - Set port if type is tcp or udp. Set path if type is file. Set channel_path if type is windows_event
## service - mandatory - Name of the service that generated the log
## source - mandatory - Attribute that defines which Integration sent the logs
## tags: - optional - Add tags to the collected logs
## 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*
# service: iis
# source: iis
3 changes: 3 additions & 0 deletions iis/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"type": "check",
"integration_id": "iis",
"assets": {
"configuration": {
"spec": "assets/configuration/spec.yaml"
},
"monitors": {},
"dashboards": {},
"saved_views": {
Expand Down

0 comments on commit 4288187

Please sign in to comment.