I have /usr/lib/nagios/plugins/check_mysql in the right place and I have a services.conf definition as follows:
On the two hosts I have this assigned for I get two very logical errors:
the icinga2 server reports:
and the remote host reports:
For this remote host in the hosts.conf file I have tried a variety of options such as with no success in checking on the localhost interface.
What I'm terribly sorry to ask help for is that
1) I cannot find how to define the mysql user nagios and password in the icinga2 docs. If this is somewhere really obvious I am sorry but I would like to know where to find it! I have the same issue for Postgres as well. I understand that these options need to be passed onto the check_mysql script but I don't know how to do that in the new icinga2 syntax.
2) My remote host check is being checked by the public interface and not the localhost interface where mysql is running. How can I force the check to run on the remote host and check the localhost if mysql is running? I would be happy to use a systemd check if there is an option for that, I am running these services on Ubuntu 16.04.