{"action":"created","issue":{"url":"https://api.github.com/repos/google/cadvisor/issues/504","labels_url":"https://api.github.com/repos/google/cadvisor/issues/504/labels{/name}","comments_url":"https://api.github.com/repos/google/cadvisor/issues/504/comments","events_url":"https://api.github.com/repos/google/cadvisor/issues/504/events","html_url":"https://github.com/google/cadvisor/issues/504","id":57720746,"number":504,"title":"Error: not enough arguments in call to theConn.StartTransientUnit","user":{"login":"knodir","id":1505903,"avatar_url":"https://avatars.githubusercontent.com/u/1505903?v=3","gravatar_id":"","url":"https://api.github.com/users/knodir","html_url":"https://github.com/knodir","followers_url":"https://api.github.com/users/knodir/followers","following_url":"https://api.github.com/users/knodir/following{/other_user}","gists_url":"https://api.github.com/users/knodir/gists{/gist_id}","starred_url":"https://api.github.com/users/knodir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knodir/subscriptions","organizations_url":"https://api.github.com/users/knodir/orgs","repos_url":"https://api.github.com/users/knodir/repos","events_url":"https://api.github.com/users/knodir/events{/privacy}","received_events_url":"https://api.github.com/users/knodir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-15T06:55:17Z","updated_at":"2015-02-16T00:09:09Z","closed_at":null,"body":"Hello,\r\n\r\nI am trying to use [Go client](https://github.com/google/cadvisor/tree/master/client) to get the status of my Docker instances. However, I get following error message when I execute \r\n\r\n`$ go get github.com/google/cadvisor/manager`\r\n\\# github.com/docker/libcontainer/cgroups/systemd\r\n.gvm/pkgsets/go1.4/global/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go:64: not enough arguments in call to theConn.StartTransientUnit\r\n.gvm/pkgsets/go1.4/global/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go:76: not enough arguments in call to theConn.StartTransientUnit\r\n.gvm/pkgsets/go1.4/global/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go:145: not enough arguments in call to theConn.StartTransientUnit\r\n\r\nI have [Docker-maintained](https://docs.docker.com/installation/ubuntulinux/) Ubuntu package. Here is the output from `$ docker version`\r\nClient version: 1.5.0\r\nClient API version: 1.17\r\nGo version (client): go1.4.1\r\nGit commit (client): a8a31ef\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.5.0\r\nServer API version: 1.17\r\nGo version (server): go1.4.1\r\nGit commit (server): a8a31ef\r\n\r\nThe latest version of Go installed via [gvm](http://www.hostingadvice.com/how-to/install-golang-on-ubuntu/). Output from  `$ go version` is\r\ngo version go1.4 linux/amd64\r\n\r\nAny help is appreciated,\r\nNodir."},"comment":{"url":"https://api.github.com/repos/google/cadvisor/issues/comments/74445268","html_url":"https://github.com/google/cadvisor/issues/504#issuecomment-74445268","issue_url":"https://api.github.com/repos/google/cadvisor/issues/504","id":74445268,"user":{"login":"vmarmol","id":985208,"avatar_url":"https://avatars.githubusercontent.com/u/985208?v=3","gravatar_id":"","url":"https://api.github.com/users/vmarmol","html_url":"https://github.com/vmarmol","followers_url":"https://api.github.com/users/vmarmol/followers","following_url":"https://api.github.com/users/vmarmol/following{/other_user}","gists_url":"https://api.github.com/users/vmarmol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarmol/subscriptions","organizations_url":"https://api.github.com/users/vmarmol/orgs","repos_url":"https://api.github.com/users/vmarmol/repos","events_url":"https://api.github.com/users/vmarmol/events{/privacy}","received_events_url":"https://api.github.com/users/vmarmol/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T00:09:09Z","updated_at":"2015-02-16T00:09:09Z","body":"Ah I see, you're trying to connect and query a running cAdvisor. For that you will need to use the client as you mentioned. Don't use the `manager` or `pages/container.go` those are part of the implementation of cAdvisor and won't be quite useful outside of it. The client will query cAdvisor through the REST API and return the results. For your example you should be able to do something like this:\r\n\r\n```Go\r\npackage main\r\nimport (\"fmt\"\r\n    \"os\"\r\n    \"github.com/google/cadvisor/client\"\r\n)\r\n\r\nfunc checkFail(msg string, err error, terminate bool) {\r\n    if err != nil {\r\n        fmt.Printf(\"%s: %s\\n\", msg, err)\r\n        if terminate {\r\n            os.Exit(0)\r\n        }\r\n    }\r\n} \r\n\r\nfunc main() {\r\n    containerName := \"LONG_IMAGE_ID\"\r\n    request := info.ContainerInfoRequest{2}\r\n\r\n    client, err := client.NewClient(\"http://<address of cAdvisor, localhost for local>:<port for cAdvisor, default is 8080>/\")\r\n    checkFail(\"Failed to get cAdvisor client\", err, true)\r\n\r\n    // Since we specifically want a Docker container, else use ContainerInfo().\r\n    cont, err := client.DockerContainer(containerName, &request)\r\n    checkFail(\"Failed to get container\", err, false)\r\n\r\n    displayName := getContainerDisplayName(cont.ContainerReference)\r\n    fmt.Println(\"\\ndisplayName = \", displayName)\r\n}\r\n```\r\n\r\nWhat parts of `pages/container.go` were you interested in? It may make sense to break those appart. We've been moving away from code there and rather do most of the work in the JavaScript UI where we can be more dynamic."}}