HTTPS with Ambari for Nagios
Hello guys have you thinked before to use ambari :) its not a kidding name its a server package here you can use it to change behaviour of application from http to https and there is other uses but here we will use it for nagios
- Set up the Nagios server.
- Log into the Nagios server host.
- 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 host name.
- Install SSL on the Nagios server host.
yum install mod_ssl
- Edit the SSL configuration file on the Nagios server host.
- Using a text editor, open:
/etc/httpd/conf.d/ssl.conf
- Add lines setting the certificate and key file names to the files you created .
SSLCertificateFile $nserver.crt SSLCertificateKeyFile $nserver.key
- Disable HTTP access (optional)
- Using a text editor, open:
/etc/httpd/conf/httpd.conf
- Comment out the port 80 listener:
# Listen 80
- Restart the httpd service on the Nagios server host.
service httpd restart
- Set up and restart the Ambari Server.
- Log into the Ambari Server.
- Run the special setup command and answer the prompts.
ambari-server setup-security
- Select 2 for Enable HTTPS for Nagios service.
- Respond y to Do you want to configure HTTPS for Nagios? .
- Enter your TrustStore type. Your options are jks, jceks, or pks12.
- Enter the path to your TrustStore file.
- Enter the password for your TrustStore and then re-enter to confirm. The password must be at least 6 characters long.
- Enter the path to the Nagios server certificate file.
- Start or restart the Server
ambari-server restart