Try removing the old host key from /home/nagios/.ssh/known_hosts.
GRANT REPLICATION CLIENT ON *.* TO 'replication'@'127.0.0.1' IDENTIFIED BY 'sql';
Happens on Debian 10. Install this.
apt install libmariadb-dev-compat libmariadb-dev
Then recompile the plugins again.