{"action":"created","issue":{"url":"https://api.github.com/repos/firehol/netdata/issues/43","labels_url":"https://api.github.com/repos/firehol/netdata/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/firehol/netdata/issues/43/comments","events_url":"https://api.github.com/repos/firehol/netdata/issues/43/events","html_url":"https://github.com/firehol/netdata/issues/43","id":125855287,"number":43,"title":"Docker and Apps plugin","user":{"login":"titpetric","id":233360,"avatar_url":"https://avatars.githubusercontent.com/u/233360?v=3","gravatar_id":"","url":"https://api.github.com/users/titpetric","html_url":"https://github.com/titpetric","followers_url":"https://api.github.com/users/titpetric/followers","following_url":"https://api.github.com/users/titpetric/following{/other_user}","gists_url":"https://api.github.com/users/titpetric/gists{/gist_id}","starred_url":"https://api.github.com/users/titpetric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titpetric/subscriptions","organizations_url":"https://api.github.com/users/titpetric/orgs","repos_url":"https://api.github.com/users/titpetric/repos","events_url":"https://api.github.com/users/titpetric/events{/privacy}","received_events_url":"https://api.github.com/users/titpetric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-11T00:10:51Z","updated_at":"2016-01-11T12:36:06Z","closed_at":null,"body":"The Apps section of netdata doesn't give correct output when run with docker. Only \"netdata\" process is graphed. The process is run with -ch /host, data is mapped to container:\r\n\r\n```\r\nroot@071d0f31f366:/host/proc# awk 'FNR==1{print \"\"}1' */cmdline | grep ^/\r\n/sbin/init\r\n/usr/sbin/dovecot\r\n/lib/systemd/systemd-journald\r\n/lib/systemd/systemd-udevd\r\n/usr/lib/postfix/master\r\n/bin/sh\r\n/usr/sbin/mysqld\r\n/usr/sbin/sshd\r\n/usr/bin/redis-server 127.0.0.1:6379\r\n/bin/bash\r\n/usr/sbin/cron\r\n/bin/bash\r\n/usr/sbin/rsyslogd\r\n/bin/bash\r\n/usr/local/usr/sbin/netdata\r\n/usr/local/usr/libexec/netdata/plugins.d/apps.plugin\r\n/bin/bash\r\n/sbin/rpcbind\r\n/sbin/rpc.statd\r\n/usr/sbin/rpc.idmapd\r\n/usr/sbin/atd\r\n/lib/systemd/systemd-logind\r\n/usr/bin/dbus-daemon\r\n/usr/sbin/acpid\r\n/sbin/agetty\r\n/root/.dropbox-dist/dropbox-lnx.x86_64-3.12.5/dropbox\r\n```\r\n\r\nIt seems the basic problem is that apps.plugin doesn't support -ch prefix yet?\r\nOpening apps_plugin.c confirms this:\r\n\r\n```\r\n// 1. support -ch option to set global /proc and /sys prefix\r\n```"},"comment":{"url":"https://api.github.com/repos/firehol/netdata/issues/comments/170530932","html_url":"https://github.com/firehol/netdata/issues/43#issuecomment-170530932","issue_url":"https://api.github.com/repos/firehol/netdata/issues/43","id":170530932,"user":{"login":"ktsaou","id":2662304,"avatar_url":"https://avatars.githubusercontent.com/u/2662304?v=3","gravatar_id":"","url":"https://api.github.com/users/ktsaou","html_url":"https://github.com/ktsaou","followers_url":"https://api.github.com/users/ktsaou/followers","following_url":"https://api.github.com/users/ktsaou/following{/other_user}","gists_url":"https://api.github.com/users/ktsaou/gists{/gist_id}","starred_url":"https://api.github.com/users/ktsaou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktsaou/subscriptions","organizations_url":"https://api.github.com/users/ktsaou/orgs","repos_url":"https://api.github.com/users/ktsaou/repos","events_url":"https://api.github.com/users/ktsaou/events{/privacy}","received_events_url":"https://api.github.com/users/ktsaou/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T12:36:06Z","updated_at":"2016-01-11T12:36:06Z","body":"There is no `-ch` option. Netdata passes the environment variable `NETDATA_HOST_PREFIX` to its childs, which apps.plugin reads.\r\n\r\nYour netdata is not setuid to root, this is why it can only see netdata itself. Do this:\r\n\r\n```\r\nchown root:root /usr/libexec/netdata/plugins.d/apps.plugin\r\nchmod 4755 /usr/libexec/netdata/plugins.d/apps.plugin\r\n```\r\n\r\nand restart netdata.\r\n"}}