Line 55: |
Line 55: |
| === Installation === | | === Installation === |
| Download and unpack the tarball on your central Nagios server and on all other SME Servers you want to monitor:<br> | | Download and unpack the tarball on your central Nagios server and on all other SME Servers you want to monitor:<br> |
− | <code>tar xzf smeserver-nagios-complete-1.0.0.tgz<br>
| + | tar xzf smeserver-nagios-complete-1.0.0.tgz |
− | cd smeserver-nagios-complete-1.0.0<br></code> | + | cd smeserver-nagios-complete-1.0.0 |
| Edit install.sh and set the variable NAGIOS_CENTRAL_SERVER to the IP address of your central Nagios server. Use the local IP if you check the servers over the local network or over a VPN, otherwise use the WAN IP. | | Edit install.sh and set the variable NAGIOS_CENTRAL_SERVER to the IP address of your central Nagios server. Use the local IP if you check the servers over the local network or over a VPN, otherwise use the WAN IP. |
| | | |
| | | |
| ==== Central Nagios server installation ==== | | ==== Central Nagios server installation ==== |
− | <code>cd smeserver-nagios-complete-1.0.0<br>
| + | cd smeserver-nagios-complete-1.0.0 |
− | ./install.sh central </code><br> | + | ./install.sh central |
| Test the installation by pointing your browser to <code>https:<b></b>//nagios_central_server_ip/nagios/</code><br> | | Test the installation by pointing your browser to <code>https:<b></b>//nagios_central_server_ip/nagios/</code><br> |
| Basic login in as admin. | | Basic login in as admin. |
Line 68: |
Line 68: |
| | | |
| ==== NRPE installation on the servers to monitor ==== | | ==== NRPE installation on the servers to monitor ==== |
− | <code>cd smeserver-nagios-complete-1.0.0<br>
| + | cd smeserver-nagios-complete-1.0.0 |
− | ./install.sh nrpe</code><br> | + | ./install.sh nrpe |
| If the server is behind a firewall, you must forward port 5666/tcp to the server.<br> | | If the server is behind a firewall, you must forward port 5666/tcp to the server.<br> |
| Test the installation by running this command on the central Nagios server:<br> | | Test the installation by running this command on the central Nagios server:<br> |
− | <code>/usr/lib/nagios/plugins/check_nrpe -H IPADDRESS</code><br>
| + | /usr/lib/nagios/plugins/check_nrpe -H IPADDRESS |
− | Expected result: <code>NRPE v2.5.1</code> | + | Expected result: |
− | | + | NRPE v2.5.1 |
| | | |
| === Configuration === | | === Configuration === |
| It is strongly recommended to read the [http://www.nagios.org/docs/ Nagios and NRPE documentation] to understand the principles of operation before you start to configure Nagios. | | It is strongly recommended to read the [http://www.nagios.org/docs/ Nagios and NRPE documentation] to understand the principles of operation before you start to configure Nagios. |
| | | |
− | When changes to the nagios configuration were made, the service must be restarted:<br> | + | When changes to the nagios configuration were made, the service must be restarted: |
− | <code>service nagios restart</code><br>
| + | service nagios restart |
− | When nrpe.cfg was changed the nrpe service must be restarted:<br> | + | When nrpe.cfg was changed the nrpe service must be restarted: |
− | <code>service nrpe restart</code>
| + | service nrpe restart |
| | | |
| ==== Hints ==== | | ==== Hints ==== |
| * place all your configuration files in /etc/nagios/, the Logfile /var/log/nagios/nagios.log, the Log-Archives in /var/log/nagios/archives/ and the status file in /var/log/nagios/status.dat. These are the default settings. Leave them unchanged. The smeserver-nagios-backup RPM requires these settings to work properly. | | * place all your configuration files in /etc/nagios/, the Logfile /var/log/nagios/nagios.log, the Log-Archives in /var/log/nagios/archives/ and the status file in /var/log/nagios/status.dat. These are the default settings. Leave them unchanged. The smeserver-nagios-backup RPM requires these settings to work properly. |
− | * Set the following in /etc/nagios/cgi.cfg to grant full accces to the user admin:<br> | + | * Set the following in /etc/nagios/cgi.cfg to grant full accces to the user admin: |
− | <code>
| + | use_authentication=1 |
− | use_authentication=1<br> | + | authorized_for_system_information=admin |
− | authorized_for_system_information=admin<br> | + | authorized_for_system_commands=admin |
− | authorized_for_system_commands=admin<br> | + | authorized_for_configuration_information=admin |
− | authorized_for_configuration_information=admin<br> | + | authorized_for_all_hosts=admin |
− | authorized_for_all_hosts=admin<br> | + | authorized_for_all_host_commands=admin |
− | authorized_for_all_host_commands=admin<br> | + | authorized_for_all_services=admin |
− | authorized_for_all_services=admin<br> | + | authorized_for_all_service_commands=admin |
− | authorized_for_all_service_commands=admin<br> | + | |
− | </code>
| |
| * On the NRPE Server you find a /etc/nagios/nrpe.cfg with many predefined commands. Modify them to fit your needs. | | * On the NRPE Server you find a /etc/nagios/nrpe.cfg with many predefined commands. Modify them to fit your needs. |
| * It is a good idea to make your Nagios server as independent as possible from the infrastructure it monitors. That means use a dedicated hardware, network, firewall and internet connection if possible. Consider to setup a second Nagios somewhere inside your network, which monitors your central Nagios server. | | * It is a good idea to make your Nagios server as independent as possible from the infrastructure it monitors. That means use a dedicated hardware, network, firewall and internet connection if possible. Consider to setup a second Nagios somewhere inside your network, which monitors your central Nagios server. |