netdata pam_auth errors

Greetings!

I installed netdata-1.10.0-lp152.3.7.x86_64 and enabled it via systemd. There were few pam related errors related to some plugins that require sudo configuration for netdata to access certain processes for getting statuses.

# systemctl status netdata
● netdata.service - Real time performance monitoring
   Loaded: loaded (/usr/lib/systemd/system/netdata.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-08-28 08:37:16 PDT; 31min ago
  Process: 15752 ExecStartPre=/bin/chown -R netdata:netdata /var/cache/netdata (code=exited, status=0/SUCCESS)
  Process: 15742 ExecStartPre=/bin/mkdir -p /var/cache/netdata (code=exited, status=0/SUCCESS)
 Main PID: 15757 (netdata)
    Tasks: 26
   Memory: 79.6M
   CGroup: /system.slice/netdata.service
           ├─15757 /usr/sbin/netdata -P /run/netdata/netdata.pid -D
           ├─15773 /bin/bash /usr/lib/netdata/plugins.d/tc-qos-helper.sh 1
           ├─15795 /usr/bin/python /usr/lib/netdata/plugins.d/python.d.plugin 1
           └─15796 /usr/lib/netdata/plugins.d/apps.plugin 1

Aug 28 08:37:16 flux systemd[1]: Starting Real time performance monitoring...
Aug 28 08:37:16 flux systemd[1]: Started Real time performance monitoring.
Aug 28 08:37:17 flux sudo[16036]: pam_unix(sudo:auth): conversation failed
Aug 28 08:37:17 flux sudo[16036]: pam_unix(sudo:auth): auth could not identify password for [root]

As per the documentation I edited sudoers file and added

netdata ALL=(ALL)       NOPASSWD: /usr/bin/smbstatus -P

The 'auth could not identify password for [root] error is gone but this error exists -

'pam_unix(sudo:auth): conversation failed'

So sudo needs authentication to execute requested command.

netdata ALL=(ALL)       NOPASSWD: /usr/bin/smbstatus -P

What makes you believe this is the (only) command executed by your application? Check logs which command(s) failed, check application documentation …

sudo logs which user invoked it and which command it tried to execute.

Several plugins failing. I posted on their github issues, checked similar threads; after a careful consideration I have disabled netdata and don’t plan to use it. The recommended/consensus option may end up altering PAM policy and break my server. In my case security is more important than fancy webui. From netdata forums I understood their core concern is not the security.

For the record -

2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/1/io (command 'systemd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/1/fd (command 'systemd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/2/io (command 'kthreadd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/2/fd (command 'kthreadd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/3/io (command 'rcu_gp') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/3/fd (command 'rcu_gp') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/4/io (command 'rcu_par_gp') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/4/fd (command 'rcu_par_gp') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/6/io (command 'kworker/0:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/6/fd (command 'kworker/0:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/8/io (command 'mm_percpu_wq') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/8/fd (command 'mm_percpu_wq') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/9/io (command 'ksoftirqd/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/9/fd (command 'ksoftirqd/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/10/io (command 'rcu_sched') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/10/fd (command 'rcu_sched') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/11/io (command 'migration/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/11/fd (command 'migration/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/12/io (command 'idle_inject/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/12/fd (command 'idle_inject/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/14/io (command 'cpuhp/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/14/fd (command 'cpuhp/0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/15/io (command 'cpuhp/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/15/fd (command 'cpuhp/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/16/io (command 'idle_inject/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/16/fd (command 'idle_inject/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/17/io (command 'migration/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/17/fd (command 'migration/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/18/io (command 'ksoftirqd/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/18/fd (command 'ksoftirqd/1') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/20/io (command 'kworker/1:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/20/fd (command 'kworker/1:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/21/io (command 'cpuhp/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/21/fd (command 'cpuhp/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/22/io (command 'idle_inject/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/22/fd (command 'idle_inject/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/23/io (command 'migration/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/23/fd (command 'migration/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/24/io (command 'ksoftirqd/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/24/fd (command 'ksoftirqd/2') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/26/io (command 'kworker/2:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/26/fd (command 'kworker/2:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/27/io (command 'cpuhp/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/27/fd (command 'cpuhp/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/28/io (command 'idle_inject/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/28/fd (command 'idle_inject/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/29/io (command 'migration/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/29/fd (command 'migration/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/30/io (command 'ksoftirqd/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/30/fd (command 'ksoftirqd/3') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/32/io (command 'kworker/3:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/32/fd (command 'kworker/3:0H-kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/34/io (command 'kdevtmpfs') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/34/fd (command 'kdevtmpfs') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/35/io (command 'netns') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/35/fd (command 'netns') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/36/io (command 'rcu_tasks_kthre') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/36/fd (command 'rcu_tasks_kthre') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/37/io (command 'kauditd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/37/fd (command 'kauditd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/39/io (command 'khungtaskd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/39/fd (command 'khungtaskd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/40/io (command 'oom_reaper') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/40/fd (command 'oom_reaper') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/41/io (command 'writeback') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/41/fd (command 'writeback') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/42/io (command 'kcompactd0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/42/fd (command 'kcompactd0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/43/io (command 'ksmd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/43/fd (command 'ksmd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/44/io (command 'khugepaged') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/44/fd (command 'khugepaged') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/90/io (command 'kintegrityd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/90/fd (command 'kintegrityd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/91/io (command 'kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/91/fd (command 'kblockd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/92/io (command 'blkcg_punt_bio') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/92/fd (command 'blkcg_punt_bio') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/93/io (command 'tpm_dev_wq') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/93/fd (command 'tpm_dev_wq') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/94/io (command 'ata_sff') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/94/fd (command 'ata_sff') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/95/io (command 'edac-poller') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/95/fd (command 'edac-poller') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/96/io (command 'devfreq_wq') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/96/fd (command 'devfreq_wq') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/97/io (command 'watchdogd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/97/fd (command 'watchdogd') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/99/io (command 'kswapd0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/99/fd (command 'kswapd0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/100/io (command 'kworker/u9:0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/100/fd (command 'kworker/u9:0') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/102/io (command 'kthrotld') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/102/fd (command 'kthrotld') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process /proc/103/io (command 'irq/24-PCIe BW ') (errno 13, Permission denied)
2020-08-28 21:07:06: apps.plugin ERROR : MAIN : Cannot process entries in /proc/103/fd (command 'irq/24-PCIe BW ') (errno 13, Permission denied)
2020-08-28 21:07:06: netdata ERROR : PLUGIN[diskspace] : DISKSPACE: Cannot stat() mount point '/run/user/1001/gvfs' (disk '_run_user_1001_gvfs', filesystem 'fuse.gvfsd-fuse', root '/'). (errno 13, Permission denied)
2020-08-28 21:07:06: netdata ERROR : PLUGIN[diskspace] : DISKSPACE: Cannot stat() mount point '/sys/kernel/debug/tracing' (disk '_sys_kernel_debug_tracing', filesystem 'tracefs', root '/'). (errno 13, Permission denied)