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

Filter out uninstalled systemd units when collecting all units #1011

Merged
merged 1 commit into from
Jul 22, 2018
Merged

Filter out uninstalled systemd units when collecting all units #1011

merged 1 commit into from
Jul 22, 2018

Conversation

xginn8
Copy link
Contributor

@xginn8 xginn8 commented Jul 19, 2018

fixes #567

Signed-off-by: xginn8 mamcgi@gmail.com

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Nice, LGTM.

CHANGELOG.md Outdated
@@ -2,7 +2,7 @@

**Breaking changes**

* [CHANGE]
* [CHANGE] Filter out non-installed units when collecting all systemd units #567
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit, this should be #1011 to reference the PR, not the issue.

@xginn8
Copy link
Contributor Author

xginn8 commented Jul 19, 2018

gah, sorry about that! fixed in the most recent push.

@@ -227,7 +227,8 @@ func (c *systemdCollector) getAllUnits() ([]unit, error) {
}
defer conn.Close()

allUnits, err := conn.ListUnits()
// filter out any units that are not installed (pulled in only as dependencies)
Copy link
Member

Choose a reason for hiding this comment

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

Please make comments full sentences, start with capitol and end with a ..

@xginn8
Copy link
Contributor Author

xginn8 commented Jul 19, 2018

fixed up the comment, @SuperQ PTAL

@SuperQ
Copy link
Member

SuperQ commented Jul 21, 2018

It looks like the CircleCI outage caused the build request to get lost. I guess you could push a commit and then roll it back to trigger a rebuild.

fixes #567

Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
@xginn8
Copy link
Contributor Author

xginn8 commented Jul 22, 2018

@SuperQ builds are passing again, thanks for the heads up!

@SuperQ SuperQ merged commit 140b8b8 into prometheus:master Jul 22, 2018
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
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.

systemd collector exports unavailable units referenced by other units
2 participants