Skip to content

Commit

Permalink
Add service option to default configuration (#5805)
Browse files Browse the repository at this point in the history
* Add `service` option to default configuration

* Apply suggestions from code review

Co-Authored-By: ruthnaebeck <19349244+ruthnaebeck@users.noreply.github.com>

Co-authored-by: ruthnaebeck <19349244+ruthnaebeck@users.noreply.github.com>
  • Loading branch information
ofek and ruthnaebeck authored Feb 21, 2020
1 parent 04b311d commit 235f63a
Show file tree
Hide file tree
Showing 16 changed files with 114 additions and 16 deletions.
4 changes: 2 additions & 2 deletions apache/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ files:
- template: init_config
options:
- template: init_config/http
- template: init_config/default
- template: instances
options:
- name: apache_status_url
Expand All @@ -14,8 +15,7 @@ files:
example: http://localhost/server-status?auto
type: string
- template: instances/http
- template: instances/tags
- template: instances/global
- template: instances/default
- template: logs
example:
- type: file
Expand Down
17 changes: 16 additions & 1 deletion apache/datadog_checks/apache/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ init_config:
#
# timeout: 10

## @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:
Expand Down Expand Up @@ -281,6 +288,13 @@ instances:
# - <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
Expand All @@ -300,8 +314,9 @@ instances:
## 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.
## service - required - Name of the service that generated the log
## source - required - Attribute that defines which Integration sent the logs
## service - required - The name of the service that generates the log.
## Overrides any `service` defined in the `init_config` section.
## sourcecategory - optional - Multiple value attribute. Used to refine the source attribute
## tags - optional - Add tags to the collected logs
##
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- template: init_config/service
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: service
value:
type: string
description: |
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.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- template: instances/tags
- template: instances/service
- template: instances/global
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: service
value:
type: string
description: |
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.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ description: |
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.
service - required - Name of the service that generated the log
source - required - Attribute that defines which Integration sent the logs
service - required - The name of the service that generates the log.
Overrides any `service` defined in the `init_config` section.
sourcecategory - optional - Multiple value attribute. Used to refine the source attribute
tags - optional - Add tags to the collected logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ files:
- name: {check_name}.yaml
options:
- template: init_config
options: []
options:
- template: init_config/default
- template: instances
options:
- template: instances/tags
- template: instances/global
- template: instances/default
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#
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:
Expand All @@ -16,6 +23,13 @@ instances:
# - <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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ files:
value:
example: true
type: boolean
- template: init_config/default
- template: instances
options:
- template: instances/tags
- template: instances/global
- template: instances/default
- name: metrics.yaml
example_name: metrics.yaml
options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ init_config:
#
collect_default_metrics: true

## @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:
Expand All @@ -26,6 +33,13 @@ instances:
# - <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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ def test_section_example_indent():
## 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.
## service - required - Name of the service that generated the log
## source - required - Attribute that defines which Integration sent the logs
## service - required - The name of the service that generates the log.
## Overrides any `service` defined in the `init_config` section.
## sourcecategory - optional - Multiple value attribute. Used to refine the source attribute
## tags - optional - Add tags to the collected logs
##
Expand Down Expand Up @@ -842,6 +843,13 @@ def test_template_recursion():
# - <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
Expand Down
4 changes: 2 additions & 2 deletions kong/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ files:
- template: init_config
options:
- template: init_config/http
- template: init_config/default
- template: instances
options:
- name: kong_status_url
Expand All @@ -14,8 +15,7 @@ files:
example: http://localhost:8001/status/
type: string
- template: instances/http
- template: instances/tags
- template: instances/global
- template: instances/default
- template: logs
example:
- type: file
Expand Down
17 changes: 16 additions & 1 deletion kong/datadog_checks/kong/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ init_config:
#
# timeout: 10

## @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:
Expand Down Expand Up @@ -281,6 +288,13 @@ instances:
# - <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
Expand All @@ -300,8 +314,9 @@ instances:
## 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.
## service - required - Name of the service that generated the log
## source - required - Attribute that defines which Integration sent the logs
## service - required - The name of the service that generates the log.
## Overrides any `service` defined in the `init_config` section.
## sourcecategory - optional - Multiple value attribute. Used to refine the source attribute
## tags - optional - Add tags to the collected logs
##
Expand Down
4 changes: 2 additions & 2 deletions vault/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ files:
- template: init_config
options:
- template: init_config/http
- template: init_config/default
- template: instances
options:
- name: api_url
Expand Down Expand Up @@ -36,8 +37,7 @@ files:
example: false
type: boolean
- template: instances/http
- template: instances/tags
- template: instances/global
- template: instances/default
- template: logs
example:
- type: file
Expand Down
17 changes: 16 additions & 1 deletion vault/datadog_checks/vault/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ init_config:
#
# timeout: 10

## @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:
Expand Down Expand Up @@ -302,6 +309,13 @@ instances:
# - <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
Expand All @@ -321,8 +335,9 @@ instances:
## 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.
## service - required - Name of the service that generated the log
## source - required - Attribute that defines which Integration sent the logs
## service - required - The name of the service that generates the log.
## Overrides any `service` defined in the `init_config` section.
## sourcecategory - optional - Multiple value attribute. Used to refine the source attribute
## tags - optional - Add tags to the collected logs
##
Expand Down

0 comments on commit 235f63a

Please sign in to comment.