Giter Site home page Giter Site logo

Comments (4)

olivielpeau avatar olivielpeau commented on July 17, 2024

Hi @vpilania,

Can you confirm that, in datadog.yaml, the hostname: field is not specified or has an empty value?

If so, then the cookbook works as expected to make the Agent autodetect its hostname, so please open a case with our support team and send them a flare so that our support team has all the necessary information to look into your issue.

Thanks!

from chef-datadog.

vpilania avatar vpilania commented on July 17, 2024

hostname: field is not empty when I run but captures Name of the instance and not for example 'i-abcw123eqe' which I expect!

from chef-datadog.

olivielpeau avatar olivielpeau commented on July 17, 2024

The default behavior of this cookbook is to set the agent hostname to the Chef node name (node['datadog']['hostname'] = node.name, see default attribute). To set the agent hostname to the AWS instance ID, you can override this default to node.ec2.instance_id, for example with:

 default_attributes(
   'datadog' => {
     'hostname' => node.ec2.instance_id,
     'use_ec2_instance_id' => true
   }
 )

('use_ec2_instance_id' => true is also set here so that the Chef Datadog Handler, if enabled, reports tags, metrics and events using the instance ID as the hostname as well).

Let me know if this solves your issue, thanks.

from chef-datadog.

vpilania avatar vpilania commented on July 17, 2024

image

I'm getting this problem in which hostname is getting registered with two different instance-id out of which one is correct....not sure where it is picking up this - i-00aa96d1c9d27da57 which is incorrect......why would that happen?

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.