Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network: passing multiple instances to network monitor increases counts #98

Closed
miketheman opened this issue Jan 31, 2014 · 0 comments
Closed
Assignees
Milestone

Comments

@miketheman
Copy link
Contributor

Currently, the method for passing a network config matches all others, however this adds to the instances array.
This should not map to the same, rather only a single entry can work for monitoring the network state of an instance.

a role:

default_attributes(
  'datadog' => {
    'network' => {
      'instances' => [
        {
          'collect_connection_state' => 'true',
          'excluded_interfaces' => ['lo', 'lo0']
        }
      ]
    }
  },
)

Along with the default attributes file network.rb will result in the following yaml:

init_config:

instances:
 - collect_connection_state: false
   excluded_interfaces:
     - lo
     - lo0
 - collect_connection_state: true
   excluded_interfaces:
     - lo
     - lo0
@ghost ghost assigned miketheman Jan 31, 2014
remh added a commit to DataDog/dd-agent that referenced this issue Jan 31, 2014
miketheman added a commit that referenced this issue Mar 21, 2014
n1koo pushed a commit to Shopify/chef-datadog that referenced this issue Oct 20, 2014
As reported in DataDog#98, it is possible to abuse attributes in a manner that
the netowkr check will contain multiple instances.
This change will raise the problem to the user as a WARN, but still
enable them to render an incorrect file, as we don't know which
attribute invocation they would want.

A simpler workaround is to use override_attributes where necessary, as
the default_attributes may be getting appended to the exisiting default
array, as definced in the attributes/network.rb file.

Fixes DataDog#98
n1koo pushed a commit to Shopify/chef-datadog that referenced this issue Oct 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant