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

Treat session ID as a string in system/users #22359

Merged

Conversation

fearful-symmetry
Copy link
Contributor

What does this PR do?

We should be treating the session ID we get from DBus as a string:

      struct {
         string "106"
         uint32 1000
         string "alexk"
         string ""
         object path "/org/freedesktop/login1/session/_3106"
      }

The value seems to be an int 95% of the time, which is why I probably missed this. I'm still not sure under what circumstances we see a character thrown into the Session ID, but it does happen.

Why is it important?

If the Session ID isn't an int, we'll get an error.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  • Pull down and build
  • On a linux/systemd box, run this metricset and insure that the system.users.id value is a string.

@fearful-symmetry fearful-symmetry added bug needs_backport PR is waiting to be backported to other branches. Team:Integrations Label for the Integrations team labels Nov 2, 2020
@fearful-symmetry fearful-symmetry requested a review from a team November 2, 2020 18:01
@fearful-symmetry fearful-symmetry self-assigned this Nov 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Nov 2, 2020
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

This change looks good. Missing changelog?

@fearful-symmetry fearful-symmetry requested review from kaiyan-sheng and a team November 2, 2020 19:11
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 2, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #22359 updated]

  • Start Time: 2020-11-02T21:39:28.910+0000

  • Duration: 80 min 22 sec

Test stats 🧪

Test Results
Failed 0
Passed 2247
Skipped 508
Total 2755

@elasticmachine
Copy link
Collaborator

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2247
Skipped 508
Total 2755

CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
@fearful-symmetry fearful-symmetry merged commit 7826ef6 into elastic:master Nov 3, 2020
fearful-symmetry added a commit to fearful-symmetry/beats that referenced this pull request Nov 3, 2020
* treat session ID as a string

* add changelog

* Update wording on CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 7826ef6)
@fearful-symmetry fearful-symmetry added v7.10.0 and removed needs_backport PR is waiting to be backported to other branches. labels Nov 3, 2020
fearful-symmetry added a commit to fearful-symmetry/beats that referenced this pull request Nov 3, 2020
* treat session ID as a string

* add changelog

* Update wording on CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 7826ef6)
fearful-symmetry added a commit that referenced this pull request Nov 3, 2020
* treat session ID as a string

* add changelog

* Update wording on CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 7826ef6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Integrations Label for the Integrations team v7.10.0 v7.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants