Skip to content

Commit

Permalink
Fix load_jmx_config utility (DataDog#9369)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored and daanleenders committed May 19, 2021
1 parent 56cde3f commit 7336427
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datadog_checks_dev/datadog_checks/dev/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def load_jmx_config():
example_config = yaml.safe_load(read_file(example_config_path))
metrics_config = yaml.safe_load(read_file(metrics_config_path))

if example_config['init_config'] is None:
example_config['init_config'] = {}

# Avoid having to potentially mount multiple files by putting the default metrics
# in the user-defined metric location.
example_config['init_config']['conf'] = metrics_config['jmx_metrics']
Expand Down

0 comments on commit 7336427

Please sign in to comment.