Skip to content

update excluded_interface_re type to String"#696

Merged
albertvaka merged 2 commits intoDataDog:masterfrom
florusboth:change_excluded_interface_re_type
May 7, 2021
Merged

update excluded_interface_re type to String"#696
albertvaka merged 2 commits intoDataDog:masterfrom
florusboth:change_excluded_interface_re_type

Conversation

@florusboth
Copy link
Copy Markdown
Contributor

What does this PR do?

fix the excluded_interface_re type to string as per documentation in https://github.com/DataDog/integrations-core/blob/master/network/datadog_checks/network/data/conf.yaml.default

Motivation

Current version expected an array of strings which broke the network/conf.yaml file as datadog-agent threw an error

    network (2.1.2)
    ---------------
      Instance ID: network:9358677f0d90eae3 [ERROR]
      Configuration Source: file:/etc/datadog-agent/conf.d/network.d/conf.yaml
      Total Runs: 11
      Metric Samples: Last Run: 0, Total: 0
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 1ms
      Last Execution Date : 2021-05-07 11:02:30 UTC (1620385350000)
      Last Successful Execution Date : Never
      Error: unhashable type: 'list'
      Traceback (most recent call last):
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 897, in run
          self.check(instance)
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/network/network.py", line 105, in check
          self._exclude_iface_re = re.compile(exclude_re)
        File "/opt/datadog-agent/embedded/lib/python3.8/re.py", line 252, in compile
          return _compile(pattern, flags)
        File "/opt/datadog-agent/embedded/lib/python3.8/re.py", line 294, in _compile
          return _cache[type(pattern), pattern, flags]
      TypeError: unhashable type: 'list'

Additional Notes

Describe your test plan

@florusboth florusboth requested a review from a team as a code owner May 7, 2021 11:40
@albertvaka
Copy link
Copy Markdown
Contributor

albertvaka commented May 7, 2021

👋 Hi! Thanks for finding this bug and opening a PR 😃

There are couple more places that need to be updated for this fix to work, though:

Could you give those a look? 🙇

@florusboth
Copy link
Copy Markdown
Contributor Author

of course, thanks for reviewing. I updated the PR with the 2 fixes.
/florus

@albertvaka
Copy link
Copy Markdown
Contributor

Thanks for the quick turnaround 🎉 And thanks again for the fix! Merging ✅

@albertvaka albertvaka merged commit 47741ef into DataDog:master May 7, 2021
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Feb 5, 2026
Current version expected an array of strings which broke
the network/conf.yaml file as datadog-agent threw an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants