• Resolved bagl3y

    (@bagl3y)


    Hello and thank you for this very helpful plugin!

    My WordPress instance is containerized on Kubernetes, so I run one Datadog agent per node.

    The IP address of my node changes depending on which node the container will be created on.

    Is there a way to set an environment variable for the agent URL? In my case (and according to Datadog’s documentation), it would be https://DD_AGENT_HOST:8126

    • This topic was modified 1 year, 2 months ago by bagl3y.
    • This topic was modified 1 year, 2 months ago by bagl3y.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello @bagl3y

    Thank you so much for your kind words.

    You only need agent for traces. For events and metrics it’s direct (without agent). So I assuming you want to propagate traces…

    If I understand well, each node have its own agent. So, why not using https://localhost:8126 or https://127.0.0.1:8126 ?

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    And sorry if I missing something obvious…

    Thread Starter bagl3y

    (@bagl3y)

    Hi Pierre,

    No problem!

    In a container, 127.0.0.1 refers to the container itself, not the node or server on which it is running.

    So, in my case, I have an environment variable, DD_AGENT_HOST, which returns the IP address of the node that can be reached by my container (10.0.0.0/17 CIDR in my case with GCP nodes).

    I hope you understand me well; if not, we can switch to French for better understanding (maybe ^^).

    • This reply was modified 1 year, 2 months ago by bagl3y.
    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hahaha. Of course, you’re right.

    And no, sorry for that, env variable substitution is not (yet?) implemented in DecaLog. But it’s really a very good suggestion.

    Let me some days to think about that ??

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    OK, I think it can be done shortly… Can you, please, open a “Feature Request” issue on Github for my own reference? That’d be great.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Datadog] Environnement Variable for agent URL ?’ is closed to new replies.