<?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/"
	>

<channel>
	<title>CentOS Linux &#8211; Nagios Library</title>
	<atom:link href="https://library.nagios.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>https://library.nagios.com</link>
	<description>Complete Nagios monitoring resources and documentation</description>
	<lastBuildDate>Thu, 02 Apr 2026 20:26:17 +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>CentOS Linux &#8211; Nagios Library</title>
	<link>https://library.nagios.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Log Forwarding to Nagios Log Server R2 on CentOS 7</title>
		<link>https://library.nagios.com/monitoring/nagios-log-server-r2-on-centos-7/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Wed, 26 Mar 2025 14:26:11 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 7]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Log Monitoring]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=53179</guid>

					<description><![CDATA[Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 7 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods. Getting Started After setup, logs that would [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 7 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods.</p>



<p><strong>Getting Started</strong></p>



<p>After setup, logs that would typically appear in <code>/var/log/messages</code> will be forwarded to the Nagios Log Server R2, allowing centralized monitoring and alerting.</p>



<p><strong>Automatic Setup Using a Script</strong></p>



<p>The easiest way to configure log forwarding is by using the provided script. This method requires <code>rsyslog</code> to be installed on your CentOS 7 machine.</p>



<p><strong>Steps to Run the Script:</strong></p>



<ol class="wp-block-list">
<li><strong>Ensure Rsyslog is Installed:</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" 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 yum install rsyslog -y
sudo systemctl enable --now 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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo yum install rsyslog -y</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl enable --now rsyslog</span></span></code></pre></div>



<ol start="2" class="wp-block-list">
<li><strong>Download the Script from the Nagios Log Server R2:</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" 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>curl -sS -O http://192.168.1.49/nagioslogserver/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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">curl -sS -O http://192.168.1.49/nagioslogserver/scripts/setup-linux.sh</span></span></code></pre></div>



<ol start="3" class="wp-block-list">
<li><strong>Execute the Script to Configure Rsyslog:</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" 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 bash setup-linux.sh -s 192.168.1.49 -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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo bash setup-linux.sh -s 192.168.1.49 -p 5544</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Replace <code>192.168.1.49</code> with your Nagios Log Server R2’s IP address.</li>



<li>The <code>-p 5544</code> option specifies the port for log transmission.</li>
</ul>



<p><strong>Manual Setup Using Rsyslog Configuration</strong></p>



<p>If you prefer manual setup or need more control over configurations, follow these steps:</p>



<ol class="wp-block-list">
<li><strong>Edit Rsyslog Configuration:</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" 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>&lt;code>sudo nano /etc/rsyslog.d/99-nagios.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">&lt;code&gt;sudo nano /etc/rsyslog.d/99-nagios.conf</span></span></code></pre></div>



<p><strong>2. Add the following configuration:</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>*.* @@192.168.1.49: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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">*.* @@192.168.1.49:5544</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Replace <code>192.168.1.49</code> with the IP address of your Nagios Log Server R2.</li>



<li>The <code>@@</code> symbol indicates TCP transmission; use <code>@</code> for UDP if needed.</li>
</ul>



<ol start="3" class="wp-block-list">
<li><strong>Restart Rsyslog to Apply Changes:</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" 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 rsyslog&lt;br></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 rsyslog&lt;br&gt;</span></span></code></pre></div>



<ol start="4" class="wp-block-list">
<li><strong>Check Status to Ensure it&#8217;s Running:</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" 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 rsyslog&lt;br></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 rsyslog&lt;br&gt;</span></span></code></pre></div>



<h2 class="wp-block-heading"><strong>Receiving Logs in Log Server</strong></h2>



<p>On your Log Server&#8217;s GUI, click <strong>Add Log Source</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1.png"><img fetchpriority="high" decoding="async" width="1024" height="530" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-1024x530.png" alt="Screenshot 2025 03 21 131259 1" class="wp-image-53120" title="Log Forwarding to Nagios Log Server R2 on CentOS 7 1" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-1024x530.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-300x155.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-768x397.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-1536x794.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1.png 1868w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Nagios Log Server home page</figcaption></figure>



<p>Click <strong>Linux</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1.png"><img decoding="async" width="1024" height="226" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-1024x226.png" alt="Screenshot 2025 03 21 131443 1" class="wp-image-53122" title="Log Forwarding to Nagios Log Server R2 on CentOS 7 2" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-1024x226.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-300x66.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-768x170.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1.png 1248w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Add log source</figcaption></figure>



<p>Type in your machine&#8217;s IP address to see if you are receiving logs. If it&#8217;s working, the interface will confirm that logs are being received.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1.png"><img decoding="async" width="1024" height="642" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-1024x642.png" alt="Screenshot 2025 03 21 132800 1" class="wp-image-53121" title="Log Forwarding to Nagios Log Server R2 on CentOS 7 3" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-1024x642.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-300x188.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-768x482.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1.png 1481w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Verify incoming logs</figcaption></figure>



<p><strong>Conclusion</strong></p>



<p>Whether using the automatic script or manual setup, forwarding logs from CentOS 7 to Nagios Log Server R2 ensures centralized log management for better monitoring and alerting. Use the method that best fits your deployment needs.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Log Forwarding to Nagios Log Server R2 on CentOS 8</title>
		<link>https://library.nagios.com/monitoring/log-server-r2-on-centos-8/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Tue, 25 Mar 2025 14:20:38 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 8]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=53119</guid>

					<description><![CDATA[Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 8 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods. Getting Started After setup, logs that would [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 8 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods.</p>



<h2 class="wp-block-heading"><strong>Getting Started</strong></h2>



<p>After setup, logs that would typically appear in <code>/var/log/messages</code> will be forwarded to the Nagios Log Server R2, allowing centralized monitoring and alerting.</p>



<h2 class="wp-block-heading"><strong>Automatic Setup Using a Scrip</strong>t</h2>



<p>The easiest way to configure log forwarding is by using the provided script. This method requires <code>rsyslog</code> to be installed on your CentOS 8 machine.</p>



<h2 class="wp-block-heading"><strong>Steps to Run the Script:</strong></h2>



<ol start="1" class="wp-block-list">
<li><strong>Ensure Rsyslog is Installed:</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" 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 dnf install rsyslog -y
sudo systemctl enable --now 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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo dnf install rsyslog -y</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl enable --now rsyslog</span></span></code></pre></div>



<ol start="2" class="wp-block-list">
<li><strong>Download the Script from the Nagios Log Server R2:</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" 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>curl -sS -O http://192.168.1.49/nagioslogserver/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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">curl -sS -O http://192.168.1.49/nagioslogserver/scripts/setup-linux.sh</span></span></code></pre></div>



<ol start="3" class="wp-block-list">
<li><strong>Execute the Script to Configure Rsyslog:</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" 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 bash setup-linux.sh -s 192.168.1.49 -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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo bash setup-linux.sh -s 192.168.1.49 -p 5544</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Replace <code>192.168.1.49</code> with your Nagios Log Server R2’s IP address.</li>



<li>The <code>-p 5544</code> option specifies the port for log transmission.</li>
</ul>



<h2 class="wp-block-heading"><strong>Manual Setup Using Rsyslog Configuration</strong></h2>



<p>If you prefer manual setup or need more control over configurations, follow these steps:</p>



<ol start="1" class="wp-block-list">
<li><strong>Edit Rsyslog Configuration:</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" 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/rsyslog.d/99-nagios.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/rsyslog.d/99-nagios.conf</span></span></code></pre></div>



<ol start="2" class="wp-block-list">
<li><strong>Add the Following Configuration:</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" 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>*.* @@192.168.1.49: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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">*.* @@192.168.1.49:5544</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Replace <code>192.168.1.49</code> with the IP address of your Nagios Log Server R2.</li>



<li>The <code>@@</code> symbol indicates TCP transmission; use <code>@</code> for UDP if needed.</li>
</ul>



<ol start="3" class="wp-block-list">
<li><strong>Restart Rsyslog to Apply Changes:</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" 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 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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo systemctl restart rsyslog</span></span></code></pre></div>



<ol start="4" class="wp-block-list">
<li><strong>Check Status to Ensure it&#8217;s Running:</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" 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 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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo systemctl status rsyslog</span></span></code></pre></div>



<h2 class="wp-block-heading"><strong>Receiving Logs in Log Server</strong></h2>



<p>On your Log Server&#8217;s GUI, click <strong>Add Log Source</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1.png"><img loading="lazy" decoding="async" width="1024" height="530" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-1024x530.png" alt="Screenshot 2025 03 21 131259 1" class="wp-image-53120" title="Log Forwarding to Nagios Log Server R2 on CentOS 8 4" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-1024x530.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-300x155.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-768x397.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1-1536x794.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1.png 1868w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Nagios Log Server home page</figcaption></figure>



<p>Click <strong>Linux</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1.png"><img loading="lazy" decoding="async" width="1024" height="226" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-1024x226.png" alt="Screenshot 2025 03 21 131443 1" class="wp-image-53122" title="Log Forwarding to Nagios Log Server R2 on CentOS 8 5" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-1024x226.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-300x66.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1-768x170.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1.png 1248w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Add log source</figcaption></figure>



<p>Type in your machine&#8217;s IP address to see if you are receiving logs. If it&#8217;s working, the interface will confirm that logs are being received.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1.png"><img loading="lazy" decoding="async" width="1024" height="642" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-1024x642.png" alt="Screenshot 2025 03 21 132800 1" class="wp-image-53121" title="Log Forwarding to Nagios Log Server R2 on CentOS 8 6" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-1024x642.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-300x188.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1-768x482.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1.png 1481w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Verify incoming logs</figcaption></figure>



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



<p>Whether using the automatic script or manual setup, forwarding logs from CentOS 8 to Nagios Log Server R2 ensures centralized log management for better monitoring and alerting. Use the method that best fits your deployment needs.</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Sending Logs to Nagios Log Server R2 from CentOS 10</title>
		<link>https://library.nagios.com/monitoring/nagios-log-server-r2-centos10/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Mon, 24 Mar 2025 14:50:40 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 10]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52994</guid>

					<description><![CDATA[Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 10 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods. Getting Started After setup, logs that would [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 10 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods.</p>



<h2 class="wp-block-heading"><strong>Getting Started</strong></h2>



<p>After setup, logs that would typically appear in <code>/var/log/messages</code> will be forwarded to the Nagios Log Server R2, allowing centralized monitoring and alerting.</p>



<h2 class="wp-block-heading"><strong>Automatic Setup Using a Script</strong></h2>



<p>The easiest way to configure log forwarding is by using the provided script. This method requires <code>rsyslog</code> to be installed on your CentOS 10 machine.</p>



<h3 class="wp-block-heading"><strong>Steps to Run the Script</strong></h3>



<p><strong>Download the script</strong> from the Nagios Log Server R2:</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>curl -sS -O http://192.168.1.49/nagioslogserver/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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">curl -sS -O http://192.168.1.49/nagioslogserver/scripts/setup-linux.sh</span></span></code></pre></div>



<p><strong>Execute the script</strong> to configure <code>rsyslog</code>:</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 bash setup-linux.sh -s 192.168.1.49 -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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo bash setup-linux.sh -s 192.168.1.49 -p 5544</span></span></code></pre></div>



<p>Replace <code>192.168.1.49</code> with your Nagios Log Server R2’s IP address.</p>



<p>The <code>-p 5544</code> option specifies the port for log transmission.</p>



<h3 class="wp-block-heading">Receiving Logs in Log Server</h3>



<p>On your Log Servers GUI, click <strong>Add Log Source</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259.png"><img loading="lazy" decoding="async" width="1024" height="530" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1024x530.png" alt="Screenshot 2025 03 21 131259" class="wp-image-52995" title="Sending Logs to Nagios Log Server R2 from CentOS 10 7" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1024x530.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-300x155.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-768x397.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259-1536x794.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131259.png 1868w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Click <strong>Linux</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443.png"><img loading="lazy" decoding="async" width="1024" height="226" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1024x226.png" alt="Screenshot 2025 03 21 131443" class="wp-image-52996" title="Sending Logs to Nagios Log Server R2 from CentOS 10 8" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-1024x226.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-300x66.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443-768x170.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-131443.png 1248w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800.png"><img loading="lazy" decoding="async" width="1024" height="642" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1024x642.png" alt="Screenshot 2025 03 21 132800" class="wp-image-52997" title="Sending Logs to Nagios Log Server R2 from CentOS 10 9" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-1024x642.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-300x188.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800-768x482.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-21-132800.png 1481w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Now type in your machine&#8217;s IP address to see if you are receiving logs. If it&#8217;s working, it will confirm that logs are being received.</p>



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



<p>Whether using the automatic script or manual setup, forwarding logs from CentOS 10 to Nagios Log Server R2 ensures centralized log management for better monitoring and alerting. Use the method that best fits your deployment needs.</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Installing Nagios Cross Platform Agent (NCPA) on CentOS 7 and Monitoring with Nagios XI</title>
		<link>https://library.nagios.com/monitoring/installing-ncpa-on-centos-7/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Wed, 19 Mar 2025 17:07:18 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 7]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52528</guid>

					<description><![CDATA[Monitoring your infrastructure is essential for maintaining system health and performance. The Nagios Cross Platform Agent (NCPA) is a powerful and versatile monitoring agent that allows Nagios to monitor Linux, Windows, and macOS systems with ease. This guide will walk you through installing and configuring NCPA on CentOS 7. Step 1: Add the Nagios Repository [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Monitoring your infrastructure is essential for maintaining system health and performance. The Nagios Cross Platform Agent (NCPA) is a powerful and versatile monitoring agent that allows Nagios to monitor Linux, Windows, and macOS systems with ease. This guide will walk you through installing and configuring NCPA on CentOS 7.</p>



<h3 class="wp-block-heading">Step 1: Add the Nagios Repository</h3>



<p>First, add the Nagios repository to your system to access the NCPA package:</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 rpm -Uvh https://repo.nagios.com/nagios/7/nagios-repo-7-4.el7.noarch.rpm</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 rpm -Uvh https://repo.nagios.com/nagios/7/nagios-repo-7-4.el7.noarch.rpm</span></span></code></pre></div>



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



<p>Once the repository is added, install NCPA 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:#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 yum install ncpa -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 yum install ncpa -y</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 3: Start and Enable NCPA Services</h3>



<p>After installation, start and enable the NCPA services to run at boot:</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 ncpa
sudo systemctl start 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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo systemctl enable ncpa</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl start ncpa</span></span></code></pre></div>



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



<p>The main configuration file for NCPA is located 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" 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>/etc/ncpa/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">/etc/ncpa/ncpa.cfg</span></span></code></pre></div>



<p>Before making changes, back up the original 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 cp /etc/ncpa/ncpa.cfg /etc/ncpa/ncpa.cfg.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/ncpa/ncpa.cfg /etc/ncpa/ncpa.cfg.bak</span></span></code></pre></div>



<p>Now, edit the 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/ncpa/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 /etc/ncpa/ncpa.cfg</span></span></code></pre></div>



<p>Locate the <code>[api]</code> section and update the <code>community_string</code> value:</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>&#91;api&#93;
community_string = YourCommunity</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">&#91;api&#93;</span></span>
<span class="line"><span style="color: #D4D4D4">community_string = YourCommunity</span></span></code></pre></div>



<p>Save and exit the file, then restart the NCPA services:</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 ncpa_listener
sudo systemctl restart ncpa_passive</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 ncpa_listener</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl restart ncpa_passive</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 5: Adjust Firewall Rules</h3>



<p>To allow NCPA traffic, open the necessary 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 firewall-cmd --permanent --add-port=5693/tcp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=5693/tcp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 6: Verify NCPA Functionality</h3>



<p>To check if NCPA is running correctly, 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;server-ip>: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;server-ip&gt;:5693</span></span></code></pre></div>



<p>Log in using the community string configured earlier. If you see the NCPA web interface, the agent is working correctly.</p>



<h3 class="wp-block-heading">Monitoring with Nagios</h3>



<p>On your Nagios web GUI, click <strong>Run a wizard</strong> and find the <strong>NCPA</strong> wizard.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2.png"><img loading="lazy" decoding="async" width="1024" height="524" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-1024x524.png" alt="Screenshot 2025 02 11 102857 2" class="wp-image-52156" title="Installing Nagios Cross Platform Agent (NCPA) on CentOS 7 and Monitoring with Nagios XI 10" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-1024x524.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-300x154.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-768x393.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-1536x786.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2.png 1745w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Wizards page</figcaption></figure>



<p>Type in the <strong>Address</strong> of your machine running NCPA. You can leave the <strong>Port</strong> as default. Enter the <strong>Token</strong> that you created earlier and click <strong>Next, </strong>and <strong>Finish with Defaults</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1.png"><img loading="lazy" decoding="async" width="1346" height="757" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited.png" alt="Screenshot 2025 02 11 103046 1 edited" class="wp-image-52159" title="Installing Nagios Cross Platform Agent (NCPA) on CentOS 7 and Monitoring with Nagios XI 11" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited.png 1346w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited-300x169.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited-1024x576.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited-768x432.png 768w" sizes="(max-width: 1346px) 100vw, 1346px" /></a><figcaption class="wp-element-caption">Config wizard</figcaption></figure>



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



<p>You have successfully installed and configured the Nagios Cross Platform Agent (NCPA) on CentOS 7. This setup allows Nagios to monitor the server efficiently, providing real-time insights into system performance and resource utilization. By integrating NCPA with Nagios, you enhance your network monitoring capabilities, ensuring proactive management of system health and performance.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Monitor CentOS 7 with SNMP in Nagios XI</title>
		<link>https://library.nagios.com/monitoring/monitor-centos7-with-nagiosxi/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Wed, 19 Mar 2025 15:47:18 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 7]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[SNMP]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52512</guid>

					<description><![CDATA[SNMP (Simple Network Management Protocol) is a powerful tool for monitoring network devices and servers. This guide will walk you through installing and configuring SNMP on CentOS 7. Step 1: Install SNMP and Utilities CentOS 7 uses yum as the default package manager. Install SNMP packages with: Step 2: Start and Enable the SNMP Service [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>SNMP (Simple Network Management Protocol) is a powerful tool for monitoring network devices and servers. This guide will walk you through installing and configuring SNMP on CentOS 7.</p>



<h3 class="wp-block-heading">Step 1: Install SNMP and Utilities</h3>



<p>CentOS 7 uses <code>yum</code> as the default package manager. Install SNMP packages 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:#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 yum install net-snmp net-snmp-utils -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 yum install net-snmp net-snmp-utils -y</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 2: Start and Enable the SNMP Service</h3>



<p>Once installed, start and enable the SNMP service so that it runs at boot:</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
sudo systemctl start 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 enable snmpd</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl start snmpd</span></span></code></pre></div>



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



<p>The main configuration file for SNMP is located 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" 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>/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">/etc/snmp/snmpd.conf</span></span></code></pre></div>



<p>Before making changes, back up the original 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 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 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>Modify or add the following lines to set up SNMPv2c with a community string (replace <code>YourCommunity</code> with a strong name):</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>com2sec readonly  default  YourCommunity
group   MyROGroup v2c        readonly
view    all    included   .1
access  MyROGroup ""      any       noauth    exact  all    none   none
syslocation "Data Center"
syscontact "Admin &lt;admin@example.com>"</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">com2sec readonly  default  YourCommunity</span></span>
<span class="line"><span style="color: #D4D4D4">group   MyROGroup v2c        readonly</span></span>
<span class="line"><span style="color: #D4D4D4">view    all    included   .1</span></span>
<span class="line"><span style="color: #D4D4D4">access  MyROGroup &quot;&quot;      any       noauth    exact  all    none   none</span></span>
<span class="line"><span style="color: #D4D4D4">syslocation &quot;Data Center&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">syscontact &quot;Admin &lt;admin@example.com&gt;&quot;</span></span></code></pre></div>



<p>Save and exit the file, then restart the SNMP service:</p>



<pre class="wp-block-code"><code>sudo systemctl restart snmpd</code></pre>



<h3 class="wp-block-heading">Step 4: Adjust Firewall Rules</h3>



<p>To allow SNMP traffic, open the necessary UDP port (161):</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 firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=161/udp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 5: Verify SNMP Functionality</h3>



<p>Test if SNMP is working correctly 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:#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 YourCommunity -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 YourCommunity -O e 127.0.0.1</span></span></code></pre></div>



<p>If you see output with system information, SNMP is working correctly.</p>



<h3 class="wp-block-heading">Step 6: Open Firewall for SNMP</h3>



<p>If you want to allow SNMP traffic from remote machines, open the firewall to 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 firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=161/udp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<p>This command opens port 161 (the default SNMP port) for UDP traffic, allowing SNMP queries from remote systems.</p>



<h3 class="wp-block-heading">Step 7: Test SNMP from a Remote System</h3>



<p>Finally, to ensure SNMP is accessible remotely, test it from another system using <code>snmpwalk</code>:</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 YourCommunityString &lt;server-ip></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 YourCommunityString &lt;server-ip&gt;</span></span></code></pre></div>



<p>Replace <code>&lt;server-ip&gt;</code> with the IP address of your CentOS 7 server. If SNMP is correctly configured, you will receive SNMP data from the remote server.</p>



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



<p>In Nagios XI, navigate to <code>Run a Wizard</code> and click on the <code>SNMP wizard</code>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716.png"><img loading="lazy" decoding="async" width="1024" height="546" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-1024x546.png" alt="Screenshot 2025 02 12 135716" class="wp-image-51997" title="How to Monitor CentOS 7 with SNMP in Nagios XI 12" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-1024x546.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-300x160.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-768x410.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-1536x819.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716.png 1730w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Wizards page</figcaption></figure>



<ul class="wp-block-list">
<li>Add your Host Name and type in the SNMP Community string that you created.</li>



<li>Pick the SNMP Services that you want to monitor and then click <code>Next</code> and <code>Finish with Defaults</code>.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626.png"><img loading="lazy" decoding="async" width="1024" height="729" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-1024x729.png" alt="Screenshot 2025 03 12 115626" class="wp-image-51999" title="How to Monitor CentOS 7 with SNMP in Nagios XI 13" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-1024x729.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-300x214.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-768x547.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626.png 1230w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">SNMP Wizard page</figcaption></figure>



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



<p>You have successfully installed and configured SNMP on CentOS 7. This setup allows your server to be monitored remotely, enhancing network management capabilities. You also configured SNMP monitoring with Nagios XI, which provides a powerful interface for tracking system performance and network activity. By adding your SNMP-enabled server to Nagios XI, you can gain deeper insights into system health, set up alerts, and optimize network monitoring for better performance.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Monitor CentOS 8 with SNMP in Nagios XI</title>
		<link>https://library.nagios.com/monitoring/centos-8-snmp-nagiosxi/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Mon, 17 Mar 2025 18:40:57 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 8]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[SNMP]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52343</guid>

					<description><![CDATA[SNMP (Simple Network Management Protocol) isa powerful tool for monitoring network devices and servers. This guide will walk you through installing and configuring SNMP on CentOS 8. Step 1: Install SNMP and Utilities CentOS 8 uses dnf as the default package manager. Install SNMP packages with: Step 2: Start and Enable the SNMP Service Once [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>SNMP (Simple Network Management Protocol) isa powerful tool for monitoring network devices and servers. This guide will walk you through installing and configuring SNMP on <strong>CentOS 8</strong>.</p>



<h3 class="wp-block-heading">Step 1: Install SNMP and Utilities</h3>



<p>CentOS 8 uses <code>dnf</code> as the default package manager. Install SNMP packages 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:#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 dnf install net-snmp net-snmp-utils -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 dnf install net-snmp net-snmp-utils -y</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 2: Start and Enable the SNMP Service</h3>



<p>Once installed, start and enable the SNMP service so that it runs at boot:</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 --now 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 enable --now snmpd</span></span></code></pre></div>



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



<p>The main configuration file for SNMP is located 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" 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>/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">/etc/snmp/snmpd.conf</span></span></code></pre></div>



<p>Before making changes, back up the original 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 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 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>Modify or add the following lines to set up SNMPv2c with a community string (replace <code>YourCommunity</code> with a strong name):</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>com2sec readonly  default  YourCommunity
group   MyROGroup v2c        readonly
view    all    included   .1
access  MyROGroup ""      any       noauth    exact  all    none   none
syslocation "Data Center"
syscontact "Admin &lt;admin@example.com>"</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">com2sec readonly  default  YourCommunity</span></span>
<span class="line"><span style="color: #D4D4D4">group   MyROGroup v2c        readonly</span></span>
<span class="line"><span style="color: #D4D4D4">view    all    included   .1</span></span>
<span class="line"><span style="color: #D4D4D4">access  MyROGroup &quot;&quot;      any       noauth    exact  all    none   none</span></span>
<span class="line"><span style="color: #D4D4D4">syslocation &quot;Data Center&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">syscontact &quot;Admin &lt;admin@example.com&gt;&quot;</span></span></code></pre></div>



<p>Save and exit the file, then 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</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</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 4: Adjust Firewall Rules</h3>



<p>To allow SNMP traffic, open the necessary UDP port (161):</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 firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=161/udp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<h3 class="wp-block-heading">Step 5: Verify SNMP Functionality</h3>



<p>Test if SNMP is working correctly 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:#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 YourCommunity -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 YourCommunity -O e 127.0.0.1</span></span></code></pre></div>



<p>If you see output with system information, SNMP is working correctly.</p>



<h3 class="wp-block-heading">Step 6: Open Firewall for SNMP</h3>



<p>If you want to allow SNMP traffic from remote machines, open the firewall to 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 firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=161/udp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<p>This command opens port <strong>161</strong> (the default SNMP port) for UDP traffic, allowing SNMP queries from remote systems.</p>



<h3 class="wp-block-heading">Step 7: Test SNMP from a Remote System</h3>



<p>Finally, to ensure SNMP is accessible remotely, test it from another system using <code>snmpwalk</code>:</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 YourCommunityString</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 YourCommunityString</span></span></code></pre></div>



<p>Replace <code>&lt;server-ip&gt;</code> with the IP address of your CentOS server. If SNMP is correctly configured, you will receive SNMP data from the remote server.</p>



<h2 class="wp-block-heading">Monitoring with Nagios XI</h2>



<p>On Nagios XI navigate to <strong>Run a Wizard</strong> and click on the <strong>SNMP wizard</strong></p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716.png"><img loading="lazy" decoding="async" width="1024" height="546" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-1024x546.png" alt="Screenshot 2025 02 12 135716" class="wp-image-51997" title="How to Monitor CentOS 8 with SNMP in Nagios XI 14" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-1024x546.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-300x160.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-768x410.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716-1536x819.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-12-135716.png 1730w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Wizards page</figcaption></figure>



<p>Add your <strong>Host Name</strong> and type in the <strong>SNMP Community string</strong> that you created.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626.png"><img loading="lazy" decoding="async" width="1024" height="729" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-1024x729.png" alt="Screenshot 2025 03 12 115626" class="wp-image-51999" title="How to Monitor CentOS 8 with SNMP in Nagios XI 15" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-1024x729.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-300x214.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626-768x547.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-12-115626.png 1230w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">SNMP Wizard page</figcaption></figure>



<p>Pick the SNMP Services that you want to monitor and then click <strong>Next</strong> and <strong>Finish with Defaults</strong>.</p>



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



<p>You have successfully installed and configured SNMP on CentOS 8. This setup allows your server to be monitored remotely, enhancing network management capabilities. You also configured SNMP monitoring with <strong>Nagios XI</strong>, which provides a powerful interface for tracking system performance and network activity. By adding your SNMP-enabled server to Nagios XI, you can gain deeper insights into system health, set up alerts, and optimize network monitoring for better performance.</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Easily Install NCPA on CentOS 8 and Monitor with Nagios XI</title>
		<link>https://library.nagios.com/monitoring/ncpa-on-centos-8-with-nagios-xi/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Fri, 14 Mar 2025 15:57:51 +0000</pubDate>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[CentOS 8]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52152</guid>

					<description><![CDATA[Nagios Cross-Platform Agent (NCPA) is a robust monitoring agent that allows you to monitor system metrics, services, and processes across different operating systems. This guide will walk you through the steps to install NCPA on CentOS 8. Prerequisites Step 1: Update System Packages Before installing any software, it&#8217;s best to update your system: Step 2: [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Cross-Platform Agent (NCPA) is a robust monitoring agent that allows you to monitor system metrics, services, and processes across different operating systems. This guide will walk you through the steps to install NCPA on CentOS 8.</p>



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



<ul class="wp-block-list">
<li>A CentOS 8 system with root or sudo privileges</li>



<li>Access to the internet</li>



<li>A running Nagios server</li>
</ul>



<h2 class="wp-block-heading">Step 1: Update System Packages</h2>



<p>Before installing any software, it&#8217;s best to update your system:</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 dnf update -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 dnf update -y</span></span></code></pre></div>



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



<p>The official NCPA package for CentOS 8 is available on the Nagios website. You can download it using <code>wget</code>:</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.el8.x86_64.rpm</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.el8.x86_64.rpm</span></span></code></pre></div>



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



<p>Use the <code>dnf</code> package manager to install the downloaded RPM package:</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 dnf install -y ncpa-latest.el8.x86_64.rpm</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 dnf install -y ncpa-latest.el8.x86_64.rpm</span></span></code></pre></div>



<p>This command installs NCPA along with its dependencies.</p>



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



<p>The main configuration file for NCPA is located 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" 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>/etc/ncpa/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">/etc/ncpa/ncpa.cfg</span></span></code></pre></div>



<p>Open the file with a text editor, such as <code>nano</code>:</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/ncpa/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 /etc/ncpa/ncpa.cfg</span></span></code></pre></div>



<p>Set the <code>api_token</code> value to a secure string, as it is required for communication between NCPA and the Nagios 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>api_token = YOUR_SECURE_API_TOKEN</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">api_token = YOUR_SECURE_API_TOKEN</span></span></code></pre></div>



<p>Save the file and exit.</p>



<h2 class="wp-block-heading">Step 5: Start and Enable NCPA Service</h2>



<p>Once configured, start the NCPA services and enable them to run at boot:</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 --now ncpa_listener
sudo systemctl enable --now ncpa_passive</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 --now ncpa_listener</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl enable --now ncpa_passive</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 6: Configure Firewall Rules (If Applicable)</h2>



<p>If you have <code>firewalld</code> enabled, allow NCPA 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:#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 firewall-cmd --permanent --add-port=5693/tcp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=5693/tcp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 7: Verify NCPA Installation</h2>



<p>To check if NCPA is running, use 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 systemctl status ncpa_listener ncpa_passive</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 ncpa_listener ncpa_passive</span></span></code></pre></div>



<p>Additionally, you can test API access via <code>curl</code>:</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>curl https://localhost:5693/api --insecure</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">curl https://localhost:5693/api --insecure</span></span></code></pre></div>



<p>If everything is set up correctly, you should receive a JSON response.</p>



<h2 class="wp-block-heading">Monitoring with Nagios</h2>



<p>On your Nagios web GUI, click <strong>Run a wizard</strong> and find the <strong>NCPA</strong> wizard.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2.png"><img loading="lazy" decoding="async" width="1024" height="524" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-1024x524.png" alt="Screenshot 2025 02 11 102857 2" class="wp-image-52156" title="Easily Install NCPA on CentOS 8 and Monitor with Nagios XI 16" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-1024x524.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-300x154.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-768x393.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2-1536x786.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-2.png 1745w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Wizards page</figcaption></figure>



<p>Type in the <strong>Address</strong> of your machine running NCPA. You can leave the <strong>Port</strong> as default. Enter the <strong>Token</strong> that you created earlier and click <strong>Next, </strong>and <strong>Finish with Defaults</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1.png"><img loading="lazy" decoding="async" width="1346" height="757" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited.png" alt="Screenshot 2025 02 11 103046 1 edited" class="wp-image-52159" title="Easily Install NCPA on CentOS 8 and Monitor with Nagios XI 17" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited.png 1346w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited-300x169.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited-1024x576.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-1-edited-768x432.png 768w" sizes="(max-width: 1346px) 100vw, 1346px" /></a><figcaption class="wp-element-caption">Config wizard</figcaption></figure>



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



<p>You have successfully installed and configured NCPA on CentOS 8. This agent allows you to monitor system performance and services using Nagios. Want Nagios notifications in <a href="https://library.nagios.com/monitoring/integrating-slack-notifications-with-nagios-xi/" target="_blank" rel="noreferrer noopener">Slack</a> or <a href="https://library.nagios.com/monitoring/integrating-discord-webhooks-with-nagios-xi-for-automated-alerts/" target="_blank" rel="noreferrer noopener">Discord</a>? Click to find out how.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Installing Nagios Cross-Platform Agent (NCPA) on CentOS Stream 10 and Monitoring with Nagios XI</title>
		<link>https://library.nagios.com/documentation/installing-nagios-cross-platform-agent-ncpa-on-centos-stream-10-and-monitoring-with-nagios-xi/</link>
		
		<dc:creator><![CDATA[Tucker Falen]]></dc:creator>
		<pubDate>Thu, 13 Mar 2025 20:10:24 +0000</pubDate>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[CentOS 10]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52090</guid>

					<description><![CDATA[Nagios Cross-Platform Agent (NCPA) is a powerful monitoring agent that allows you to collect system metrics and monitor services on various operating systems. This guide will walk you through installing and configuring NCPA on CentOS Stream 10. Prerequisites Step 1: Update Your System Before installing NCPA, update your system to ensure all packages are up [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Nagios Cross-Platform Agent (NCPA) is a powerful monitoring agent that allows you to collect system metrics and monitor services on various operating systems. This guide will walk you through installing and configuring NCPA on CentOS Stream 10.</p>



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



<ul class="wp-block-list">
<li>A system running <strong>CentOS Stream 10</strong></li>



<li><strong>Root</strong> or <strong>sudo</strong> privileges</li>



<li>Internet connectivity to download necessary packages</li>
</ul>



<h3 class="wp-block-heading"><strong>Step 1: Update Your System</strong></h3>



<p>Before installing NCPA, update your system to ensure all packages are up to date.</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 yum update -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 yum update -y</span></span></code></pre></div>



<p>Then navigate to the <code>/tmp</code> directory</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>cd /tmp</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">cd /tmp</span></span></code></pre></div>



<h3 class="wp-block-heading"><strong>Step 2: Enable the Nagios Repository</strong></h3>



<p>To install NCPA, you need to 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:#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 rpm -Uvh https://repo.nagios.com/nagios/9/nagios-repo-9-2.el9.noarch.rpm</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 rpm -Uvh https://repo.nagios.com/nagios/9/nagios-repo-9-2.el9.noarch.rpm</span></span></code></pre></div>



<p>After adding the repository, update your system again:</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 yum update -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 yum update -y</span></span></code></pre></div>



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



<p>Download and install the latest version of NCPA for CentOS Stream 10 (which aligns with EL9 packages):</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 yum install ncpa -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 yum install ncpa -y</span></span></code></pre></div>



<p>This will install the NCPA agent along with its dependencies.</p>



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



<p>Once installed, update the configuration file to set the authentication token. Open the NCPA 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 /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 following section and change <code>mytoken</code> to a secure token of your choice:</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>&#91;api&#93;
community_string = &lt;your-secure-token></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">&#91;api&#93;</span></span>
<span class="line"><span style="color: #D4D4D4">community_string = &lt;your-secure-token&gt;</span></span></code></pre></div>



<p>Save the file and exit the editor.</p>



<h3 class="wp-block-heading"><strong>Step 5: Start and Enable the NCPA Service</strong></h3>



<p>Start the NCPA listener service and enable it to start on boot:</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 start ncpa_listener
sudo systemctl enable ncpa_listener</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 start ncpa_listener</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl enable ncpa_listener</span></span></code></pre></div>



<p>Verify that the 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 ncpa_listener</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 ncpa_listener</span></span></code></pre></div>



<h3 class="wp-block-heading"><strong>Step 6: Open Firewall Ports for NCPA</strong></h3>



<p>If your system has a firewall enabled, open the necessary port (default: 5693) to allow incoming connections:</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 firewall-cmd --permanent --add-port=5693/tcp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=5693/tcp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



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



<p>Test if NCPA is running correctly by accessing its web interface. Open a 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;server-ip>: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;server-ip&gt;:5693</span></span></code></pre></div>



<p>Log in using the authentication token you set earlier.</p>



<h2 class="wp-block-heading">Monitoring With Nagios XI</h2>



<p>Now that you have configured NCPA, monitoring with Nagios XI will be easy! Navigate to the Nagios web GUI and click <strong>Run a Wizard</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3.png"><img loading="lazy" decoding="async" width="1024" height="538" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3-1024x538.png" alt="Screenshot 2025 02 11 102801 3" class="wp-image-52106" title="Installing Nagios Cross-Platform Agent (NCPA) on CentOS Stream 10 and Monitoring with Nagios XI 18" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3-1024x538.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3-300x158.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3-768x403.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3-1536x807.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102801-3.png 1805w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Nagios Home Page</figcaption></figure>



<p>Click the <strong>NCPA </strong>wizard.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1.png"><img loading="lazy" decoding="async" width="1024" height="524" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1-1024x524.png" alt="Screenshot 2025 02 11 102857 1" class="wp-image-52107" title="Installing Nagios Cross-Platform Agent (NCPA) on CentOS Stream 10 and Monitoring with Nagios XI 19" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1-1024x524.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1-300x154.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1-768x393.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1-1536x786.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-102857-1.png 1745w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Wizards page</figcaption></figure>



<p>Enter the <strong>IP Address</strong> of your machine. You can leave the <strong>Port</strong> as default. Then pick the <strong>Token</strong> that you set earlier. Click <strong>Next</strong>, and <strong>Finish with Defaults</strong>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046.png"><img loading="lazy" decoding="async" width="1346" height="757" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-edited.png" alt="Screenshot 2025 02 11 103046 edited" class="wp-image-52110" title="Installing Nagios Cross-Platform Agent (NCPA) on CentOS Stream 10 and Monitoring with Nagios XI 20" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-edited.png 1346w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-edited-300x169.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-edited-1024x576.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-02-11-103046-edited-768x432.png 768w" sizes="(max-width: 1346px) 100vw, 1346px" /></a><figcaption class="wp-element-caption">NCPA Configuration Wizard</figcaption></figure>



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



<p>You have successfully installed and configured the Nagios Cross-Platform Agent (NCPA) on CentOS Stream 10. Your system can now be monitored using Nagios XI, providing detailed insights into system performance and resource usage.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install and Configure NCPA on CentOS Stream 9 for Nagios XI Monitoring</title>
		<link>https://library.nagios.com/tutorials/ncpa-on-centos-stream-9/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Thu, 13 Mar 2025 18:16:39 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[CentOS 9]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52030</guid>

					<description><![CDATA[The Nagios Cross-Platform Agent (NCPA) is a versatile, open-source monitoring tool that simplifies system tracking across multiple platforms, including CentOS Stream 9. By integrating NCPA with Nagios XI, administrators can gain real-time insights into critical system metrics—such as CPU, memory, and disk usage—while efficiently managing services and processes from a centralized dashboard. This guide provides [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The Nagios Cross-Platform Agent (NCPA) is a versatile, open-source monitoring tool that simplifies system tracking across multiple platforms, including CentOS Stream 9. By integrating NCPA with <a href="https://www.nagios.com/products/nagios-xi/" target="_blank" rel="noopener">Nagios XI</a>, administrators can gain real-time insights into critical system metrics—such as CPU, memory, and disk usage—while efficiently managing services and processes from a centralized dashboard. This guide provides a step-by-step walkthrough for installing and configuring NCPA on CentOS Stream 9 and seamlessly integrating it with Nagios XI to ensure proactive and reliable system monitoring.</p>



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



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



<ul class="wp-block-list">
<li>A running Nagios XI server, accessible from your CentOS machine.</li>



<li>A CentOS Stream 9 system with sudo or root privileges.</li>



<li>A stable internet connection for downloading NCPA.</li>



<li>Basic familiarity with Linux commands (optional but recommended).&#8221;</li>
</ul>



<h2 class="wp-block-heading">Step 1 – Download and Install NCPA</h2>



<p>You can install NCPA on CentOS Stream 9 using either a direct RPM download or the official Nagios repository. Choose one method below:</p>



<p>1. Open a terminal and switch to a temporary directory:</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>cd /tmp</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">cd /tmp</span></span></code></pre></div>



<p>2. Download the latest NCPA package: </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>curl -O https://assets.nagios.com/downloads/ncpa3/ncpa-latest-1.x86_64.rpm</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">curl -O https://assets.nagios.com/downloads/ncpa3/ncpa-latest-1.x86_64.rpm</span></span></code></pre></div>



<p>3. IInstall the package with dnf:</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 dnf install ./ncpa-latest-1.x86_64.rpm -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 dnf install ./ncpa-latest-1.x86_64.rpm -y</span></span></code></pre></div>



<h3 class="wp-block-heading">Option 2: Nagios Repository</h3>



<p>The Nagios repository provides an online installation method for NCPA and Nagios XI, ensuring access to the latest versions and updates.</p>



<p>1. Add the Nagios repository for CentOS Stream 9:</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 rpm -Uvh https://repo.nagios.com/nagios/9/nagios-repo-9-2.el9.noarch.rpm</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 rpm -Uvh https://repo.nagios.com/nagios/9/nagios-repo-9-2.el9.noarch.rpm</span></span></code></pre></div>



<p>This configures your system to use the Nagios repo at <a href="https://repo.nagios.com/nagios" target="_blank" rel="noreferrer noopener">https://repo.nagios.com/nagios</a>, secured with public GPG keys (GPG-KEY-NAGIOS-V3 or GPG-KEY-NAGIOS-V2).</p>



<p>2. Install prerequisites for compatibility:</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 yum install epel-release -y  
sudo dnf config-manager --set-enabled crb  </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 yum install epel-release -y  </span></span>
<span class="line"><span style="color: #D4D4D4">sudo dnf config-manager --set-enabled crb  </span></span></code></pre></div>



<p>These enable the EPEL repository and the CRB (CodeReady Builder) repository, required for Nagios dependencies on CentOS Stream 9.</p>



<p>3. Update the package cache:</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 yum update -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 yum update -y</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:#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 yum install ncpa -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 yum install ncpa -y  </span></span></code></pre></div>



<p><em><strong>Note</strong>:</em> To upgrade NCPA later, run sudo yum update ncpa.</p>



<p>Verification (Both Methods)</p>



<p>5. Confirm installation:</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>ncpa --version  </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">ncpa --version  </span></span></code></pre></div>



<p>Expect output like NCPA 3.0.0 (version may vary based on the source).</p>



<h2 class="wp-block-heading">Step 2 – Configure NCPA</h2>



<p>Next, configure NCPA for secure operation:</p>



<p>1. Open the configuration file in a text editor: </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>2. Set a secure token in the <code>[api]</code> section:</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>&#91;api&#93; 
community_string = your_secure_token</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">&#91;api&#93; </span></span>
<span class="line"><span style="color: #D4D4D4">community_string = your_secure_token</span></span></code></pre></div>



<p>Replace X7kP9mNq2v with your own secure token (avoid simple strings like password).</p>



<p>3. In the [listener] section, ensure NCPA listens on all interfaces:</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>&#91;listener&#93;  
ip = 0.0.0.0  
port = 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">&#91;listener&#93;  </span></span>
<span class="line"><span style="color: #D4D4D4">ip = 0.0.0.0  </span></span>
<span class="line"><span style="color: #D4D4D4">port = 5693  </span></span></code></pre></div>



<p>4. Save (Ctrl+O, Enter, Ctrl+X in nano) and backup the original:</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 /usr/local/ncpa/etc/ncpa.cfg /usr/local/ncpa/etc/ncpa.cfg.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 /usr/local/ncpa/etc/ncpa.cfg /usr/local/ncpa/etc/ncpa.cfg.bak  </span></span></code></pre></div>



<h2 class="wp-block-heading">Step 3 – Restart NCPA</h2>



<p>1. To ensure NCPA runs at startup, enable and start the services:</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 ncpa
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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo systemctl enable ncpa</span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl restart ncpa</span></span></code></pre></div>



<p>2. Verify they&#8217;re 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 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 dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo systemctl status ncpa</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 4 – Configure Firewall Rules</h2>



<p>1. Allow NCPA traffic through the firewall and reload 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:#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>firewall-cmd --permanent --add-port=5693/tcp
firewall-cmd --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">firewall-cmd --permanent --add-port=5693/tcp</span></span>
<span class="line"><span style="color: #D4D4D4">firewall-cmd --reload</span></span></code></pre></div>



<p>2. Confirm the rule:</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 firewall-cmd --list-all</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 firewall-cmd --list-all</span></span></code></pre></div>



<p>Ensure 5693/tcp appears under ports.</p>



<h2 class="wp-block-heading">Step 5 – Integrate NCPA with Nagios XI</h2>



<p>Integrate NCPA with Nagios XI for centralized monitoring:</p>



<p>1. <strong>Launch the NCPA Wizard</strong></p>



<ul class="wp-block-list">
<li>Log in to your Nagios XI web interface.</li>



<li>Navigate to <strong>Configure &gt; Configuration Wizards.</strong></li>



<li>Select <strong>NCPA </strong>Monitoring.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516.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-1024x521.png" alt="Screenshot 2025 03 13 123516" class="wp-image-52054" title="How to Install and Configure NCPA on CentOS Stream 9 for Nagios XI Monitoring 21" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1024x521.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-300x153.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-768x391.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516-1536x781.png 1536w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123516.png 1595w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">NCPA</figcaption></figure>



<p>2. <strong>Enter Connection Details</strong></p>



<ul class="wp-block-list">
<li>Input the CentOS server’s IP address (e.g., 192.168.1.100).</li>



<li>Enter the API token from ncpa.cfg (e.g., X7kP9mNq2v).</li>



<li>Set the port to 5693.</li>



<li>Click Next.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123617.png"><img loading="lazy" decoding="async" width="1024" height="542" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123617-1024x542.png" alt="Screenshot 2025 03 13 123617" class="wp-image-52055" title="How to Install and Configure NCPA on CentOS Stream 9 for Nagios XI Monitoring 22" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123617-1024x542.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123617-300x159.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123617-768x406.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-123617.png 1525w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">NCPA Config</figcaption></figure>



<p>3. <strong>Choose Metrics</strong></p>



<ul class="wp-block-list">
<li>Select services to monitor (e.g., CPU Usage, Memory Usage, Disk Space, Network Statistics).</li>



<li>Customize thresholds if needed, then click Next.</li>
</ul>



<p>4. <strong>Apply and Verify</strong></p>



<ul class="wp-block-list">
<li>Finish the wizard and apply the configuration.</li>



<li>Check Core Config Manager &gt; Monitoring &gt; Service Status to confirm data is flowing.</li>
</ul>



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



<p>Resolve common NCPA setup problems with these tips:</p>



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



<li><strong>Fix:</strong> Check logs (journalctl -u ncpa_listener), ensure /usr/local/ncpa/etc/ncpa.cfg syntax is correct, or reinstall (e.g., sudo yum reinstall ncpa for repo method).</li>
</ul>
</li>



<li><strong>Nagios XI Shows No Data</strong>
<ul class="wp-block-list">
<li><strong>Symptom:</strong> No metrics in Service Status.</li>



<li><strong>Fix:</strong> Test connectivity (curl -k https://&lt;server-ip&gt;:5693 from Nagios XI), verify token and port match ncpa.cfg.</li>
</ul>
</li>



<li><strong>Firewall Blocks Access</strong>
<ul class="wp-block-list">
<li><strong>Symptom:</strong> Connection timeouts from Nagios XI.</li>



<li><strong>Fix:</strong> Confirm 5693/tcp is open (sudo firewall-cmd &#8211;list-all); reapply rules if needed.</li>
</ul>
</li>
</ol>



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



<p>By following this guide, you have successfully installed NCPA on CentOS Stream 9 and integrated it with Nagios XI. This setup allows comprehensive system monitoring and ensures proactive alerting for critical system metrics.</p>



<p>For further details, refer to the <a href="https://assets.nagios.com/downloads/ncpa/docs/Installing-NCPA.pdf" target="_blank" rel="noopener">official NCPA documentation</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Configure SNMP on CentOS Stream 9 and Integrate It with Nagios XI</title>
		<link>https://library.nagios.com/tutorials/how-to-configure-snmp-on-centos-stream-9-and-integrate-it-with-nagios-xi/</link>
		
		<dc:creator><![CDATA[Ayub Huruse]]></dc:creator>
		<pubDate>Thu, 13 Mar 2025 12:58:31 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[CentOS 9]]></category>
		<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<category><![CDATA[SNMP]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=52018</guid>

					<description><![CDATA[Simple Network Management Protocol (SNMP) is an essential tool for monitoring and managing network devices, allowing administrators to efficiently collect and track critical system data. By enabling SNMP on CentOS Stream 9, IT teams can gain deeper visibility into system performance and streamline infrastructure management. This guide will walk you through the step-by-step process of [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Simple Network Management Protocol (SNMP) is an essential tool for monitoring and managing network devices, allowing administrators to efficiently collect and track critical system data. By enabling SNMP on CentOS Stream 9, IT teams can gain deeper visibility into system performance and streamline infrastructure management. This guide will walk you through the step-by-step process of installing and configuring SNMP on CentOS Stream 9 and integrating it with <a href="https://www.nagios.com/products/nagios-xi/" target="_blank" rel="noopener">Nagios XI</a> for seamless remote monitoring.</p>



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



<p>Before starting, ensure you have:</p>



<ul class="wp-block-list">
<li>A CentOS Stream 9 system with sudo or root privileges</li>



<li>A stable internet connection to download required packages</li>



<li>An operational Nagios XI server (accessible from the CentOS machine)</li>



<li>Optional: Basic familiarity with Linux command-line operations&#8221;</li>
</ul>



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



<p>To begin, install the core SNMP packages on your CentOS Stream 9 system:</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 dnf install -y net-snmp net-snmp-utils</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 dnf install -y net-snmp net-snmp-utils</span></span></code></pre></div>



<p>This command installs the SNMP daemon and utilities required to interact with SNMP-enabled devices.</p>



<h3 class="wp-block-heading">Verification</h3>



<p>After installation, confirm the SNMP daemon is installed by checking its version:</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>snmpd -v</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">snmpd -v</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 2: Enabling and Starting SNMP Service</h2>



<p>Next, enable and start the SNMP service to ensure it runs automatically on boot:</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  
sudo systemctl start 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 enable snmpd  </span></span>
<span class="line"><span style="color: #D4D4D4">sudo systemctl start snmpd</span></span></code></pre></div>



<p>The enable command configures the service for automatic startup, while start launches it immediately.</p>



<h2 class="wp-block-heading">Step 3: Verifying SNMP Status</h2>



<p>Verify that the SNMP service is operational:</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>Look for Active: active (running) in the output to confirm the service is functioning. If it’s inactive or failed, review the logs with journalctl -u snmpd for troubleshooting.</p>



<h2 class="wp-block-heading">Step 4: Configuring SNMP for Secure Access</h2>



<p>The SNMP configuration file needs to be modified for proper security settings. Open the 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 the com2sec directive (or add it if missing) and configure it 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>com2sec readonly 192.168.1.0/24 MySecureCommunity</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">com2sec readonly 192.168.1.0/24 MySecureCommunity</span></span></code></pre></div>



<ul class="wp-block-list">
<li>Replace MySecureCommunity with a unique, strong community string (e.g., X7kP9mNq2v). Avoid easily guessable values like public.</li>



<li>The 192.168.1.0/24 subnet restricts queries to this network. Adjust it to match your environment (e.g., 10.0.0.0/24).</li>
</ul>



<p>Save the file (Ctrl+O, Enter, Ctrl+X in nano), then restart the 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</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</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 5: Testing SNMP on the Local Machine</h2>



<p>Test SNMP functionality locally 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:#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 MySecureCommunity localhost</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 MySecureCommunity localhost</span></span></code></pre></div>



<p>This queries the SNMP daemon using SNMP v2c and your custom community string. A successful response will display system details (e.g., OID data like sysDescr.0). If you receive a timeout or error, ensure the service is running and the community string matches your configuration.</p>



<h2 class="wp-block-heading">Step 6: Configuring Firewall Rules for Remote Access</h2>



<p>Enable remote SNMP access by updating 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:#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 firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --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 firewall-cmd --permanent --add-port=161/udp</span></span>
<span class="line"><span style="color: #D4D4D4">sudo firewall-cmd --reload</span></span></code></pre></div>



<p>Port 161/UDP is the default for SNMP. Verify the rule is active:</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 firewall-cmd --list-all</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 firewall-cmd --list-all</span></span></code></pre></div>



<p>Look for 161/udp under ports in the output. If it’s missing, recheck your commands.&#8221;</p>



<h2 class="wp-block-heading">Step 7: Testing SNMP Remotely</h2>



<p>From a remote machine, test SNMP connectivity:</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 MySecureCommunity &lt;server-ip></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 MySecureCommunity &lt;server-ip&gt;</span></span></code></pre></div>



<p>Substitute &lt;server-ip&gt; with your CentOS Stream 9 server’s IP (e.g., 192.168.1.100). A successful query returns system data. If it fails, verify network reachability (ping &lt;server-ip&gt;), firewall settings, and the community string.&#8221;</p>



<h2 class="wp-block-heading">Additional Testing</h2>



<p>You can also use <code>snmpget</code> for targeted queries:</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>snmpget -v2c -c MySecureCommunity &lt;server-ip> sysName.0</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">snmpget -v2c -c MySecureCommunity &lt;server-ip&gt; sysName.0</span></span></code></pre></div>



<p>This retrieves the system hostname (e.g., SNMPv2-MIB::sysName.0 = STRING: centos9-server).</p>



<h2 class="wp-block-heading">Monitoring with Nagios XI</h2>



<h3 class="wp-block-heading">Step 1: Open the SNMP Wizard</h3>



<ul class="wp-block-list">
<li>Log in to Nagios XI.</li>



<li>Navigate to <strong>Configure &gt; Run a Configuration Wizard</strong>.</li>



<li>Select <strong>SNMP Monitoring Wizard</strong>.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072400.png"><img loading="lazy" decoding="async" width="1024" height="499" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072400-1024x499.png" alt="Nagios XI Configuration Wizards list with SNMP Monitoring Wizard selected" class="wp-image-52021" title="How to Configure SNMP on CentOS Stream 9 and Integrate It with Nagios XI 23" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072400-1024x499.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072400-300x146.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072400-768x374.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072400.png 1481w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">SNMP wizard</figcaption></figure>



<h3 class="wp-block-heading">Step 2: Add Your Host</h3>



<ul class="wp-block-list">
<li>Enter your <strong>Host Name</strong> and type in the <strong>SNMP Community</strong> string you created.</li>



<li>Select <strong>SNMP v2c</strong> unless using SNMP v3.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072513.png"><img loading="lazy" decoding="async" width="1024" height="558" src="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072513-1024x558.png" alt="Nagios XI SNMP wizard host setup showing community string and SNMP version selection" class="wp-image-52022" title="How to Configure SNMP on CentOS Stream 9 and Integrate It with Nagios XI 24" srcset="https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072513-1024x558.png 1024w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072513-300x163.png 300w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072513-768x419.png 768w, https://library.nagios.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-072513.png 1490w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">SNMP config </figcaption></figure>



<h3 class="wp-block-heading">Step 3: Select SNMP Services</h3>



<ul class="wp-block-list">
<li>Choose the SNMP services you want to monitor (e.g., CPU Load, Memory Usage, Network Interfaces).</li>



<li>Click <strong>Next</strong>, then <strong>Finish</strong> with the default settings.</li>
</ul>



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



<p>Here are solutions to three frequent issues you might face during SNMP setup:</p>



<h4 class="wp-block-heading">1. &#8220;Timeout: No Response&#8221; During <code>snmpwalk</code></h4>



<ul class="wp-block-list">
<li><strong>Symptom:</strong> <code>snmpwalk -v2c -c MySecureCommunity localhost</code> or remote tests return a timeout.</li>



<li><strong>Possible Causes:</strong> SNMP service isn’t running, firewall blocking port 161/UDP, or incorrect community string.</li>



<li><strong>Fixes:</strong>
<ul class="wp-block-list">
<li>Check service status: <code>sudo systemctl status snmpd</code> (start with <code>sudo systemctl start snmpd</code> if stopped).</li>



<li>Verify firewall: <code>sudo firewall-cmd --list-all</code> (add <code>161/udp</code> with <code>sudo firewall-cmd --permanent --add-port=161/udp</code> and <code>sudo firewall-cmd --reload</code> if missing).</li>



<li>Ensure the community string matches <code>/etc/snmp/snmpd.conf</code> and the querying IP is in the allowed subnet (e.g., <code>192.168.1.0/24</code>).</li>
</ul>
</li>
</ul>



<h4 class="wp-block-heading">2. SNMP Service Fails to Start</h4>



<ul class="wp-block-list">
<li><strong>Symptom:</strong> <code>sudo systemctl status snmpd</code> shows <code>Active: failed</code>.</li>



<li><strong>Possible Cause:</strong> Syntax error in <code>/etc/snmp/snmpd.conf</code> or package corruption.</li>



<li><strong>Fixes:</strong>
<ul class="wp-block-list">
<li>Review logs: <code>journalctl -u snmpd</code> for errors (e.g., &#8220;invalid token&#8221;).</li>



<li>Restore the backup: <code>sudo cp /etc/snmp/snmpd.conf.bak /etc/snmp/snmpd.conf</code>, then <code>sudo systemctl restart snmpd</code>.</li>



<li>Reinstall: <code>sudo dnf reinstall net-snmp net-snmp-utils</code>.</li>
</ul>
</li>
</ul>



<h4 class="wp-block-heading">3. Nagios XI Shows &#8220;Connection Refused&#8221; or No Data</h4>



<ul class="wp-block-list">
<li><strong>Symptom:</strong> Nagios XI can’t connect to the server or shows no SNMP metrics.</li>



<li><strong>Possible Causes:</strong> Network issue or mismatched SNMP settings.</li>



<li><strong>Fixes:</strong>
<ul class="wp-block-list">
<li>Test connectivity: From Nagios XI, run <code>ping &lt;server-ip&gt;</code> and <code>snmpwalk -v2c -c MySecureCommunity &lt;server-ip&gt;</code>.</li>



<li>Confirm Nagios XI settings (community string, v2c, IP) match your SNMP config.</li>



<li>Check Nagios logs: <code>Admin &gt; System Information &gt; View Log Files</code> for clues.</li>
</ul>
</li>
</ul>



<h4 class="wp-block-heading">Quick Tip</h4>



<ul class="wp-block-list">
<li>Use <code>journalctl -xe</code> or <code>tail -f /var/log/messages</code> to dig deeper into any issue.</li>
</ul>



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



<p>You have successfully installed and configured SNMP on CentOS Stream 9. This setup allows your server to be monitored remotely, enhancing network management capabilities. You also configured SNMP monitoring with Nagios XI, which provides a powerful interface for tracking system performance and network activity.</p>



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



<ul class="wp-block-list">
<li>Implement <strong>SNMP v3</strong> for enhanced security.</li>



<li>Set up <strong>SNMP traps</strong> in Nagios XI to receive alerts on critical events.</li>



<li>Use <strong>custom SNMP queries</strong> to monitor specific system parameters.</li>
</ul>



<p>By adding your SNMP-enabled server to Nagios XI, you can gain deeper insights into system health, set up alerts, and optimize network monitoring for better performance.</p>



<p>If you want the full wizard walkthrough (v2c/v3 + what each service means), see our doc &#8211; <a href="https://library.nagios.com/tutorials/how-to-use-the-linux-snmp-wizard-in-nagios-xi/" data-type="link" data-id="https://library.nagios.com/tutorials/how-to-use-the-linux-snmp-wizard-in-nagios-xi/">How to Use the Linux SNMP Wizard in Nagios XI</a>.</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
