I have a remote Ubuntu system, and I need to do the following checks on it in nagios:
check_users
check_procs
check_all_disks
.
How do I do that on a remote system? I've looked around, but everything I've found seems to be from either early 2010 or ealier.
Just because it's from 2 years ago doesn't make it irrelevant. Nagios is a stable, robust system, and as such plenty of useful information is that old.
The tool you want is NRPE (Nagios Remote Plugin Executor); it allows you to run Nagios plugins on a remote machine over the network, and collect the results in your local Nagios server. There's bucketloads of introductory documentation available, so I won't bother going into a detailed HOWTO here.
Another option is too install these checks on the server that is to be monitored. Then create a user that on that server for these checks and setup ssh keys. You can then wrap these checks inside
check_by_ssh
. What happens then is Nagios user will ssh into the monitored server, execute the command, and the log out.For example, the nagios command configuration would look something like:
One downside to keep in mind is that ssh has more overhead than other options. However this not really a problem for smaller environments monitoring servers that are not too tight on resources.