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

Check float metrics against gauges list #6008

Merged

Conversation

andrewkroh
Copy link
Member

Float metrics were not checked against the list of gauge values so the CPU and Load metrics were logged incorrectly. By default the difference between the current and last value are reported in the logs. But if a value is whitelisted as a gauge then it reports the raw value instead. Only the int values were being checked. Now the float64 values are checked too.

Float metrics were not checked against the list of gauge values so the CPU and Load metrics were logged incorrectly. By default the difference between the current and last value are reported in the logs. But if a value is whitelisted as a gauge then it reports the raw value instead. Only the int values were being checked. Now the float64 values are checked too.
@andrewkroh
Copy link
Member Author

andrewkroh commented Jan 7, 2018

This should fix the negative load values I was seeing in my logs on macOS.

      "system": {
        "cpu": {
          "total": {
            "norm": {
              "pct": 0.027100000000000013
            },
            "pct": 0.2168
          }
        },
        "load": {
          "1": -0.14749999999999996,
          "norm": {
            "1": -0.0184
          }
        }
      }

Copy link
Contributor

@tsg tsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tsg tsg merged commit 7f14858 into elastic:master Jan 7, 2018
@andrewkroh andrewkroh deleted the bugfix/libbeat/monitoring-float-gauges branch January 17, 2018 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants