Giter Site home page Giter Site logo

Comments (7)

miketheman avatar miketheman commented on June 30, 2024

The documentation update in b99f426 is incorrect, from a year ago.

Using this flag will use the instance ID in the Chef Handler, as seen here: b99f426 and this does indeed work (I tested it a lot) that passing somenodename to the Agent, and passing true to the Chef attribute of use_ec2_instance_id results in the event & metrics being sent with the instance ID.

If the incorrectness is in the documentation, that's an easy fix. If the desire is to have the flag control more than the handler, and directly affect the other hostname-related attribute added in 6be7869 , then I think I need a clearer case, since the title states something other than the description.

from chef-datadog.

sethrosenblum avatar sethrosenblum commented on June 30, 2024

Sorry, I renamed the issue for more clarity. The flag definitely is useful for changing the instance id in the chef handler. However, it doesn't cause the agent hostname to be set to the instance ID. It sounds like the problem is probably just in the doc, unless a use case for this flag was mistakenly removed.

from chef-datadog.

miketheman avatar miketheman commented on June 30, 2024

Thanks for updating!

So now we can do one of two things (or more?):

  1. We can update the docs to reflect that the flag only affects the Handler, not the Agent. Easy as 𝜋.
  2. We can make a decision to leverage the Cookbook's invocation of passing along the hostname variable, by default set to node.name, to the Handler, and using that, per DataDog/chef-handler-datadog#41

I think the second one makes more sense, but I wanted to ensure I understand the needs before changing the default behavior for the Handler, with a backup to node.name.

Thoughts?

from chef-datadog.

sethrosenblum avatar sethrosenblum commented on June 30, 2024

I agree that 2 makes sense, the chef-handler should just be responding to what we do for the agent, if someone has decided to set their hostname explicitly, we should follow that example for submitting chef metrics.

from chef-datadog.

miketheman avatar miketheman commented on June 30, 2024

Ok, I think we're on the same page there.

Now we come with the interesting part: should use_ec2_instance_id override the Agent's configuration for hostname?

from chef-datadog.

sethrosenblum avatar sethrosenblum commented on June 30, 2024

Can we get rid of use_ec2_instance_id? If someone's already explicitly set the agent hostname to something else we shouldn't need to override it. The agent's default hostname (node.name) starts out as the instance ID on AWS hosts, correct?

from chef-datadog.

miketheman avatar miketheman commented on June 30, 2024

So the flag is pretty much as old as time, in a couple of invocations:
38cd6df
a051ee3
6b08f32

I'm thinking that removal may produce potentially undesirable results.

The node.name is set by default in the cookbook, as well as in the hander, so I think the logic of using use_ec2_instance_id should trump all other cases.

from chef-datadog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.