SSL Dashboard configurations in Grafana

Download and install node-cert in your SSL certificate stored server ( like proxy server ).

Open terminal and follow below mentioned commands:

1.  Download node-cert package

  wget https://github.com/amimof/node-cert-exporter/releases/latest/download/node-cert-exporter-linux-amd64   

2.  Package move to /usr/local/bin path.

  sudo mv node-cert-exporter-linux-amd64 /usr/local/bin/node-cert-exporter   

3. Give user execute permissions and change user group

  sudo chmod u+x /usr/local/bin/node-cert-exporter  

  sudo chown prometheus:prometheus /usr/local/bin/node-cert-exporter 

 4. Create node-cert service configurations

  nano /etc/systemd/system/node-cert-exporter.service  

[Unit]
Description=Node-Cert Exporter
Wants=network-online.target
After=network-online.target
 
[Service]
Type=simple
User=prometheus
Group=prometheus
ExecStart=/usr/local/bin/node-cert-exporter --path=/etc/ssl/Letsencrpt 
 
Restart=always
 
[Install]
WantedBy=multi-user.target 


Note: (Line Number 10)

ExecStart=/usr/local/bin/node-cert-exporter --path=<Your SSL cert path>

5.  systemctl enable node-cert-exporter 

6.  systemctl start node-cert-exporter 

7.  systemctl status node-cert-exporter 

8. Go to Grafana configurations file and add your node cert configured server IP/URL.

   nano /etc/prometheus/prometheus.yml 

 - job_name: 'node_cert_exporter'  
    static_configs:
      - targets: ['<IP/URL>:9117']  

Save and exit from the editor

9.  systemctl restart prometheus   

10. Login to Grafana Dashboard page.

     Click + icon and select import option

     Displayed Import via grafana.com field enter  9999  id and then give load button. All done check your SSL certificate expire date with color. You can customize a color.

No comments:

Powered by Blogger.