Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

config: shell out to dd-agent to retrieve hostname #242

Merged
merged 1 commit into from Mar 9, 2017
Merged

Commits on Mar 9, 2017

  1. config: shell out to dd-agent to retrieve hostname

    The infrastructure agent implements more refined logic for
    inferring hostname of the machine this process is running on
    https://github.com/DataDog/dd-agent/blob/7cd0986e137683195f129b2a988dd60ca9ccf0ea/utils/hostname.py#L48
    
    Prior to this change, the trace-agent would identify as a different host
    than the infra agent in subtle cases (EC2 / GCE for example). This
    created phantom hosts and general inconsistency in the UI
    
    We shell out to the infra agent, via the following command, falling back
    to running `os.Hostname()` when it fails
    
    ```
    PYTHONPATH=/opt/datadog-agent/agent /opt/datadog-agent/embedded/bin/python -c "from utils.hostname import get_hostname; print get_hostname()"
    ```
    talwai committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    3f46d34 View commit details
    Browse the repository at this point in the history