diff --git a/collector/apt/apt.go b/collector/apt/apt.go index 40d4ac9..b0cf396 100644 --- a/collector/apt/apt.go +++ b/collector/apt/apt.go @@ -33,7 +33,8 @@ func (c *AptCollector) updateInstalledPackages() error { return fmt.Errorf("failed to run apt list: %w (%s)", err, string(out)) } - c.installedPackages = len(strings.Split(strings.TrimSpace(string(out)), "\n")) + // remove the unstable interface warning + c.installedPackages = len(strings.Split(strings.TrimSpace(string(out)), "\n")) - 3 return nil } @@ -50,7 +51,8 @@ func (c *AptCollector) updatePendingUpdates() error { return fmt.Errorf("failed to run apt list: %w (%s)", err, string(out)) } - c.pendingUpdates = len(strings.Split(strings.TrimSpace(string(out)), "\n")) + // remove the unstable interface warning + c.pendingUpdates = len(strings.Split(strings.TrimSpace(string(out)), "\n")) - 3 return nil } diff --git a/collector/systemd/systemd.go b/collector/systemd/systemd.go index af7e488..e1f4d74 100644 --- a/collector/systemd/systemd.go +++ b/collector/systemd/systemd.go @@ -41,7 +41,7 @@ func (c *SystemdCollector) Collect() interface{} { } func (c *SystemdCollector) getServicesStatus() ([]serviceStatus, error) { - out, err := exec.Command("/sbin/systemctl", "list-units", "--output", "json").CombinedOutput() + out, err := exec.Command("/usr/bin/systemctl", "list-units", "--output", "json").CombinedOutput() if err != nil { return nil, fmt.Errorf("failed to run systemd command: %w", err) }