<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>SSL Certificate &#8211; Nagios Library</title>
	<atom:link href="https://library.nagios.com/tag/ssl-certificate/feed/" rel="self" type="application/rss+xml" />
	<link>https://library.nagios.com</link>
	<description>Complete Nagios monitoring resources and documentation</description>
	<lastBuildDate>Thu, 03 Apr 2025 14:03:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://library.nagios.com/wp-content/uploads/2024/11/Nagios-Blue-N.svg</url>
	<title>SSL Certificate &#8211; Nagios Library</title>
	<link>https://library.nagios.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Monitoring SSL Certificates Expiration with Nagios XI</title>
		<link>https://library.nagios.com/support-tips/monitoring-ssl-certificates-nagios-xi/</link>
		
		<dc:creator><![CDATA[Joe Johnson]]></dc:creator>
		<pubDate>Thu, 27 Mar 2025 20:43:03 +0000</pubDate>
				<category><![CDATA[Support Tips]]></category>
		<category><![CDATA[Techtips]]></category>
		<category><![CDATA[SSL Certificate]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=53578</guid>

					<description><![CDATA[Introduction SSL certificates play a crucial role in securing websites and applications by encrypting communication. Expired SSL certificates can lead to security warnings, service disruptions, and loss of trust from users. Nagios XI provides a reliable way to monitor SSL certificates and ensure they are renewed before expiration. This guide will walk you through setting [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction</h2>



<p><a href="https://library.nagios.com/documentation/nagios-xi-using-ssl-with-xi-active-directory-2/" target="_blank" data-type="link" data-id="https://library.nagios.com/documentation/nagios-xi-using-ssl-with-xi-active-directory-2/" rel="noreferrer noopener">SSL certificates</a> play a crucial role in securing websites and applications by encrypting communication. Expired SSL certificates can lead to security warnings, service disruptions, and loss of trust from users. Nagios XI provides a reliable way to monitor SSL certificates and ensure they are renewed before expiration. This guide will walk you through setting up SSL certificate expiration monitoring in <a href="https://www.nagios.com/products/nagios-xi/" target="_blank" data-type="link" data-id="https://www.nagios.com/products/nagios-xi/" rel="noreferrer noopener">Nagios XI</a>.</p>



<h2 class="wp-block-heading">Why Monitor SSL Certificate Expiration?</h2>



<ul class="wp-block-list">
<li><strong>Avoid Service Interruptions</strong> – Prevent downtime due to expired certificates.</li>



<li><strong>Enhance Security</strong> – Ensure continued encryption and protection.</li>



<li><strong>Maintain Compliance</strong> – Meet security standards and best practices.</li>



<li><strong>Automate Monitoring</strong> – Receive alerts before certificates expire.</li>
</ul>



<h2 class="wp-block-heading">Setting Up SSL Certificate Expiration Monitoring</h2>



<p>Nagios XI uses plugins to check SSL certificate validity. The <strong>check_ssl_certificate</strong> plugin can help monitor expiration dates and send alerts.</p>



<h3 class="wp-block-heading">Step 1: Install the Required Plugin</h3>



<p>Nagios XI supports various plugins, and the <strong>check_ssl_cert</strong> plugin is commonly used.</p>



<h4 class="wp-block-heading">Installing check_ssl_cert</h4>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="cd /usr/local/nagios/libexec
wget https://raw.githubusercontent.com/matteocorti/check_ssl_cert/master/check_ssl_cert
chmod +x check_ssl_cert" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">cd</span><span style="color: #D4D4D4"> /</span><span style="color: #9CDCFE">usr</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">local</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">nagios</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">libexec</span></span>
<span class="line"><span style="color: #9CDCFE">wget</span><span style="color: #D4D4D4"> </span><span style="color: #C8C8C8">https</span><span style="color: #D4D4D4">:</span><span style="color: #6A9955">//raw.githubusercontent.com/matteocorti/check_ssl_cert/master/check_ssl_cert</span></span>
<span class="line"><span style="color: #9CDCFE">chmod</span><span style="color: #D4D4D4"> +</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">check_ssl_cert</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 2: Create a New Command in Nagios XI</h3>



<ul start="1" class="wp-block-list">
<li>Log in to Nagios XI and navigate to <strong>Configure &gt; Core Config Manager</strong>.</li>



<li>Go to <strong>Commands</strong> and click <strong>Add New Command</strong>.</li>



<li>Configure the command as follows:
<ul class="wp-block-list">
<li><strong>Command Name:</strong></li>
</ul>
</li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="check_ssl_certificate" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">check_ssl_certificate</span></span></code></pre></div>



<ul class="wp-block-list">
<li><strong>Command Line:</strong><code> </code></li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="$USER1$/check_ssl_cert -H $ARG1$ -w $ARG2$ -c $ARG3$" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">$USER1$</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">check_ssl_cert</span><span style="color: #D4D4D4"> -</span><span style="color: #4FC1FF">H</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$ARG1$</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">w</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$ARG2$</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">c</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$ARG3$</span></span></code></pre></div>



<ul start="1" class="wp-block-list">
<li><strong>Description:</strong> Monitors SSL certificate expiration.</li>



<li>Click <strong>Save</strong> and <strong>Apply Configuration</strong>.</li>
</ul>



<h3 class="wp-block-heading">Step 3: Add a New Service to Monitor SSL Expiration</h3>



<ol start="1" class="wp-block-list">
<li>Go to <strong>Configure &gt; Core Config Manager &gt; Services</strong>.</li>



<li>Click <strong>Add New Service</strong>.</li>



<li>Configure the service:
<ul class="wp-block-list">
<li><strong>Host:</strong> Select the target website or server.</li>



<li><strong>Check Command:</strong> <code>check_ssl_certificate</code>.</li>



<li><strong>Arguments:</strong>
<ul class="wp-block-list">
<li><code>$ARG1$</code> – The domain name (e.g., <code>example.com</code>).</li>



<li><code>$ARG2$</code> – Warning threshold in days (e.g., <code>30</code> for 30 days before expiration).</li>



<li><code>$ARG3$</code> – Critical threshold in days (e.g., <code>15</code> for critical alerts within 15 days).</li>
</ul>
</li>



<li><strong>Check Interval:</strong> Set the frequency of checks.</li>



<li>Click <strong>Save</strong> and <strong>Apply Configuration</strong>.</li>
</ul>
</li>
</ol>



<h3 class="wp-block-heading">Step 4: Test the SSL Monitoring Setup</h3>



<p>After configuration, force a check in Nagios XI:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="/usr/local/nagios/libexec/check_ssl_cert -H example.com -w 30 -c 15" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">usr</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">local</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">nagios</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">libexec</span><span style="color: #D4D4D4">/</span><span style="color: #9CDCFE">check_ssl_cert</span><span style="color: #D4D4D4"> -</span><span style="color: #4FC1FF">H</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">example</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">com</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">w</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">30</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">c</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">15</span></span></code></pre></div>



<p>If the certificate is valid, the output should indicate the number of days remaining before expiration.</p>



<h3 class="wp-block-heading">Step 5: Configure Notifications and Alerts</h3>



<ol start="1" class="wp-block-list">
<li>Go to <strong>Configure &gt; Notification Preferences</strong>.</li>



<li>Enable email or SMS notifications.</li>



<li>Set up escalation rules to alert different teams as the expiration date nears.</li>
</ol>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Monitoring SSL certificates with Nagios XI ensures your website and applications remain secure and accessible. By setting up automated checks and alerts, you can avoid expired SSL issues and maintain continuous encryption. Regularly review your SSL monitoring setup to ensure effectiveness and compliance with security best practices.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
