<?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>Ubuntu Linux &#8211; Nagios Library</title>
	<atom:link href="https://library.nagios.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>https://library.nagios.com</link>
	<description>Complete Nagios monitoring resources and documentation</description>
	<lastBuildDate>Thu, 19 Feb 2026 18:24:18 +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>Ubuntu Linux &#8211; Nagios Library</title>
	<link>https://library.nagios.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Comprehensive Guide: Forwarding Ubuntu 14.04 LTS Logs to Nagios Log Server 2024R2</title>
		<link>https://library.nagios.com/tutorials/ubuntu-14-nagios-log-server2024r2/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Fri, 21 Mar 2025 13:07:56 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[Ubuntu 14]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52836</guid>

					<description><![CDATA[Nagios Log Server provides IT administrators with a powerful solution for centralized log collection, analysis, and management. This guide walks you through the process of configuring Ubuntu 14 to forward logs to Nagios Log Server using rsyslog. By following these step-by-step instructions, you&#8217;ll enable seamless log transmission, ensuring real-time monitoring, enhanced security, and efficient troubleshooting [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Log Server provides IT administrators with a powerful solution for centralized log collection, analysis, and management. This guide walks you through the process of configuring Ubuntu 14 to forward logs to <a href="https://www.nagios.com/products/nagios-log-server/" target="_blank" rel="noopener">Nagios Log Server</a> using rsyslog. By following these step-by-step instructions, you&#8217;ll enable seamless log transmission, ensuring real-time monitoring, enhanced security, and efficient troubleshooting for your system.</p>



<p><strong>Note</strong>: Ubuntu 14.04 LTS reached end-of-life on April 25, 2019, and is unsupported. Its outdated packages (e.g., `rsyslog 7.4.4`) may not fully support modern features or security standards required by Nagios Log Server 2024R2. Use this guide for legacy systems only; upgrading to a supported Ubuntu version (e.g., 22.04 LTS) is strongly recommended.</p>



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



<p>Before proceeding, ensure you have the following:</p>



<ul class="wp-block-list">
<li><strong>Access to a Nagios Log Server instance</strong> (recommended latest stable release).</li>



<li><strong>An Ubuntu 14 system</strong>.</li>



<li><strong>Root or sudo privileges</strong> on your Ubuntu machine.</li>



<li><strong>Network connectivity</strong> between Ubuntu and Nagios Log Server (verify firewall settings).</li>
</ul>



<h3 class="wp-block-heading">Video Tutorial</h3>



<p>For a visual walkthrough, watch this detailed step-by-step guide:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="How to Install Nagios Log Server 2024R2 on Linux | A Step-by-Step Guide" width="800" height="450" src="https://www.youtube.com/embed/9SkH3fNmhGg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">Step 1: Add a New Log Source in Nagios Log Server</h2>



<ol class="wp-block-list">
<li><strong>Login to Nagios Log Server</strong>:
<ul class="wp-block-list">
<li>Open your web browser and navigate to your <strong>Nagios Log Server instance</strong>.</li>



<li>Log in with your <strong>administrator credentials</strong>.</li>
</ul>
</li>



<li><strong>Navigate to Log Source Setup</strong>:
<ul class="wp-block-list">
<li>On the <strong>Home page</strong>, locate the <strong>+ Linux button</strong> at the bottom right corner.</li>
</ul>
</li>
</ol>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot.png"><img fetchpriority="high" decoding="async" width="1024" height="156" src="https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot-1024x156.png" alt="linux circle screenshot" class="wp-image-52847" title="Comprehensive Guide: Forwarding Ubuntu 14.04 LTS Logs to Nagios Log Server 2024R2 1" srcset="https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot-1024x156.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot-300x46.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot-768x117.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot-1536x235.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/linux-circle-screenshot.png 1878w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">+ Linux button</figcaption></figure>



<ul class="wp-block-list">
<li>Alternatively, click <strong>+ Add Log Source</strong> in the navigation bar and select <strong>Linux</strong>.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1.png"><img decoding="async" width="1024" height="128" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1-1024x128.png" alt="Screenshot 2025 03 20 094211 1" class="wp-image-52848" title="Comprehensive Guide: Forwarding Ubuntu 14.04 LTS Logs to Nagios Log Server 2024R2 2" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1-1024x128.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1-300x37.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1-768x96.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1-1536x191.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-094211-1.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">+ Add Log Source</figcaption></figure>



<h2 class="wp-block-heading">Step 2: Configuring the Linux Log Source</h2>



<h3 class="wp-block-heading">1. Download and Run the Setup Script</h3>



<ul class="wp-block-list">
<li>The <strong>Linux Source Setup page</strong> provides a <strong>pre-configured command</strong>.</li>



<li>Copy the command and paste it into the <strong>Ubuntu terminal</strong>.</li>
</ul>



<p>If <strong>curl</strong> is not installed, install it first:</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="sudo apt update &amp;&amp; sudo apt install -y curl" 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">sudo apt update &amp;&amp; sudo apt install -y curl</span></span></code></pre></div>



<p>Then, execute the following command to download and run the setup script:</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="curl -sS -O http://your-nagios-log-server-address/nagioslogserver/scripts/setup-linux.sh
sudo bash setup-linux.sh -s your-nagios-log-server-address -p 5544" 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">curl -sS -O http://your-nagios-log-server-address/nagioslogserver/scripts/setup-linux.sh</span></span>
<span class="line"><span style="color: #D4D4D4">sudo bash setup-linux.sh -s your-nagios-log-server-address -p 5544</span></span></code></pre></div>



<p>Replace <strong>your-nagios-log-server-address</strong> with the actual <strong>IP address or hostname</strong> of your <strong>Nagios Log Server</strong>.</p>



<ul class="wp-block-list">
<li>The <strong>-s flag</strong> specifies the <strong>Nagios Log Server address</strong>.</li>



<li>The <strong>-p 5544</strong> specifies the <strong>port for log transmission</strong> (default is <strong>5544</strong>).</li>
</ul>



<h3 class="wp-block-heading">2. Verify the Script Execution</h3>



<p>After running the script, you should see a confirmation message:</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="Detected rsyslog 7.4.4
Detected rsyslog work directory /var/spool/rsyslog
Destination Log Server: 192.168.0.65:5544
Creating /etc/rsyslog.d/99-nagioslogserver.conf...
getenforce command not found, assuming SELinux is disabled.
rsyslog configuration check passed.
Restarting rsyslog service with 'service'..  
Okay.
rsyslog is running with the new configuration.
Visit your Nagios Log Server dashboard to verify that logs are being received." 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">Detected rsyslog 7.4.4</span></span>
<span class="line"><span style="color: #D4D4D4">Detected rsyslog work directory /var/spool/rsyslog</span></span>
<span class="line"><span style="color: #D4D4D4">Destination Log Server: 192.168.0.65:5544</span></span>
<span class="line"><span style="color: #D4D4D4">Creating /etc/rsyslog.d/99-nagioslogserver.conf...</span></span>
<span class="line"><span style="color: #D4D4D4">getenforce command not found, assuming SELinux is disabled.</span></span>
<span class="line"><span style="color: #D4D4D4">rsyslog configuration check passed.</span></span>
<span class="line"><span style="color: #D4D4D4">Restarting rsyslog service with &#39;service&#39;..  </span></span>
<span class="line"><span style="color: #D4D4D4">Okay.</span></span>
<span class="line"><span style="color: #D4D4D4">rsyslog is running with the new configuration.</span></span>
<span class="line"><span style="color: #D4D4D4">Visit your Nagios Log Server dashboard to verify that logs are being received.</span></span></code></pre></div>



<ul class="wp-block-list">
<li>If you encounter any <strong>errors</strong>, check the script logs.</li>



<li>Ensure that the <strong>Nagios Log Server is reachable</strong> and that <strong>port 5544 is open</strong>.</li>
</ul>



<h2 class="wp-block-heading">Step 3: Confirming Log Reception</h2>



<ol class="wp-block-list">
<li><strong>Navigate to Dashboards in Nagios Log Server</strong>:
<ul class="wp-block-list">
<li>Go to the <strong>Dashboards</strong> section.</li>



<li>Perform a query using the <strong>IP address of the Ubuntu machine</strong> to confirm logs are being received.</li>
</ul>
</li>



<li><strong>Send a Test Log Entry</strong>:</li>
</ol>



<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="logger &quot;This is a test log entry&quot;" 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">logger &quot;This is a test log entry&quot;</span></span></code></pre></div>



<ol start="3" class="wp-block-list">
<li><strong>Refresh the Nagios Log Server dashboard</strong>:
<ul class="wp-block-list">
<li>If successful, you should see the <strong>test log entry</strong> listed in the dashboard.</li>
</ul>
</li>
</ol>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117.png"><img decoding="async" width="1919" height="936" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117.png" alt="Screenshot 2025 02 13 094117" class="wp-image-52861" title="Comprehensive Guide: Forwarding Ubuntu 14.04 LTS Logs to Nagios Log Server 2024R2 3" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117.png 1919w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117-300x146.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117-1024x499.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117-768x375.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-13-094117-1536x749.png 1536w" sizes="(max-width: 1919px) 100vw, 1919px" /></a><figcaption class="wp-element-caption">test log entry</figcaption></figure>



<h2 class="wp-block-heading">Step 4: Accessing the Setup Script on Nagios Log Server</h2>



<p>The setup script is located on the <strong>Nagios Log Server instance</strong> at:</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="/var/www/html/nagioslogserver/www/scripts/setup-linux.sh" 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">/var/www/html/nagioslogserver/www/scripts/setup-linux.sh</span></span></code></pre></div>



<p>You can access it <strong>directly via a browser or SSH</strong> if you need to make <strong>manual adjustments</strong>.</p>



<h2 class="wp-block-heading">Step 5: Adding More Log Sources</h2>



<p>Use the <strong>+ Add Log Source</strong> button to configure <strong>additional sources</strong>, such as:</p>



<ul class="wp-block-list">
<li><strong>Windows event logs</strong></li>



<li><strong>Application logs</strong></li>



<li><strong>Archived log files</strong></li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200.png"><img loading="lazy" decoding="async" width="1024" height="485" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200-1024x485.png" alt="Screenshot 2025 03 20 110200" class="wp-image-52851" title="Comprehensive Guide: Forwarding Ubuntu 14.04 LTS Logs to Nagios Log Server 2024R2 4" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200-1024x485.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200-300x142.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200-768x364.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200-1536x728.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110200.png 1912w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Add Log Source</figcaption></figure>



<p>Some log sources offer <strong>both scripted and manual setup options</strong>.</p>



<ul class="wp-block-list">
<li>The <strong>manual method</strong> provides <strong>more customization</strong> by allowing direct <strong>configuration file edits</strong>.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441.png"><img loading="lazy" decoding="async" width="1024" height="543" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441-1024x543.png" alt="Screenshot 2025 03 20 110441" class="wp-image-52852" title="Comprehensive Guide: Forwarding Ubuntu 14.04 LTS Logs to Nagios Log Server 2024R2 5" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441-1024x543.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441-300x159.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441-768x407.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441-1536x815.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-20-110441.png 1625w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">manual method</figcaption></figure>



<h2 class="wp-block-heading">Troubleshooting Tips</h2>



<h3 class="wp-block-heading">1. Check rsyslog Status</h3>



<p>Ensure that <strong>rsyslog is installed and running</strong>:</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="systemctl status rsyslog" 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">systemctl status rsyslog</span></span></code></pre></div>



<p>If the service is not running, start it:</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="sudo systemctl start rsyslog" 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">sudo systemctl start rsyslog</span></span></code></pre></div>



<h3 class="wp-block-heading">2. Verify Network Connectivity</h3>



<p>Ensure that the <strong>Ubuntu machine</strong> can communicate with <strong>Nagios Log Server on port 5544</strong>.</p>



<ul class="wp-block-list">
<li>Check for <strong>network restrictions</strong> such as <strong>firewalls or proxy settings</strong>.</li>
</ul>



<h3 class="wp-block-heading">3. Check Firewall Settings</h3>



<p>If you’re using <strong>ufw on Ubuntu</strong>, allow traffic on <strong>port 5544</strong>:</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="sudo ufw allow 5544/tcp" 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">sudo ufw allow 5544/tcp</span></span></code></pre></div>



<p>Also, check if there are any <strong>firewall rules on the Nagios Log Server</strong> that might block <strong>incoming log data</strong>.</p>



<h3 class="wp-block-heading">4. Review Log Files</h3>



<p>If the above steps don’t resolve the issue, review the log files:</p>



<ul class="wp-block-list">
<li>On <strong>Ubuntu</strong>: <code>sudo cat /var/log/syslog | grep rsyslog</code></li>



<li>On <strong>Nagios Log Server</strong>: <code>tail -f /var/log/logserver/nagios.log</code></li>
</ul>



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



<p>By following this guide, you have successfully <strong>configured your Ubuntu 14 machine to send logs</strong> to <strong>Nagios Log Server 2024R2</strong> for centralized monitoring. This setup allows you to <strong>efficiently monitor system logs</strong> and <strong>gain insights into potential issues in real-time</strong>.</p>



<p>You can now <strong>extend your log monitoring capabilities</strong> by:</p>



<ul class="wp-block-list">
<li><strong>Adding other sources</strong></li>



<li><strong>Fine-tuning your configurations</strong></li>



<li><strong>Creating alerts for critical log events</strong></li>
</ul>



<p>For troubleshooting or further assistance, visit the <strong><a href="https://support.nagios.com/kb/" target="_blank" rel="noopener">Nagios Knowledgebase</a></strong> or check the <strong><a href="https://support.nagios.com/forum/" target="_blank" rel="noopener">Nagios Support Forums</a></strong>.</p>
]]></content:encoded>
					
		
		
		<media:content url="https://www.youtube.com/embed/9SkH3fNmhGg" medium="video">
			<media:player url="https://www.youtube.com/embed/9SkH3fNmhGg" />
			<media:title type="plain">Ubuntu Linux Archives - Nagios Library</media:title>
			<media:thumbnail url="https://library.nagios.com/wp-content/uploads/2025/03/Ubuntu-14.jpg" />
			<media:rating scheme="urn:simple">nonadult</media:rating>
		</media:content>
	</item>
		<item>
		<title>How to Install Nagios Cross-Platform Agent (NCPA) on Ubuntu 14.04 LTS</title>
		<link>https://library.nagios.com/tutorials/how-to-install-nagios-cross-platform-agent-ncpa-on-ubuntu-14-04-lts/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Fri, 14 Mar 2025 15:28:56 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[Ubuntu 14]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52102</guid>

					<description><![CDATA[The Nagios Cross-Platform Agent (NCPA) is a versatile, open-source tool that simplifies system monitoring across multiple platforms, including Ubuntu 14.04 LTS. This guide details the installation and configuration of NCPA on Ubuntu 14.04 LTS, with optional integration into Nagios XI for centralized oversight of system metrics like CPU, memory, and disk usage. Prerequisites Before beginning [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The Nagios Cross-Platform Agent (NCPA) is a versatile, open-source tool that simplifies system monitoring across multiple platforms, including Ubuntu 14.04 LTS. This guide details the installation and configuration of NCPA on Ubuntu 14.04 LTS, with optional integration into <a href="https://www.nagios.com/products/nagios-xi/" target="_blank" rel="noopener">Nagios XI</a> for centralized oversight of system metrics like CPU, memory, and disk usage.</p>



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



<p>Before beginning the installation, ensure the following requirements are met:</p>



<ul class="wp-block-list">
<li>An Ubuntu 14.04 LTS system (64-bit recommended).</li>



<li>sudo or root privileges.</li>



<li>A stable internet connection for package downloads.</li>
</ul>



<p>Verify your Ubuntu version by running the command:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>lsb_release -a</textarea></pre><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">lsb_release -a</span></span></code></pre></div>



<p><strong>Example Output:</strong></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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>Distributor ID: Ubuntu  
Description:    Ubuntu 14.04 LTS  
Release:        14.04  
Codename:       trusty  </textarea></pre><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">Distributor ID: Ubuntu  </span></span>
<span class="line"><span style="color: #D4D4D4">Description:    Ubuntu 14.04 LTS  </span></span>
<span class="line"><span style="color: #D4D4D4">Release:        14.04  </span></span>
<span class="line"><span style="color: #D4D4D4">Codename:       trusty  </span></span></code></pre></div>



<h2 class="wp-block-heading">Step 1: Download the NCPA Package</h2>



<p>To download the latest NCPA package for your Ubuntu system, open a terminal and run:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wget https://assets.nagios.com/downloads/ncpa/ncpa-latest-trusty.amd64.deb</textarea></pre><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">wget https://assets.nagios.com/downloads/ncpa/ncpa-latest-trusty.amd64.deb</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 2: Install the NCPA Package</h2>



<p>Once the package is downloaded, install it using the following command:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo dpkg -i ncpa-latest-trusty.amd64.deb</textarea></pre><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">sudo dpkg -i ncpa-latest-trusty.amd64.deb</span></span></code></pre></div>



<p>If you encounter dependency errors, resolve them by running:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt-get install -f</textarea></pre><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">sudo apt-get install -f</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 3: Configure NCPA</h2>



<p>After installation, configure NCPA by editing the configuration file to set your API token:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo nano /usr/local/ncpa/etc/ncpa.cfg</textarea></pre><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">sudo nano /usr/local/ncpa/etc/ncpa.cfg</span></span></code></pre></div>



<p>Locate the line:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>community_string = mytoken</textarea></pre><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">community_string = mytoken</span></span></code></pre></div>



<p>Replace <code>mytoken</code> with a secure API token of your choice. Save the file (CTRL + X, then Y and Enter).</p>



<h2 class="wp-block-heading">Step 4: Restart NCPA Service</h2>



<p>To apply the changes, restart the NCPA service:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo service ncpa restart</textarea></pre><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">sudo service ncpa restart</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 5: Configure Firewall (if enabled)</h2>



<p>If you have a firewall enabled on your system, you will need to allow traffic on port 5693, which is used by NCPA.</p>



<p>For Ubuntu 14.04, configure UFW (Uncomplicated Firewall) as follows:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow 5693/tcp
sudo ufw reload</textarea></pre><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">sudo ufw allow 5693/tcp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo ufw reload</span></span></code></pre></div>



<h3 class="wp-block-heading">Troubleshooting: Firewall Not Enabled</h3>



<p>If the firewall is inactive, enable it:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw enable
sudo ufw reload</textarea></pre><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">sudo ufw enable</span></span>
<span class="line"><span style="color: #D4D4D4">sudo ufw reload</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 6: Test NCPA Installation</h2>



<p>Open a web browser and navigate to:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>https://&lt;NCPA_IP_Address>:5693/</textarea></pre><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">https://&lt;NCPA_IP_Address&gt;:5693/</span></span></code></pre></div>



<p>Bypass the security warning due to self-signed certificates by clicking <strong>Advanced</strong> and selecting <strong>Proceed</strong>.</p>



<p>On the NCPA login page, enter the API token you configured earlier and click <strong>Log In</strong>. Upon successful login, you will be directed to the NCPA Dashboard.</p>



<h2 class="wp-block-heading">Step 7: Configure Nagios XI (Optional)</h2>



<p>To monitor the Ubuntu server using Nagios XI and the NCPA agent:</p>



<p>1. Navigate to the <strong>Nagios XI dashboard</strong>.</p>



<p>2. Open the <strong>NCPA wizard</strong> by selecting <strong>Configure &gt; Configuration Wizards &gt; NCPA</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1.png"><img loading="lazy" decoding="async" width="1024" height="521" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1-1024x521.png" alt="Screenshot 2025 03 13 123516 1" class="wp-image-52127" title="How to Install Nagios Cross-Platform Agent (NCPA) on Ubuntu 14.04 LTS 6" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1-1024x521.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1-300x153.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1-768x391.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1-1536x781.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1.png 1595w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">NCPA</figcaption></figure>



<p>3. Enter the required details, including the <strong>IP address</strong> of the server and the <strong>API token</strong> you configured during NCPA setup.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-071641.png"><img loading="lazy" decoding="async" width="1024" height="553" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-071641-1024x553.png" alt="Screenshot 2025 03 14 071641" class="wp-image-52128" title="How to Install Nagios Cross-Platform Agent (NCPA) on Ubuntu 14.04 LTS 7" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-071641-1024x553.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-071641-300x162.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-071641-768x414.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-071641.png 1499w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">NCPA Config step 1</figcaption></figure>



<p>4. Complete the wizard setup and apply configuration changes.</p>



<h3 class="wp-block-heading">Verifying Monitoring Setup</h3>



<p>After completing the wizard, Nagios XI should display the monitored host and its services. Navigate to the <strong>Service Status</strong> page to confirm that the system is being monitored.</p>



<p>For more detailed instructions, refer to the <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-Devices-Using-The-NCPA-Agent-And-Nagios-XI.pdf" target="_blank" rel="noopener">Nagios XI Documentation</a>.</p>



<h4 class="wp-block-heading">Troubleshooting Common Issues</h4>



<ol class="wp-block-list">
<li><strong>Installation Fails with Dependencies</strong>
<ul class="wp-block-list">
<li><strong>Symptom:</strong> dpkg -i errors out.</li>



<li><strong>Fix:</strong> Run sudo apt-get install -f or manually install missing packages (e.g., sudo apt-get install python).</li>
</ul>
</li>



<li><strong>Service Won’t Start</strong>
<ul class="wp-block-list">
<li><strong>Symptom:</strong> systemctl status ncpa_listener shows failed.</li>



<li><strong>Fix:</strong> Check logs (sudo journalctl -u ncpa_listener or /var/log/syslog), verify ncpa.cfg syntax.</li>
</ul>
</li>



<li><strong>Web Interface Unreachable</strong>
<ul class="wp-block-list">
<li><strong>Symptom:</strong> Browser times out at https://&lt;IP&gt;:5693/.</li>



<li><strong>Fix:</strong> Ensure the service is running (sudo systemctl status ncpa_listener), port 5693 is open (sudo ufw status), and the IP is correct.&#8221;</li>
</ul>
</li>
</ol>



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



<p>You’ve installed and configured NCPA on Ubuntu 14.04 LTS, enabling system monitoring with optional Nagios XI integration. Due to Ubuntu 14.04’s EOL status, consider migrating to a supported OS for long-term security. For help, consult the <a href="https://support.nagios.com/forum/" target="_blank" rel="noreferrer noopener">Nagios Support Forum</a> or <a href="https://support.nagios.com/kb/" target="_blank" rel="noreferrer noopener">&nbsp;</a><a href="https://support.nagios.com/kb/" target="_blank" rel="noreferrer noopener">Nagios Knowledge Base</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Configuring SNMP on Ubuntu 14.04 LTS for Effective Nagios XI Monitoring</title>
		<link>https://library.nagios.com/tutorials/snmp-on-ubuntu-14-04/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Fri, 14 Mar 2025 13:00:16 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Ubuntu 14]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52130</guid>

					<description><![CDATA[Effective network monitoring is crucial for ensuring system performance and minimizing downtime. Simple Network Management Protocol (SNMP) provides a powerful solution for monitoring network devices and Linux servers with Nagios XI, eliminating the need for additional monitoring agents. This guide will walk you through the step-by-step installation and configuration of SNMP on Ubuntu 14.04 LTS, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Effective network monitoring is crucial for ensuring system performance and minimizing downtime. <strong>Simple Network Management Protocol (SNMP)</strong> provides a powerful solution for monitoring network devices and Linux servers with <strong><a href="https://www.nagios.com/products/nagios-xi/" target="_blank" rel="noopener">Nagios XI</a></strong>, eliminating the need for additional monitoring agents.</p>



<p>This guide will walk you through the step-by-step installation and configuration of SNMP on <strong>Ubuntu 14.04 LTS</strong>, enabling seamless integration with Nagios XI. We’ll cover both <strong>SNMP v2c</strong> (widely used but less secure) and <strong>SNMP v3</strong> (which includes authentication and encryption for enhanced security), ensuring you have the right setup for your monitoring needs.</p>



<p><strong>Important Note</strong>: Ubuntu 14.04 LTS reached end-of-life in April 2019 (standard support) and April 2022 (Extended Security Maintenance). For production environments, consider upgrading to a supported version like Ubuntu 22.04 LTS or 24.04 LTS. This guide is provided for legacy systems or educational purposes.</p>



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



<p>Before proceeding, ensure the following:</p>



<ul class="wp-block-list">
<li>You have administrative or sudo privileges on the Ubuntu machine.</li>



<li>You are using <strong>Ubuntu 14.04 LTS</strong>.</li>



<li>Nagios XI is installed and accessible, with the SNMP Wizard enabled.</li>
</ul>



<h2 class="wp-block-heading">Step 1: Install SNMP Packages</h2>



<p>To install SNMP and the necessary libraries, log in to your Ubuntu machine and execute the following commands:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt-get update
sudo apt-get install snmpd libsnmp-dev -y</textarea></pre><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">sudo apt-get update</span></span>
<span class="line"><span style="color: #D4D4D4">sudo apt-get install snmpd libsnmp-dev -y</span></span></code></pre></div>



<p>This updates your package list and installs:</p>



<ul class="wp-block-list">
<li><strong>libsnmp-dev</strong> (SNMP development libraries for querying SNMP devices)</li>



<li><strong>snmpd</strong> (the SNMP daemon for handling SNMP requests)</li>
</ul>



<h2 class="wp-block-heading">Step 2: Configure SNMP</h2>



<h4 class="wp-block-heading">SNMP v2c Configuration</h4>



<p>To configure SNMP v2c, first, create a backup of the existing configuration:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak</textarea></pre><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">sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak</span></span></code></pre></div>



<p>Now, edit the SNMP configuration file:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo nano /etc/snmp/snmpd.conf</textarea></pre><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">sudo nano /etc/snmp/snmpd.conf</span></span></code></pre></div>



<p>Find and modify the following line to define the community string and allow access from your Nagios XI server (replace <code>Str0ngC0mmunity</code> with your desired community string and <code>10.25.5.12</code> with your Nagios XI server’s IP address):</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>rocommunity Str0ngC0mmunity 10.25.5.12</textarea></pre><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">rocommunity Str0ngC0mmunity 10.25.5.12</span></span></code></pre></div>



<p>Save the file and restart the SNMP service:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo service snmpd restart</textarea></pre><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">sudo service snmpd restart</span></span></code></pre></div>



<h3 class="wp-block-heading">SNMP v3 Configuration (Optional, More Secure)</h3>



<p>To configure SNMP v3, create an SNMP user with authentication and encryption:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo net-snmp-config --create-snmpv3-user -ro -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy nagios</textarea></pre><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">sudo net-snmp-config --create-snmpv3-user -ro -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy nagios</span></span></code></pre></div>



<ul class="wp-block-list">
<li><code>-a SHA</code> → Specifies SHA for authentication (use MD5 if needed, but it’s less secure)</li>



<li><code>-x AES</code> → Enables AES encryption (alternatively, use DES for lower security)</li>
</ul>



<p>Restart the SNMP service:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo service snmpd restart</textarea></pre><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">sudo service snmpd restart</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 3: Configure Firewall Rules</h2>



<p>If <code>ufw</code> (Uncomplicated Firewall) is enabled, allow SNMP traffic:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow snmp
sudo ufw reload</textarea></pre><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">sudo ufw allow snmp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo ufw reload</span></span></code></pre></div>



<p>For better security, allow SNMP traffic only from the Nagios XI server:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow from 10.25.5.0/24 to any port 161 proto udp
sudo ufw reload</textarea></pre><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">sudo ufw allow from 10.25.5.0/24 to any port 161 proto udp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo ufw reload</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 4: Enable SNMP Service on Boot</h2>



<p>To ensure SNMP starts automatically on system boot, run:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo update-rc.d snmpd defaults</textarea></pre><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">sudo update-rc.d snmpd defaults</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 5: Test SNMP Communication</h2>



<p>On your Nagios XI server, test SNMP connectivity using the following commands.</p>



<p>For SNMP v2c:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>snmpwalk -v2c -c Str0ngC0mmunity 10.25.5.12</textarea></pre><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">snmpwalk -v2c -c Str0ngC0mmunity 10.25.5.12</span></span></code></pre></div>



<p>For SNMP v3:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>snmpwalk -v3 -u nagios -l authPriv -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy 10.25.5.12</textarea></pre><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">snmpwalk -v3 -u nagios -l authPriv -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy 10.25.5.12</span></span></code></pre></div>



<h3 class="wp-block-heading">Expected Output (Example)</h3>



<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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>iso.3.6.1.2.1.1.1.0 = STRING: "Linux myserver 3.13.0-32-generic"
iso.3.6.1.2.1.1.3.0 = Timeticks: (100032) 0:16:40.32</textarea></pre><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">iso.3.6.1.2.1.1.1.0 = STRING: &quot;Linux myserver 3.13.0-32-generic&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">iso.3.6.1.2.1.1.3.0 = Timeticks: (100032) 0:16:40.32</span></span></code></pre></div>



<h2 class="wp-block-heading">Troubleshooting Steps</h2>



<p>If SNMP does not return data:</p>



<p>1. Verify SNMP Service is Running:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo service snmpd status</textarea></pre><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">sudo service snmpd status</span></span></code></pre></div>



<p>2. Check Listening Ports: </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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>netstat -tulnp | grep snmp</textarea></pre><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">netstat -tulnp | grep snmp</span></span></code></pre></div>



<p>3. Ensure Firewall Allows Traffic:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw status</textarea></pre><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">sudo ufw status</span></span></code></pre></div>



<p>4. Check SNMP Logs for Errors: </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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo tail -20 /var/log/syslog</textarea></pre><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">sudo tail -20 /var/log/syslog</span></span></code></pre></div>



<p>5. Test Local SNMP Response: </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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>snmpwalk -v2c -c Str0ngC0mmunity -O e 127.0.0.1</textarea></pre><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">snmpwalk -v2c -c Str0ngC0mmunity -O e 127.0.0.1</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 6: Add Ubuntu Host to Nagios XI</h2>



<p>1. In Nagios XI, go to <strong>Configure</strong> &gt; <strong>Run a configuring wizard</strong>.</p>



<p>2. Select the <strong>Linux SNMP Wizard</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544.png"><img loading="lazy" decoding="async" width="1024" height="510" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544-1024x510.png" alt="Screenshot 2025 03 14 074544" class="wp-image-52137" title="Configuring SNMP on Ubuntu 14.04 LTS for Effective Nagios XI Monitoring 8" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544-1024x510.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544-300x149.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544-768x383.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544-1536x765.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074544.png 1548w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Linux SNMP</figcaption></figure>



<p>3. Enter the Ubuntu machine’s IP (e.g., 10.25.5.12) and SNMP credentials (v2c community string or v3 details).</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074634.png"><img loading="lazy" decoding="async" width="1024" height="494" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074634-1024x494.png" alt="Screenshot 2025 03 14 074634" class="wp-image-52138" title="Configuring SNMP on Ubuntu 14.04 LTS for Effective Nagios XI Monitoring 9" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074634-1024x494.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074634-300x145.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074634-768x371.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-14-074634.png 1482w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">SNMP Config step 1</figcaption></figure>



<p>4. Click <strong>Next</strong>, choose metrics to monitor (e.g., CPU, memory, disk), and apply the configuration.</p>



<p>5. Verify data collection in Nagios XI’s dashboard</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-153207-1.png"><img loading="lazy" decoding="async" width="1024" height="338" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-153207-1-1024x338.png" alt="Screenshot 2025 02 11 153207 1" class="wp-image-52143" title="Configuring SNMP on Ubuntu 14.04 LTS for Effective Nagios XI Monitoring 10" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-153207-1-1024x338.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-153207-1-300x99.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-153207-1-768x254.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-153207-1.png 1332w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Host Status</figcaption></figure>



<h2 class="wp-block-heading">Common Issues &amp; Fixes</h2>



<ul class="wp-block-list">
<li>Host appears &#8220;Down&#8221; in Nagios XI:
<ul class="wp-block-list">
<li>Check SNMP configuration and firewall rules.</li>
</ul>
</li>



<li>Incorrect SNMP credentials error:
<ul class="wp-block-list">
<li>Verify the community string (SNMP v2c) or authentication details (SNMP v3).</li>
</ul>
</li>



<li>No data returned in <code>snmpwalk</code>:
<ul class="wp-block-list">
<li>Ensure <code>snmpd</code> is running and listening on port 161.</li>
</ul>
</li>
</ul>



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



<p>You’ve now configured SNMP on Ubuntu 14.04 for monitoring with Nagios XI. For optimal security and support, consider migrating to a current Ubuntu LTS release. To customize monitoring further, explore Nagios XI’s advanced options or visit the <a href="https://support.nagios.com/forum/" target="_blank" rel="noopener">Nagios Support Forum </a>or the <a href="https://support.nagios.com/kb/" target="_blank" rel="noopener">Nagios Knowledgebase.</a></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Step-by-Step Guide: Setting Up SNMP on Ubuntu 24 for Nagios XI</title>
		<link>https://library.nagios.com/tutorials/step-by-step-guide-setting-up-snmp-on-ubuntu-24-for-nagios-xi/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Fri, 14 Feb 2025 15:06:55 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Ubuntu 24]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=46551</guid>

					<description><![CDATA[Efficient network monitoring is essential for maintaining system performance and preventing downtime. SNMP (Simple Network Management Protocol) provides a robust mechanism for monitoring network devices and Linux servers with Nagios XI, eliminating the need for additional agents. This guide walks you through the installation and configuration of SNMP on Ubuntu 24 for seamless integration with [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Efficient network monitoring is essential for maintaining system performance and preventing downtime. SNMP (Simple Network Management Protocol) provides a robust mechanism for monitoring network devices and Linux servers with <a href="https://www.nagios.com/products/nagios-xi/" target="_blank" rel="noopener">Nagios XI</a>, eliminating the need for additional agents.</p>



<p>This guide walks you through the installation and configuration of SNMP on Ubuntu 24 for seamless integration with Nagios XI. We will cover both SNMP v2c (widely used but less secure) and SNMP v3 (offering authentication and encryption for enhanced security).</p>



<h3 class="wp-block-heading">Target Audience</h3>



<p>This document is intended for Nagios XI administrators who want to implement SNMP-based monitoring on Ubuntu machines to gain real-time visibility into system metrics.</p>



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



<p>Before proceeding, ensure the following:</p>



<ul class="wp-block-list">
<li>You have administrative or sudo privileges on the Ubuntu machine.</li>



<li>You are using Ubuntu 24.04 or later.</li>



<li>Nagios XI is installed and accessible, with the SNMP Wizard enabled.</li>
</ul>



<h2 class="wp-block-heading">Step 1: Install SNMP Packages</h2>



<p>To install SNMP and the necessary libraries, log in to your Ubuntu machine and execute the following command:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt-get update
sudo apt-get install snmpd libsnmp-dev -y</textarea></pre><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">sudo apt-get update</span></span>
<span class="line"><span style="color: #D4D4D4">sudo apt-get install snmpd libsnmp-dev -y</span></span></code></pre></div>



<p>This updates your package list and installs:</p>



<ul class="wp-block-list">
<li><code>libsnmp-dev</code> (SNMP development libraries for querying SNMP devices).</li>



<li><code>snmpd</code> (the SNMP daemon for handling SNMP requests).</li>
</ul>



<h2 class="wp-block-heading">Step 2: Configure SNMP</h2>



<h3 class="wp-block-heading">SNMP v2c Configuration</h3>



<p>To configure SNMP v2c, first, create a backup of the existing configuration:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak</textarea></pre><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">sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak</span></span></code></pre></div>



<p>Now, edit the SNMP configuration file:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo nano /etc/snmp/snmpd.conf</textarea></pre><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">sudo nano /etc/snmp/snmpd.conf</span></span></code></pre></div>



<p>Change #agentAddress to:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>agentAddress udp:161</textarea></pre><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">agentAddress udp:161</span></span></code></pre></div>



<p>Find and modify the following line to define the community string and allow access from your Nagios XI server (replace <code>public</code> with your desired community string and <code>192.168.0.23</code> with your Nagios XI server’s IP address):</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>rocommunity public 127.0.0.1 #loclal host
recommunity public 192.168.1.0/24 
recommunity public 192.168.0.23/32 #My Nagios XI Example
recommunity6 public 192.168.1.0/24</textarea></pre><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">rocommunity public 127.0.0.1 #loclal host</span></span>
<span class="line"><span style="color: #D4D4D4">recommunity public 192.168.1.0/24 </span></span>
<span class="line"><span style="color: #D4D4D4">recommunity public 192.168.0.23/32 #My Nagios XI Example</span></span>
<span class="line"><span style="color: #D4D4D4">recommunity6 public 192.168.1.0/24</span></span></code></pre></div>



<p>Example .conf file.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="523" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-07-14-121618-1024x523.png" alt=".conf file example code." class="wp-image-60874" title="Step-by-Step Guide: Setting Up SNMP on Ubuntu 24 for Nagios XI 11" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-07-14-121618-1024x523.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-07-14-121618-300x153.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-07-14-121618-768x392.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-07-14-121618.png 1228w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">snmpd.conf file example.</figcaption></figure>



<p>Save the file and restart the SNMP service:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl restart snmpd.service</textarea></pre><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">sudo systemctl restart snmpd.service</span></span></code></pre></div>



<h3 class="wp-block-heading">SNMP v3 Configuration (Optional, More Secure)</h3>



<p>To configure SNMP v3, create an SNMP user with authentication and encryption:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo net-snmp-create-v3-user -ro -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy nagios</textarea></pre><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">sudo net-snmp-create-v3-user -ro -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy nagios</span></span></code></pre></div>



<ul class="wp-block-list">
<li><code>-a SHA</code> → Specifies SHA for authentication (use <code>MD5</code> if needed, but it&#8217;s less secure)</li>



<li><code>-x AES</code> → Enables AES encryption (alternatively, use <code>DES</code> for lower security)</li>
</ul>



<p>Restart the SNMP service:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl restart snmpd.service</textarea></pre><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">sudo systemctl restart snmpd.service</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 3: Configure Firewall Rules</h2>



<p>If your Ubuntu firewall (<code>ufw</code>) is enabled, allow SNMP traffic:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow snmp
sudo ufw reload</textarea></pre><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">sudo ufw allow snmp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo ufw reload</span></span></code></pre></div>



<p>For better security, allow SNMP traffic only from the Nagios XI server:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow from 192.168.1.0/24 to any port 161 proto udp</textarea></pre><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">sudo ufw allow from 192.168.1.0/24 to any port 161 proto udp</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 4: Enable SNMP Service on Boot</h2>



<p>To ensure SNMP starts automatically on system boot, run:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl enable snmpd.service</textarea></pre><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">sudo systemctl enable snmpd.service</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 5: Test SNMP Communication</h2>



<p>On your Nagios XI server, test SNMP connectivity using the following commands.</p>



<p>For SNMP v2c:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>snmpwalk -v2c -c public &lt;Your-IP-Address>#your </textarea></pre><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">snmpwalk -v2c -c public &lt;Your-IP-Address&gt;#your </span></span></code></pre></div>



<p>For SNMP v3:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>snmpwalk -v3 -u nagios -l authPriv -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy &lt;Your-IP-Address></textarea></pre><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">snmpwalk -v3 -u nagios -l authPriv -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy &lt;Your-IP-Address&gt;</span></span></code></pre></div>



<p>Expected Output (Example)</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>iso.3.6.1.2.1.1.1.0 = STRING: "Linux myserver 5.15.0-72-generic"
iso.3.6.1.2.1.1.3.0 = Timeticks: (100032) 0:16:40.32</textarea></pre><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">iso.3.6.1.2.1.1.1.0 = STRING: &quot;Linux myserver 5.15.0-72-generic&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">iso.3.6.1.2.1.1.3.0 = Timeticks: (100032) 0:16:40.32</span></span></code></pre></div>



<h3 class="wp-block-heading">Troubleshooting Steps</h3>



<p>If SNMP does not return data:</p>



<p>1. Verify SNMP service is running:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl status snmpd</textarea></pre><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">sudo systemctl status snmpd</span></span></code></pre></div>



<p>2. Check listening ports:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl status snmpd</textarea></pre><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">sudo systemctl status snmpd</span></span></code></pre></div>



<p>3. Ensure firewall allows traffic:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw status</textarea></pre><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">sudo ufw status</span></span></code></pre></div>



<p>4. Check SNMP logs for errors:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo journalctl -u snmpd --no-pager | tail -20</textarea></pre><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">sudo journalctl -u snmpd --no-pager | tail -20</span></span></code></pre></div>



<p>5. Test local SNMP response:</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" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>snmpwalk -v2c -c public-O e 127.0.0.1</textarea></pre><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">snmpwalk -v2c -c public-O e 127.0.0.1</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 6: Add Ubuntu Host to Nagios XI Using SNMP Wizard</h2>



<p>1. In Nagios XI, navigate to <strong>Configure &gt; Run a Configuring Wizard</strong>.</p>



<p>2. Search for and select the <strong>Linux SNMP Wizard</strong>.</p>



<p>3. Enter the Ubuntu machine’s IP address and SNMP credentials.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-151739-1.png"><img loading="lazy" decoding="async" width="854" height="623" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-151739-1.png" alt="Screenshot of Linux SNMP Wizard in Nagios XI." class="wp-image-46682" title="Step-by-Step Guide: Setting Up SNMP on Ubuntu 24 for Nagios XI 12" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-151739-1.png 854w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-151739-1-300x219.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-151739-1-768x560.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-151739-1-360x263.png 360w" sizes="(max-width: 854px) 100vw, 854px" /></a><figcaption class="wp-element-caption">Example output of step 1 configuration.</figcaption></figure>



<p>4. Click <strong>Next</strong>, select the system metrics to monitor (CPU, memory, disk, network traffic, etc.).</p>



<p>5. Apply the configuration and verify that Nagios XI is collecting SNMP data.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1.png"><img loading="lazy" decoding="async" width="1024" height="338" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1-1024x338.png" alt="Screenshot of Host Status detail screen in Nagios XI." class="wp-image-46681" title="Step-by-Step Guide: Setting Up SNMP on Ubuntu 24 for Nagios XI 13" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1-1024x338.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1-300x99.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1-768x254.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1-360x119.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-153207-1.png 1332w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Example output of Host Status details.</figcaption></figure>



<h2 class="wp-block-heading">Common Issues &amp; Fixes</h2>



<ul class="wp-block-list">
<li><strong>Host appears &#8220;Down&#8221; in Nagios XI:</strong>
<ul class="wp-block-list">
<li>Check SNMP configuration and firewall rules.</li>
</ul>
</li>



<li><strong>Incorrect SNMP credentials error:</strong>
<ul class="wp-block-list">
<li>Verify the community string (SNMP v2c) or authentication details (SNMP v3).</li>
</ul>
</li>



<li><strong>No data returned in </strong><code><strong>snmpwalk</strong></code><strong>:</strong>
<ul class="wp-block-list">
<li>Ensure <code>snmpd</code> is running and listening on port 161.</li>
</ul>
</li>
</ul>



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



<p>You have successfully installed and configured SNMP on Ubuntu for monitoring with Nagios XI. If you encounter issues, check the firewall settings and ensure the correct SNMP configurations are applied.</p>



<p>For further support, visit the <a href="https://support.nagios.com/forum/" target="_blank" rel="noopener">Nagios Support Forum</a> or the <a href="https://library.nagios.com/docs" target="_blank" rel="noreferrer noopener">Nagios Docs</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2</title>
		<link>https://library.nagios.com/tutorials/ubuntu-logs-to-nagios-log-server/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Wed, 12 Feb 2025 14:57:21 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nagios Log Server]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[Ubuntu 24]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=45698</guid>

					<description><![CDATA[Nagios Log Server is a powerful tool that enables IT administrators to collect, analyze, and manage logs from various sources. This guide will walk you through the process of setting up a new log source in Nagios Log Server, specifically focusing on Linux systems using rsyslog. By the end of this tutorial, you will have [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Log Server is a powerful tool that enables IT administrators to collect, analyze, and manage logs from various sources. This guide will walk you through the process of setting up a new log source in <a href="https://www.nagios.com/products/nagios-log-server/" target="_blank" rel="noopener">Nagios Log Server</a>, specifically focusing on Linux systems using rsyslog. By the end of this tutorial, you will have successfully configured your Linux machine to send logs to Nagios Log Server.</p>



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



<p>Before proceeding, ensure you have the following:</p>



<ul class="wp-block-list">
<li>Access to a Nagios Log Server instance (recommended latest stable release)</li>



<li>An Ubuntu system (recommended Ubuntu 20.04 or later)</li>



<li>Root or sudo privileges on your Ubuntu machine</li>



<li>Network connectivity between Ubuntu and Nagios Log Server (verify firewall settings)</li>
</ul>



<h3 class="wp-block-heading">Video Tutorial</h3>



<p>Enhance your understanding with this detailed, step-by-step visual walkthrough of &#8220;Nagios Log Server 2024R2 Jumpstart: Start Monitoring in Minutes.&#8221;</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Nagios Log Server 2024R2 Jumpstart: Start Monitoring in Minutes" width="800" height="450" src="https://www.youtube.com/embed/r2kE0ytd7hU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">Step 1: Add a New Log Source in Nagios Log Server</h2>



<ol class="wp-block-list">
<li><strong>Login to Nagios Log Server</strong>:
<ul class="wp-block-list">
<li>Open your web browser and navigate to your Nagios Log Server instance.</li>



<li>Log in with your administrator credentials.</li>
</ul>
</li>



<li><strong>Navigate to Log Source Setup</strong>:
<ul class="wp-block-list">
<li>On the Home page, locate the <strong>+ Linux</strong> button in the bottom right corner.</li>
</ul>
</li>
</ol>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot.png"><img loading="lazy" decoding="async" width="1878" height="287" src="https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot.png" alt="linux circle screenshot" class="wp-image-46396" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 14" srcset="https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot.png 1878w, https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot-300x46.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot-1024x156.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot-768x117.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot-1536x235.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/linux-circle-screenshot-360x55.png 360w" sizes="(max-width: 1878px) 100vw, 1878px" /></a><figcaption class="wp-element-caption">Example output of the Add a log source + Linux</figcaption></figure>



<p>3. Alternatively, click <strong>+ Add Log Source</strong> in the navigation bar and select <strong>Linux</strong> from the list.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot.png"><img loading="lazy" decoding="async" width="1024" height="161" src="https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-1024x161.png" alt="Add log source screenshot" class="wp-image-46397" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 15" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-1024x161.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-300x47.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-768x121.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-1536x241.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-360x57.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot.png 1878w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Example output of the Alternative way of + Add a log source</figcaption></figure>



<h2 class="wp-block-heading">Step 2: Configuring the Linux Log Source</h2>



<p>1. <strong>Download and Run the Setup Script</strong>:</p>



<ol class="wp-block-list">
<li>The <strong>Linux Source Setup</strong> page provides a code block with a pre-configured command.</li>



<li>Copy the command using your mouse.</li>



<li>Open a terminal on your Linux machine and paste the command.</li>



<li>If you don’t have <code>curl</code> installed, install it by running:</li>
</ol>



<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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt update &amp;&amp; sudo apt install -y curl</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo apt update &amp;&amp; sudo apt install -y curl</span></span></code></pre></div>



<p>Then, execute the following command to download and run the setup script:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl -sS -O http://your-nagios-log-server-address/nagioslogserver/scripts/setup-linux.sh
sudo bash setup-linux.sh -s your-nagios-log-server-address -p 5544</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #F69D50">curl</span><span style="color: #ADBAC7"> </span><span style="color: #6CB6FF">-sS</span><span style="color: #ADBAC7"> </span><span style="color: #6CB6FF">-O</span><span style="color: #ADBAC7"> </span><span style="color: #96D0FF">http://your-nagios-log-server-address/nagioslogserver/scripts/setup-linux.sh</span></span>
<span class="line"><span style="color: #F69D50">sudo</span><span style="color: #ADBAC7"> </span><span style="color: #96D0FF">bash</span><span style="color: #ADBAC7"> </span><span style="color: #96D0FF">setup-linux.sh</span><span style="color: #ADBAC7"> </span><span style="color: #6CB6FF">-s</span><span style="color: #ADBAC7"> </span><span style="color: #96D0FF">your-nagios-log-server-address</span><span style="color: #ADBAC7"> </span><span style="color: #6CB6FF">-p</span><span style="color: #ADBAC7"> </span><span style="color: #6CB6FF">5544</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Replace <code>your-nagios-log-server-address</code> with the actual IP address or hostname of your Nagios Log Server.</li>



<li>The <code>-s</code> flag specifies the Nagios Log Server address, and <code>-p 5544</code> specifies the port for log transmission (default is 5544).</li>
</ul>



<p>2. <strong>Verify the Script Execution</strong>:</p>



<ul class="wp-block-list">
<li>The script configures <code>rsyslog</code> and establishes a connection with the Nagios Log Server. After running the script, you should see a message like:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl -sS -O http://192.168.0.65/nagioslogserver/scripts/setup-linux.sh
sudo bash setup-linux.sh -s 192.168.0.65 -p 5544
Detected rsyslog 8.2312.0
Detected rsyslog work directory /var/spool/rsyslog
Destination Log Server: 192.168.0.65:5544
Creating /etc/rsyslog.d/99-nagioslogserver.conf...
getenforce command not found, assuming SELinux is disabled.
rsyslog configuration check passed.
Restarting rsyslog service with 'service'..
Okay.
rsyslog is running with the new configuration.
Visit your Nagios Log Server dashboard to verify that logs are being received.</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">curl -sS -O http://192.168.0.65/nagioslogserver/scripts/setup-linux.sh</span></span>
<span class="line"><span style="color: #adbac7">sudo bash setup-linux.sh -s 192.168.0.65 -p 5544</span></span>
<span class="line"><span style="color: #adbac7">Detected rsyslog 8.2312.0</span></span>
<span class="line"><span style="color: #adbac7">Detected rsyslog work directory /var/spool/rsyslog</span></span>
<span class="line"><span style="color: #adbac7">Destination Log Server: 192.168.0.65:5544</span></span>
<span class="line"><span style="color: #adbac7">Creating /etc/rsyslog.d/99-nagioslogserver.conf...</span></span>
<span class="line"><span style="color: #adbac7">getenforce command not found, assuming SELinux is disabled.</span></span>
<span class="line"><span style="color: #adbac7">rsyslog configuration check passed.</span></span>
<span class="line"><span style="color: #adbac7">Restarting rsyslog service with &#39;service&#39;..</span></span>
<span class="line"><span style="color: #adbac7">Okay.</span></span>
<span class="line"><span style="color: #adbac7">rsyslog is running with the new configuration.</span></span>
<span class="line"><span style="color: #adbac7">Visit your Nagios Log Server dashboard to verify that logs are being received.</span></span></code></pre></div>



<ul class="wp-block-list">
<li>If you encounter any errors, check the script logs and ensure that the Nagios Log Server is reachable and that port 5544 is open.</li>
</ul>



<p>3. In Nagios Log Server, enter the IP address of the Linux machine in the IP Address search field. You should see the number of logs being received for the host, indicating successful log transmission.</p>



<p>Example output:</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500.png"><img loading="lazy" decoding="async" width="1024" height="520" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500-1024x520.png" alt="Screenshot 2025 02 13 092500" class="wp-image-46508" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 16" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500-1024x520.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500-300x152.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500-768x390.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500-360x183.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-092500.png 1449w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">verifying the incoming logs.</figcaption></figure>



<h2 class="wp-block-heading">Step 3: Confirming Log Reception</h2>



<p>1. <strong>Navigate to Dashboards</strong>:</p>



<ul class="wp-block-list">
<li>In Nagios Log Server, go to the <strong>Dashboards</strong> section.</li>



<li>Perform a query using the IP address of the Linux machine to confirm logs are being received.</li>
</ul>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1.png"><img loading="lazy" decoding="async" width="1895" height="949" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1.png" alt="Screenshot 2025 02 13 094037 1" class="wp-image-46410" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 17" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1.png 1895w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1-300x150.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1-1024x513.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1-768x385.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1-1536x769.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094037-1-360x180.png 360w" sizes="(max-width: 1895px) 100vw, 1895px" /></a><figcaption class="wp-element-caption">Example output of the ip address of the linux</figcaption></figure>



<p>2. <strong>Send a Test Log Entry</strong>:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>logger "This is a test log entry"</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">logger &quot;This is a test log entry&quot;</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Refresh the Nagios Log Server dashboard to check if the test log appears. If successful, you should see the test log entry listed in the dashboard.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117.png"><img loading="lazy" decoding="async" width="1024" height="499" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117-1024x499.png" alt="Screenshot 2025 02 13 094117" class="wp-image-46414" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 18" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117-1024x499.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117-300x146.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117-768x375.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117-1536x749.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117-360x176.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-094117.png 1919w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Example output of the test log</figcaption></figure>



<h2 class="wp-block-heading">Step 4: Accessing the Setup Script on Nagios Log Server</h2>



<ul class="wp-block-list">
<li>The setup script is located on the Nagios Log Server instance at the following path:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>/var/www/html/nagioslogserver/www/scripts/setup-linux.sh</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">/var/www/html/nagioslogserver/www/scripts/setup-linux.sh</span></span></code></pre></div>



<ul class="wp-block-list">
<li>You can access it directly via a browser or SSH if you need to make manual adjustments.</li>
</ul>



<h2 class="wp-block-heading">Step 5: Adding More Log Sources</h2>



<ul class="wp-block-list">
<li>Use the <strong>+ Add Log Source</strong> button to configure additional sources such as Windows event logs, application logs, and archived log files.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2.png"><img loading="lazy" decoding="async" width="1024" height="161" src="https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2-1024x161.png" alt="Add log source screenshot 2" class="wp-image-46528" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 19" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2-1024x161.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2-300x47.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2-768x121.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2-1536x241.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2-360x57.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Add-log-source-screenshot-2.png 1878w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Example output of + Add Log Source</figcaption></figure>



<ul class="wp-block-list">
<li>Some log sources offer both <strong>scripted</strong> and <strong>manual</strong> setup options.</li>



<li>The <strong>manual method</strong> provides more customization by allowing direct configuration file edits.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832.png"><img loading="lazy" decoding="async" width="1024" height="606" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832-1024x606.png" alt="Screenshot 2025 02 13 135832" class="wp-image-46529" title="Step-by-Step Guide: How to Forward Ubuntu Logs to Nagios Log Server 2024R2 20" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832-1024x606.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832-300x177.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832-768x454.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832-360x213.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-13-135832.png 1430w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Example output of manual set up options</figcaption></figure>



<h2 class="wp-block-heading">Troubleshooting Tips</h2>



<p>If logs are not appearing in Nagios Log Server, consider these troubleshooting steps:</p>



<p>1. <strong>Check <code>rsyslog</code> Status</strong>: Ensure that <code>rsyslog</code> is installed and running. You can check its status with:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>systemctl status rsyslog</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">systemctl status rsyslog</span></span></code></pre></div>



<p>If the service is not running, start it with:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl start rsyslog  # Start if not running</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo systemctl start rsyslog  # Start if not running</span></span></code></pre></div>



<p>2. <strong>Verify Network Connectivity</strong>: Ensure that the Ubuntu machine can communicate with the Nagios Log Server on port 5544. Check for network restrictions such as firewalls or proxy settings that could block the connection.</p>



<p>3. <strong>Check Firewall Settings</strong>: If you&#8217;re using <code>ufw</code> on Ubuntu, you may need to allow traffic on port 5544:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow 5544/tcp</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo ufw allow 5544/tcp</span></span></code></pre></div>



<p>Also, check if there are any firewall rules on the Nagios Log Server that might block incoming log data.</p>



<p>4. <strong>Review Log Files</strong>: If the above steps don’t resolve the issue, review the log files on the Nagios Log Server and the Ubuntu machine for errors or messages that could indicate the root cause of the issue.</p>



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



<p>By following this guide, you have successfully configured your Ubuntu machine to send logs to Nagios Log Server for centralized monitoring. This setup allows you to efficiently monitor system logs and gain insights into potential issues in real-time.</p>



<p>You can now extend your log monitoring capabilities by adding other sources and fine-tuning your configurations. For more advanced setups, consider using custom log filters and alerts.</p>



<p>For troubleshooting or further assistance, visit the <a href="https://support.nagios.com/kb" target="_blank" rel="noopener">Nagios Knowledgebase</a> or check the <a href="https://support.nagios.com/forum" target="_blank" rel="noopener">Nagios Support Forums</a>.</p>
]]></content:encoded>
					
		
		
		<media:content url="https://www.youtube.com/embed/r2kE0ytd7hU" medium="video">
			<media:player url="https://www.youtube.com/embed/r2kE0ytd7hU" />
			<media:title type="plain">Ubuntu Linux Archives - Nagios Library</media:title>
			<media:thumbnail url="https://library.nagios.com/wp-content/uploads/2025/02/previewimage-1-1-2-1-1-1-1-1.png" />
			<media:rating scheme="urn:simple">nonadult</media:rating>
		</media:content>
	</item>
		<item>
		<title>How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS</title>
		<link>https://library.nagios.com/tutorials/how-to-install-nagios-ncpa-on-ubuntu-24/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Tue, 04 Feb 2025 20:03:09 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[Ubuntu 24]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=43602</guid>

					<description><![CDATA[The Nagios Cross Platform Agent (NCPA) offers a seamless way to monitor systems across different operating systems. This guide outlines how to install and configure NCPA on Ubuntu 24.04 LTS versions. Prerequisites Before beginning the installation, ensure the following requirements are met: Example output: Step 1: Download the NCPA Package To download the latest NCPA [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The Nagios Cross Platform Agent (NCPA) offers a seamless way to monitor systems across different operating systems. This guide outlines how to install and configure NCPA on Ubuntu 24.04 LTS versions.</p>



<h3 class="wp-block-heading"><strong>Prerequisites</strong></h3>



<p>Before beginning the installation, ensure the following requirements are met:</p>



<ul class="wp-block-list">
<li>A system running Ubuntu 24.04 LTS</li>



<li>Root or sudo privileges</li>



<li>Stable internet connection</li>



<li>Verify your Ubuntu version by running the command: <code>lsb_release -a</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>lsb_release -a</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">lsb_release -a</span></span></code></pre></div>



<p><strong>Example output:</strong></p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-153004.png"><img loading="lazy" decoding="async" width="687" height="112" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-153004.png" alt="output of the Ubuntu Version." class="wp-image-43606" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 21" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-153004.png 687w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-153004-300x49.png 300w" sizes="(max-width: 687px) 100vw, 687px" /></a><figcaption class="wp-element-caption">Output of the Ubuntu Machine.</figcaption></figure>



<h3 class="wp-block-heading"><strong>Step 1: Download the NCPA Package</strong></h3>



<p>To download the latest NCPA package for your Ubuntu system, open a terminal and run:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wget https://assets.nagios.com/downloads/ncpa3/ncpa-latest-1.amd64.deb</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">wget https://assets.nagios.com/downloads/ncpa3/ncpa-latest-1.amd64.deb</span></span></code></pre></div>



<h3 class="wp-block-heading"><strong>Step 2: Install the NCPA Package</strong></h3>



<p>Once the package is downloaded, install it using the following command:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo dpkg -i ncpa-latest-1.amd64.deb</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo dpkg -i ncpa-latest-1.amd64.deb</span></span></code></pre></div>



<p>If you encounter dependency errors, resolve them by running:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt-get install -f</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo apt-get install -f</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 2 (Alternative): Installing NCPA via Repository (Preferred Method)</h3>



<p>Alternatively, you can install NCPA via the Nagios repository. To check the compatible Ubuntu<br>versions for NCPA, visit the following link: <a href="https://repo.nagios.com/?repo=deb-ubuntu" target="_blank" rel="noopener">Compatible Ubuntu Versions with NCPA</a></p>



<p>To install NCPA via the Nagios repository:</p>



<p>1. Add the Nagios repository:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>echo "deb https://repo.nagios.com/deb/$(lsb_release -cs) /" > /etc/apt/sources.list.d/nagios.list</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">echo &quot;deb https://repo.nagios.com/deb/$(lsb_release -cs) /&quot; &gt; /etc/apt/sources.list.d/nagios.list</span></span></code></pre></div>



<p>2. Add the public GPG key:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wget -qO - https://repo.nagios.com/GPG-KEY-NAGIOS-V3 | sudo apt-key add -</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">wget -qO - https://repo.nagios.com/GPG-KEY-NAGIOS-V3 | sudo apt-key add -</span></span></code></pre></div>



<p>3. Update your apt repositories: </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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt-get update</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo apt-get update</span></span></code></pre></div>



<p>4. Install NCPA: </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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo apt-get install ncpa</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo apt-get install ncpa</span></span></code></pre></div>



<h3 class="wp-block-heading"><strong>Step 3: Configure NCPA</strong></h3>



<p>After installation, configure NCPA by editing the configuration file to set your API token:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo nano /usr/local/ncpa/etc/ncpa.cfg</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo nano /usr/local/ncpa/etc/ncpa.cfg</span></span></code></pre></div>



<p>Locate the line:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>community_string = mytoken</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">community_string = mytoken</span></span></code></pre></div>



<p>Example Output:</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-161206.png"><img loading="lazy" decoding="async" width="1024" height="308" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-161206-1024x308.png" alt="Example of the Community_string." class="wp-image-43621" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 22" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-161206-1024x308.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-161206-300x90.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-161206-768x231.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-17-161206.png 1086w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Example of the Community_string.</figcaption></figure>



<p>Replace <code>mytoken</code> with a secure API token of your choice. Save the file (CTRL + X, then Y and Enter).</p>



<h3 class="wp-block-heading"><strong>Step 4: Restart NCPA Service</strong></h3>



<p>To apply the changes, restart the NCPA service:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl restart ncpa</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo systemctl restart ncpa</span></span></code></pre></div>



<h3 class="wp-block-heading"><strong>Step 5: Configure Firewall (if enabled)</strong></h3>



<p>If you have a firewall enabled on your system, you will need to allow traffic on port 5693, which is used<br>by NCPA. For Ubuntu systems, follow these steps to configure UFW (Uncomplicated Firewall) and<br>allow NCPA:</p>



<p>1: Create the necessary directory for UFW application profiles:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo mkdir -p /etc/ufw/applications.d</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo mkdir -p /etc/ufw/applications.d</span></span></code></pre></div>



<p>2: Create and configure a custom application profile for NCPA:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo sh -c "echo '&#91;NCPA&#93;' > /etc/ufw/applications.d/ncpa"
sudo sh -c "echo 'title=Nagios Cross Platform Agent' >> /etc/ufw/applications.d/ncpa"
sudo sh -c "echo 'description=Nagios Monitoring Agent' >> /etc/ufw/applications.d/ncpa"
sudo sh -c "echo 'ports=5693/tcp' >> /etc/ufw/applications.d/ncpa"</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#39;&#91;NCPA&#93;&#39; &gt; /etc/ufw/applications.d/ncpa&quot;</span></span>
<span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#39;title=Nagios Cross Platform Agent&#39; &gt;&gt; /etc/ufw/applications.d/ncpa&quot;</span></span>
<span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#39;description=Nagios Monitoring Agent&#39; &gt;&gt; /etc/ufw/applications.d/ncpa&quot;</span></span>
<span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#39;ports=5693/tcp&#39; &gt;&gt; /etc/ufw/applications.d/ncpa&quot;</span></span></code></pre></div>



<p>3: Allow the NCPA service through the firewall:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw allow NCPA</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo ufw allow NCPA</span></span></code></pre></div>



<p>4: Reload the firewall to apply changes:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw reload</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo ufw reload</span></span></code></pre></div>



<h3 class="wp-block-heading">Troubleshooting: Firewall Not Enabled</h3>



<p>If the firewall is inactive, enable it:</p>



<p>1: Check the current firewall status:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw status</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo ufw status</span></span></code></pre></div>



<p>2: If inactive, enable it:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw enable</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo ufw enable</span></span></code></pre></div>



<p>3: Reload firewall rules:</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" style="color:#adbac7;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo ufw reload</textarea></pre><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 github-dark-dimmed" style="background-color: #22272e" tabindex="0"><code><span class="line"><span style="color: #adbac7">sudo ufw reload</span></span></code></pre></div>



<p><strong>Here is how it should look after you successfully enable the firewall:</strong></p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-161840-1.png"><img loading="lazy" decoding="async" width="630" height="305" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-161840-1.png" alt="Screenshot 2025 01 20 161840 1" class="wp-image-43701" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 23" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-161840-1.png 630w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-161840-1-300x145.png 300w" sizes="(max-width: 630px) 100vw, 630px" /></a><figcaption class="wp-element-caption">Output of the enabled firewall.</figcaption></figure>



<h3 class="wp-block-heading"><strong>Step 6: Test NCPA Installation</strong></h3>



<ol class="wp-block-list">
<li>Open a web browser and navigate to: <code>https://&lt;NCPA_IP_Address&gt;:5693/</code></li>



<li>Bypass the security warning due to self-signed certificates by clicking <strong>Advanced</strong> and selecting <strong>Proceed</strong>.</li>
</ol>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1.png"><img loading="lazy" decoding="async" width="1024" height="517" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1-1024x517.png" alt="Bypassing security." class="wp-image-43703" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 24" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1-1024x517.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1-300x151.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1-768x388.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1-1536x775.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152254-1.png 1918w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Bypass the security example.</figcaption></figure>



<p>3. On the NCPA login page, enter the API token you configured earlier and click <strong>Log In</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1.png"><img loading="lazy" decoding="async" width="1024" height="430" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1-1024x430.png" alt="Web GUI login screen." class="wp-image-43705" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 25" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1-1024x430.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1-300x126.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1-768x323.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1-1536x645.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-152346-1.png 1885w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Login screen example.</figcaption></figure>



<p>4. Upon successful login, you will be directed to the NCPA Dashboard.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-133847-1.png"><img loading="lazy" decoding="async" width="1024" height="466" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-133847-1-1024x466.png" alt="NCPA dashboard screen." class="wp-image-43706" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 26" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-133847-1-1024x466.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-133847-1-300x136.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-133847-1-768x349.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-133847-1.png 1278w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">NCPA dashboard example.</figcaption></figure>



<h3 class="wp-block-heading">Configuring Nagios XI</h3>



<p>To monitor the Ubuntu server using Nagios XI and the NCPA agent, follow these steps:</p>



<ol class="wp-block-list">
<li>Navigate to the Nagios XI dashboard.</li>



<li>Open the NCPA Wizard by selecting <strong>Configure > Run a Monitoring Wizard > NCPA</strong>.</li>



<li>Enter the required details, including the IP address of the server and the API token you configured during NCPA setup.</li>



<li>Complete the Wizard setup and apply configuration changes.</li>
</ol>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100524-1.png"><img loading="lazy" decoding="async" width="1024" height="663" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100524-1-1024x663.png" alt="NCPA Configuration Wizard screen in Nagios XI." class="wp-image-43711" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 27" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100524-1-1024x663.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100524-1-300x194.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100524-1-768x497.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100524-1.png 1479w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">A screenshot of the NCPA Wizard being run with data entered.</figcaption></figure>



<h3 class="wp-block-heading">Verifying Monitoring Setup</h3>



<ol class="wp-block-list">
<li>After completing the Wizard, Nagios XI should display the monitored host and its services.</li>



<li>Navigate to the <strong>Service Status</strong> page to confirm that the system is being monitored.</li>
</ol>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100617.png"><img loading="lazy" decoding="async" width="1024" height="568" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100617-1024x568.png" alt="Host Status Detail screen in Nagios XI." class="wp-image-43712" title="How to Install Nagios Cross Platform Agent (NCPA) on Ubuntu 24.04 LTS 28" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100617-1024x568.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100617-300x167.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100617-768x426.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-01-20-100617.png 1362w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">A screenshot of the host being monitored in XI after the Wizard is run and the system is being monitored.</figcaption></figure>



<p>For more detailed instructions, refer to the <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-Devices-Using-The-NCPA-Agent-And-Nagios-XI.pdf" target="_blank" rel="noopener">Nagios XI Documentation</a>.</p>



<h3 class="wp-block-heading"><strong>Step 7: Configure Nagios XI (Optional)</strong></h3>



<p>Refer to the official Nagios XI documentation for detailed instructions on configuring Nagios XI to monitor servers using NCPA: <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-Devices-Using-The-NCPA-Agent-And-Nagios-XI.pdf" target="_blank" rel="noopener">Monitoring Devices Using The NCPA Agent And Nagios XI</a></p>



<h3 class="wp-block-heading"><strong>Conclusion</strong></h3>



<p>By following this guide, you have successfully installed and configured the Nagios Cross Platform Agent on your Ubuntu system. If you encounter any issues, refer to the <a href="https://support.nagios.com/forum/" target="_blank" rel="noopener">Nagios Support Forum</a> or the <a href="https://support.nagios.com/kb/" target="_blank" rel="noopener">Nagios Documentation</a> for further assistance.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
