New on LowEndTalk? Please Register and read our Community Rules.
Which nagios plugins for cPanel?
I have just been expanding monitoring tools & found Nagios to be exactly what I want but it has been a bit difficult to explore all plugins, compare them & get few of them which I need (I will do it for sure after some time but don't have time for it at the moment). So just asking from you guys who use Nagios to monitor cpanel, what plugins do you?
The things I am looking to monitor would be like ping, ssh, http, mysql, exim queue, disk space, load etc. If you don't mind then I would love to see your host's definition (Hostname/IP removed obviously) & commands.cfg file as it would be much easier for me to do copy/paste.
It takes time to setup Nagios properly, and I would avoid copying / pasting for the mere fact that every enviornment is a bit different. It can take some fine tuning to get your alerts / notifications firing properly.
Your best bet is going to be install NRPE, or check_by_ssh which uses SSH keys between the Nagios host, and your cPanel server. From there, you'll be able execute * scripts to attain the information you're looking for. This will be used for things that can only be checked internally, on the cPanel server.
For check_by_ssh, see this document for a walk through - https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring_Hosts_Using_SSH.pdf (ignore the fact it's for Nagios Nagios XI, still relevent)
For NRPE, here's instructions - https://assets.nagios.com/downloads/nagiosxi/docs/How-To-Configure-NRPE-and-Install-From-Source-with-Nagios-XI.pdf (also ignore the fact it's for Nagios XI, most of the same basis.)
Ping will just use check_ping or check_icmp, ssh will use check_ssh (will only report SSH version), http will use check_http. These can all run fine without an agent as their checks are performed externally. Exim should be able to use check_mailq, which will need an agent as it executes locally..Check_disk, and check_load will also work this way. You can find many more plugins at https://exchange.nagios.org to top if off, a lot of niche plugins exist.
For reference, once you've installed Nagios / Nagios plugins, take a look at /usr/local/nagios/libexec/ (generally the default install path for plugins). From here, you can dive into each plugin and the results BEFORE actually creating your configuration files. It will help tremendously in the troubleshooting process.
The ones I used to use Where:
Check_http -checks http response
Check_load - checks server load
Check_mysql -checks and returns
Check_traffic - returns Inbound and outbound traffic and alerts of over a threshold
Check_mem - checks server memory usage
I vaguely remember one for checking the io of a server aswell I either couldn't get it working or didn't use it that much