diff --git a/activemq/datadog_checks/activemq/data/conf.yaml.example b/activemq/datadog_checks/activemq/data/conf.yaml.example index a2d71342657822..beea5ef461df16 100644 --- a/activemq/datadog_checks/activemq/data/conf.yaml.example +++ b/activemq/datadog_checks/activemq/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/cassandra/datadog_checks/cassandra/config_models/defaults.py b/cassandra/datadog_checks/cassandra/config_models/defaults.py index a5266813e696b9..dc1bc692fa9967 100644 --- a/cassandra/datadog_checks/cassandra/config_models/defaults.py +++ b/cassandra/datadog_checks/cassandra/config_models/defaults.py @@ -4,6 +4,10 @@ from datadog_checks.base.utils.models.fields import get_default_field_value +def shared_collect_default_metrics(field, value): + return True + + def shared_conf(field, value): return get_default_field_value(field, value) diff --git a/cassandra/datadog_checks/cassandra/config_models/shared.py b/cassandra/datadog_checks/cassandra/config_models/shared.py index 58c38f14f65ea5..c650873bbcc1b4 100644 --- a/cassandra/datadog_checks/cassandra/config_models/shared.py +++ b/cassandra/datadog_checks/cassandra/config_models/shared.py @@ -17,7 +17,7 @@ class SharedConfig(BaseModel): class Config: allow_mutation = False - collect_default_metrics: bool + collect_default_metrics: Optional[bool] conf: Optional[Sequence[Mapping[str, Any]]] is_jmx: bool new_gc_metrics: Optional[bool] diff --git a/cassandra/datadog_checks/cassandra/data/conf.yaml.example b/cassandra/datadog_checks/cassandra/data/conf.yaml.example index 30a22590731c92..4826b19fa92a1d 100644 --- a/cassandra/datadog_checks/cassandra/data/conf.yaml.example +++ b/cassandra/datadog_checks/cassandra/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/confluent_platform/datadog_checks/confluent_platform/data/conf.yaml.example b/confluent_platform/datadog_checks/confluent_platform/data/conf.yaml.example index aca86869d8b614..ddaf3f4ded1ed8 100644 --- a/confluent_platform/datadog_checks/confluent_platform/data/conf.yaml.example +++ b/confluent_platform/datadog_checks/confluent_platform/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/jmx.yaml b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/jmx.yaml index 2895ca0b8a839d..fa188775785429 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/jmx.yaml +++ b/datadog_checks_dev/datadog_checks/dev/tooling/templates/configuration/init_config/jmx.yaml @@ -5,7 +5,6 @@ example: true type: boolean - name: collect_default_metrics - required: true description: Whether or not the check should collect all default metrics. value: example: true @@ -21,7 +20,6 @@ value: type: boolean example: false - display_default: false - name: service_check_prefix description: | Custom service check prefix. e.g. `my_prefix` to get a service check called `my_prefix.can_connect`. diff --git a/hazelcast/datadog_checks/hazelcast/data/conf.yaml.example b/hazelcast/datadog_checks/hazelcast/data/conf.yaml.example index 057140b3ab8e1c..dcf043e76a9a7a 100644 --- a/hazelcast/datadog_checks/hazelcast/data/conf.yaml.example +++ b/hazelcast/datadog_checks/hazelcast/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: false - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/hive/datadog_checks/hive/data/conf.yaml.example b/hive/datadog_checks/hive/data/conf.yaml.example index 63d8bb3a7e9979..1444871bbe479d 100644 --- a/hive/datadog_checks/hive/data/conf.yaml.example +++ b/hive/datadog_checks/hive/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/hivemq/datadog_checks/hivemq/data/conf.yaml.example b/hivemq/datadog_checks/hivemq/data/conf.yaml.example index 411a1048ce1010..314d0c59747084 100644 --- a/hivemq/datadog_checks/hivemq/data/conf.yaml.example +++ b/hivemq/datadog_checks/hivemq/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/ignite/datadog_checks/ignite/data/conf.yaml.example b/ignite/datadog_checks/ignite/data/conf.yaml.example index 9234d0613751d4..30bbdd7586789e 100644 --- a/ignite/datadog_checks/ignite/data/conf.yaml.example +++ b/ignite/datadog_checks/ignite/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/jboss_wildfly/datadog_checks/jboss_wildfly/data/conf.yaml.example b/jboss_wildfly/datadog_checks/jboss_wildfly/data/conf.yaml.example index 53a504e08dbed6..105e1d8c75320f 100644 --- a/jboss_wildfly/datadog_checks/jboss_wildfly/data/conf.yaml.example +++ b/jboss_wildfly/datadog_checks/jboss_wildfly/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/kafka/datadog_checks/kafka/config_models/defaults.py b/kafka/datadog_checks/kafka/config_models/defaults.py index a5266813e696b9..dc1bc692fa9967 100644 --- a/kafka/datadog_checks/kafka/config_models/defaults.py +++ b/kafka/datadog_checks/kafka/config_models/defaults.py @@ -4,6 +4,10 @@ from datadog_checks.base.utils.models.fields import get_default_field_value +def shared_collect_default_metrics(field, value): + return True + + def shared_conf(field, value): return get_default_field_value(field, value) diff --git a/kafka/datadog_checks/kafka/config_models/shared.py b/kafka/datadog_checks/kafka/config_models/shared.py index 58c38f14f65ea5..c650873bbcc1b4 100644 --- a/kafka/datadog_checks/kafka/config_models/shared.py +++ b/kafka/datadog_checks/kafka/config_models/shared.py @@ -17,7 +17,7 @@ class SharedConfig(BaseModel): class Config: allow_mutation = False - collect_default_metrics: bool + collect_default_metrics: Optional[bool] conf: Optional[Sequence[Mapping[str, Any]]] is_jmx: bool new_gc_metrics: Optional[bool] diff --git a/kafka/datadog_checks/kafka/data/conf.yaml.example b/kafka/datadog_checks/kafka/data/conf.yaml.example index c4ea0269cc0885..259df589753eb9 100644 --- a/kafka/datadog_checks/kafka/data/conf.yaml.example +++ b/kafka/datadog_checks/kafka/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/presto/datadog_checks/presto/data/conf.yaml.example b/presto/datadog_checks/presto/data/conf.yaml.example index 8f94d58c66ebb8..b293831be2ac5a 100644 --- a/presto/datadog_checks/presto/data/conf.yaml.example +++ b/presto/datadog_checks/presto/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/solr/datadog_checks/solr/data/conf.yaml.example b/solr/datadog_checks/solr/data/conf.yaml.example index b080b7f9a68d86..86b3e7c283fe21 100644 --- a/solr/datadog_checks/solr/data/conf.yaml.example +++ b/solr/datadog_checks/solr/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/sonarqube/datadog_checks/sonarqube/data/conf.yaml.example b/sonarqube/datadog_checks/sonarqube/data/conf.yaml.example index db58ea4eb922bc..268c6835d404d3 100644 --- a/sonarqube/datadog_checks/sonarqube/data/conf.yaml.example +++ b/sonarqube/datadog_checks/sonarqube/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: false - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics. diff --git a/tomcat/datadog_checks/tomcat/config_models/defaults.py b/tomcat/datadog_checks/tomcat/config_models/defaults.py index a5266813e696b9..dc1bc692fa9967 100644 --- a/tomcat/datadog_checks/tomcat/config_models/defaults.py +++ b/tomcat/datadog_checks/tomcat/config_models/defaults.py @@ -4,6 +4,10 @@ from datadog_checks.base.utils.models.fields import get_default_field_value +def shared_collect_default_metrics(field, value): + return True + + def shared_conf(field, value): return get_default_field_value(field, value) diff --git a/tomcat/datadog_checks/tomcat/config_models/shared.py b/tomcat/datadog_checks/tomcat/config_models/shared.py index 58c38f14f65ea5..c650873bbcc1b4 100644 --- a/tomcat/datadog_checks/tomcat/config_models/shared.py +++ b/tomcat/datadog_checks/tomcat/config_models/shared.py @@ -17,7 +17,7 @@ class SharedConfig(BaseModel): class Config: allow_mutation = False - collect_default_metrics: bool + collect_default_metrics: Optional[bool] conf: Optional[Sequence[Mapping[str, Any]]] is_jmx: bool new_gc_metrics: Optional[bool] diff --git a/tomcat/datadog_checks/tomcat/data/conf.yaml.example b/tomcat/datadog_checks/tomcat/data/conf.yaml.example index 33c6e98b430fb3..d1573cde400aed 100644 --- a/tomcat/datadog_checks/tomcat/data/conf.yaml.example +++ b/tomcat/datadog_checks/tomcat/data/conf.yaml.example @@ -7,10 +7,10 @@ init_config: # is_jmx: true - ## @param collect_default_metrics - boolean - required + ## @param collect_default_metrics - boolean - optional - default: true ## Whether or not the check should collect all default metrics. # - collect_default_metrics: true + # collect_default_metrics: true ## @param new_gc_metrics - boolean - optional - default: false ## Set to true to use better metric names for garbage collection metrics.