Skip to content

Commit

Permalink
Merge pull request #4 from xstr1/feature/move-const-to-arg
Browse files Browse the repository at this point in the history
move cgroupPath to args
  • Loading branch information
atotto authored Feb 11, 2021
2 parents 0a2f43b + f9a6c01 commit 8af63f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var (
git string

address = flag.String("address", ":48900", "address")
cgroupPath = flag.String("cgroup-path", "/system.slice", "path to cgroup")
enableDocker = flag.Bool("metrics.docker", false, "docker container metrics")
)

Expand All @@ -40,7 +41,7 @@ func main() {
sig := make(chan os.Signal, 1)
signal.Notify(sig, syscall.SIGTERM, syscall.SIGINT)

system, err := cgroups.Load(subsystem, cgroups.StaticPath("/system.slice"))
system, err := cgroups.Load(subsystem, cgroups.StaticPath(*cgroupPath))
if err != nil {
log.Fatalf("cgroups load: %s", err)
}
Expand Down

0 comments on commit 8af63f7

Please sign in to comment.