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

Fix node.by_condition metric #9467

Merged
merged 1 commit into from
Jun 3, 2021
Merged

Fix node.by_condition metric #9467

merged 1 commit into from
Jun 3, 2021

Conversation

L3n41c
Copy link
Member

@L3n41c L3n41c commented Jun 3, 2021

What does this PR do?

Fix the kubernetes.node.by_condition metric introduced by #9311 to make it have the same behaviour as the kubernetes_state_core check.

Motivation

  • The host of the metric were always the host running the agent instead of node concerned by the metric
  • Only the “active” (value == 1) metric must be taken into account.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@L3n41c L3n41c force-pushed the lenaic/ksm_node_by_condition branch from 1fee041 to 75e72d1 Compare June 3, 2021 14:53
@codecov
Copy link

codecov bot commented Jun 3, 2021

Codecov Report

Merging #9467 (75e72d1) into master (ee9a3fe) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Flag Coverage Δ
kubernetes_state 89.69% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
kubernetes_state/tests/test_kubernetes_state.py 97.33% <ø> (ø)
...atadog_checks/kubernetes_state/kubernetes_state.py 84.84% <100.00%> (+0.08%) ⬆️

@L3n41c L3n41c merged commit 6f73443 into master Jun 3, 2021
@L3n41c L3n41c deleted the lenaic/ksm_node_by_condition branch June 3, 2021 15:10
@ofek ofek changed the title KSM: fix node.by_condition metric Fix node.by_condition metric Jun 3, 2021
ofek pushed a commit that referenced this pull request Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants