Skip to content

Commit

Permalink
Fix JMX config spec (#9364)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored May 18, 2021
1 parent 02c6201 commit 657c2e2
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 31 deletions.
4 changes: 2 additions & 2 deletions activemq/datadog_checks/activemq/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions cassandra/datadog_checks/cassandra/config_models/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion cassandra/datadog_checks/cassandra/config_models/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions cassandra/datadog_checks/cassandra/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions hazelcast/datadog_checks/hazelcast/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions hive/datadog_checks/hive/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions hivemq/datadog_checks/hivemq/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions ignite/datadog_checks/ignite/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions kafka/datadog_checks/kafka/config_models/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion kafka/datadog_checks/kafka/config_models/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions kafka/datadog_checks/kafka/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions presto/datadog_checks/presto/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions solr/datadog_checks/solr/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions sonarqube/datadog_checks/sonarqube/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions tomcat/datadog_checks/tomcat/config_models/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tomcat/datadog_checks/tomcat/config_models/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions tomcat/datadog_checks/tomcat/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 657c2e2

Please sign in to comment.