Troubleshooting Nagios 4 Core Installation

Troubleshooting Nagios 4 Core Installation

Use the following command to verify you have all your config and command files correct when troubleshooting Nagios core installation. This will give you a readout of any configuration errors, thus giving you the ability to fix it on the fly.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

I’d recommend making an alias in your .bashrc so you can just type:testnag

Here is an example of the alias I use

alias testnag='/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg'

By using these tips it will cut down on your install and configuration times considerably. You can also make changes and test them before restarting the service, therefore avoiding any potential downtime in your monitoring.