diff --git a/agent.py b/agent.py index b8ea95e245..379e154ab1 100755 --- a/agent.py +++ b/agent.py @@ -54,7 +54,8 @@ def run(self, agentConfig=None, run_forever=True): checksd = load_check_directory(agentConfig) # Try to fetch instance Id from EC2 if not hostname has been set - # in the config file + # in the config file. + # DEPRECATED if agentConfig.get('hostname') is None and agentConfig.get('use_ec2_instance_id'): instanceId = EC2.get_instance_id() if instanceId is not None: diff --git a/config.py b/config.py index ff0a840e97..eb9c408b7a 100644 --- a/config.py +++ b/config.py @@ -153,7 +153,7 @@ def get_config(parse_args = True, cfg_path=None, init_logging=False, options=Non 'hostname': None, 'listen_port': None, 'tags': None, - 'use_ec2_instance_id': False, + 'use_ec2_instance_id': False, # DEPRECATED 'version': get_version(), 'watchdog': True, } @@ -229,6 +229,7 @@ def get_config(parse_args = True, cfg_path=None, init_logging=False, options=Non # Debug mode agentConfig['debug_mode'] = config.get('Main', 'debug_mode').lower() in ("yes", "true") + # DEPRECATED if config.has_option('Main', 'use_ec2_instance_id'): use_ec2_instance_id = config.get('Main', 'use_ec2_instance_id') # translate yes into True, the rest into False @@ -510,4 +511,4 @@ def load_check_directory(agentConfig): 'class': check_class }) - return checks \ No newline at end of file + return checks diff --git a/datadog.conf.example b/datadog.conf.example index f0eb0cd982..0794bafa39 100644 --- a/datadog.conf.example +++ b/datadog.conf.example @@ -18,10 +18,6 @@ debug_mode: no # Set the host's tags #tags: mytag0, mytag1 -# Use the amazon EC2 instance-id instead of hostname (unless hostname is -# explicitly set) -use_ec2_instance_id: no - # Use mount points instead of volumes to track disk and fs metrics use_mount: no diff --git a/packaging/datadog-agent/win32/install_files/datadog_win32.conf b/packaging/datadog-agent/win32/install_files/datadog_win32.conf index 5489287716..6c7690bbb2 100644 --- a/packaging/datadog-agent/win32/install_files/datadog_win32.conf +++ b/packaging/datadog-agent/win32/install_files/datadog_win32.conf @@ -18,10 +18,6 @@ debug_mode: no # Set the host's tags #tags: mytag0, mytag1 -# Use the amazon EC2 instance-id instead of hostname (unless hostname is -# explicitly set) -use_ec2_instance_id: yes - # Use mount points instead of volumes to track disk and fs metrics use_mount: no