integrations-core
integrations-core copied to clipboard
Add agent config option to control Window Counter refresh rate
What does this PR do?
Add a param to the agent to control how often window counters should be refreshed.
Codecov Report
Merging #12665 (40975b6) into master (827dd57) will increase coverage by
0.01%
. The diff coverage is0.00%
.
Flag | Coverage Δ | |
---|---|---|
arangodb | 98.21% <ø> (ø) |
|
avi_vantage | 91.92% <ø> (ø) |
|
boundary | 100.00% <ø> (ø) |
|
calico | 83.33% <ø> (ø) |
|
directory | 94.94% <ø> (ø) |
|
external_dns | 89.09% <ø> (ø) |
|
ibm_i | 81.58% <ø> (ø) |
|
kube_controller_manager | 96.85% <ø> (ø) |
|
kube_metrics_server | 100.00% <ø> (ø) |
|
kube_scheduler | 97.14% <ø> (+0.08%) |
:arrow_up: |
linkerd | 85.14% <ø> (+1.14%) |
:arrow_up: |
mapr | 82.70% <ø> (ø) |
|
openldap | 96.33% <ø> (ø) |
|
tcp_check | 91.58% <ø> (+1.13%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Since there is only one WindowsPerformanceObjectRefresher
instance that is shared among all checks that inherit from PerfCountersBaseCheck
there is only ever one interval to be set.
Is it possible to put this code in WindowsPerformanceObjectRefresher
instead of PerfCountersBaseCheck
?
self.interval = datadog_agent.get_config('windows_counter_refresh_interval')
If not, maybe suppress the "Windows Counters refresh interval set to" log message if the interval isn't changing, so we don't get the same message from every check.
@clarkb7 what you said made a lot of sense. Thanks for the feedback. I implemented your suggestion. Feel free to give it a look.
I also added a linked PR for the parameter that will be added in the datadog.yaml
From testing, if we set the interval to 1, then the most frequent we will update will still be 2 if going by the event timestamps. But I don't envision anyone would want to set that to 1.
Unfrozen