5.2. Set Up Nagios

Use the following instructions to set up HTTPS for Nagios.

  1. If you have not set up the truststore for Ambari Server previously.

    1. Log into the Ambari Server host.

    2.  Set the truststore path and password in ambari.properties. With a text editor, open:

      /etc/ambari-server/conf/ambari.properties
    3. Add the following lines.

      ssl.trustStore.path = $path-to-truststore
      ssl.trustStore.password = $password-for-truststore             
  2. Set up the Nagios server.

    1. Log into the Nagios server host.

    2.  Create a self-signed certificate on the Nagios server host. For example:

      openssl genrsa -out $nserver.key 2048
      openssl req -new -key $nserver.key -out $nserver.csr  
      openssl x509 -req -days 365 -in $nserver.csr -signkey $nserver.key -out $nserver.crt

      Where $nserver is the Nagios server hostname.

    3. Install SSL on the Nagios server host.

      yum install mod_ssl
    4. Edit the SSL configuration file on the Nagios server host.

      1. Using a text editor, open:

        /etc/httpd/conf.d/ssl.conf
      2. Add lines setting the certificate and key file names to the files you created above. For example:

        SSLCertificateFile    = $nserver.crt
        SSLCertificateKeyFile = $nserver.key 
      3. Restart the httpd service on the Nagios server host.

        service httpd restart
  3. Set up and restart the Ambari Server.

    1. Log into the Ambari Server.

    2. Add the cert to the truststore on the Ambari Server host.

      ambari-server setup-nagios-https

      The setup script uses the truststore path and password you added to ambari.properties above.

    3. Restart the Server

      ambari-server restart

loading table of contents...