Ambari Metrics System includes Grafana, which is a daemon that runs on a specific host in the cluster and serves pre-built dashboards for visualising metrics collected in the Metrics Collector.
Here, the process running is grafana-server, the owner is ams, and is listening on port TCP/3000. All the configurations for Grafana are handled by Ambari, and are reflected in the ams-grafana.ini file located at /etc/ambari-metrics-grafana/conf/ directory. Grafana needs to be restarted for any configuration changes to take effect.
In enterprises where security is required, limit the Grafana access to only HTTPS connections. To enable https for Grafana, update the following properties:
protocol: By default, http. For this video we need to change this to https.
ca_cert: The path to CA root certificate or bundle to be used to validate the Grafana certificate against. Since we are using a PKCS#12 bundle certificate, we need to extract the CA certificate chain from it.
cert_file:The path to the certificate. This certificate nees to be in PEM format.
cert_key: The path for the private key that match with the public key of the certificate. This private key needs to be unencrypted RSA private key.
For this article, the CA will provide us with a certificate bundle located at:
/var/tmp/certificates/GRAFANA
Since the certificate information provided by the CA is a PKCS#12 certificate bundle, complete the following steps:
Extract the root and intermediate certificates, using the following command: