Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JMX config spec #9364

Merged
merged 1 commit into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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