nginxinc/nginx-amplify-doc

disk I/O data

S8Cloud opened this issue · 3 comments

Receiving 'Metrics unavailable' error in the System log Disk I/O session, the doc says 'There is no easy workaround for this except for allowing the agent to run as root. Sometimes fixing permissions for /proc and /sys/block may work.'
How do I run the agent as root or change folder permission?

on ubuntu, I tried the workaround and managed to run agent as root, but the metrics didnt come.
I still have this kind of errors in /var/log/amplify-agent/agent.log
sys_metrics sys_metrics failed to collect: disk_io_counters raised ValueError

sudo vi /etc/rc0.d/K01amplify-agent
and replace line in do_start()
start-stop-daemon --start --chuid $USER --exec $DAEMON start -- $DAEMON_ARGS
by
start-stop-daemon --start --chuid root --exec $DAEMON start -- $DAEMON_ARGS

then you can check process is running as root :
ps -aef | grep amplify
root 3372151 1 0 14:06 ? 00:00:29 amplify-agent

ps -aef | grep amplify
root      139458       1  2 23:50 ?        00:00:05 amplify-agent

Still no metrics for disk io / latency / iops!

@S8Cloud If you are still facing this problem, please create an issue in the NGINX Amplify Agent repo