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

<channel>
	<title>Louie Mattia &#8211; Nagios Library</title>
	<atom:link href="https://library.nagios.com/author/lmattia/feed/" rel="self" type="application/rss+xml" />
	<link>https://library.nagios.com</link>
	<description>Complete Nagios monitoring resources and documentation</description>
	<lastBuildDate>Thu, 05 Nov 2026 16:12:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://library.nagios.com/wp-content/uploads/2024/11/Nagios-Blue-N.svg</url>
	<title>Louie Mattia &#8211; Nagios Library</title>
	<link>https://library.nagios.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Robots in the Workplace: Security and Concerns</title>
		<link>https://library.nagios.com/industry-insights/robots-in-the-workplace/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Thu, 07 Aug 2025 14:00:00 +0000</pubDate>
				<category><![CDATA[Industry Insights]]></category>
		<category><![CDATA[IoT Devices]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=61171</guid>

					<description><![CDATA[Robots are becoming more commonplace both in media as well as enterprise environments, helping with simple tasks as well as complex ones. While they are convenient, connecting them to the network along with other devices brings out more security problems, be it losing control of the robot or important company information being stolen. With these [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Robots are becoming more commonplace both in media as well as enterprise environments, helping with simple tasks as well as complex ones. While they are convenient, connecting them to the network along with other devices brings out more security problems, be it losing control of the robot or important company information being stolen. With these risks in mind, it is important for businesses to know the risks involved as well as how to take preventive steps to keep everything secure.</p>



<h2 class="wp-block-heading">Why Robots Can Pose a Security Risk</h2>



<p class="wp-block-paragraph">Robots are incredibly advanced; however, they will still have very similar vulnerabilities to your standard IoT devices, such as having weak default passwords. Given that they have digital access as well as physical access, it&#8217;s especially important that these devices are secured. As robots being added into enterprise environments is still new, there haven&#8217;t been many examples of a security breach with them; however, the risks involved when security breaches are discovered have a huge impact.</p>



<p class="wp-block-paragraph"><a href="https://www.axios.com/2025/04/01/threat-spotlight-backdoor-in-chinese-robots-future-of-cybersecurity" target="_blank" rel="noopener">In April 2025, researchers discovered that the Unitree Go1 </a>robot dog contained a hidden backdoor service that could be activated without the user&#8217;s knowledge or consent. Once the device is connected to the internet, it would automatically initiate a remote access tunnel, potentially allowing hackers to take control of the robot, view its live camera feed, and access the underlying system via SSH. The researchers demonstrated that anyone with access to the necessary API keys could exploit this vulnerability, making it a serious and immediate threat<strong>.</strong></p>



<p class="wp-block-paragraph">In addition to the digital threats of having your data leaked or stolen, it is important to remember that a robot is also capable of interacting physically. Should it malfunction, or even worse, get hacked, it can easily lead to injuries, property damage, or restricted spaces being accessed. Normal IoT devices can give data, but with a robot, if someone from the outside gets control of it, they can cause a lot more harm, both to employees and the company.</p>



<h2 class="wp-block-heading">Best Practices</h2>



<p class="wp-block-paragraph">Many of the best practices from our article on <a href="https://library.nagios.com/industry-insights/securing-iot-devices/">securing IoT systems</a> apply directly to robots as well, since they are likely to be network-connected devices. However, in the case of robots, some of these practices become even more important, and there are also a few additional concerns unique to robotics that deserve special attention. </p>



<h3 class="wp-block-heading">1. Change Default Passwords and Strengthen Authentication</h3>



<p class="wp-block-paragraph">Changing default passwords is one of the simplest and most important steps in securing a robot. Many devices ship with factory-set credentials that are widely known, making them easy targets for attackers. These should be replaced immediately with strong, unique passwords. For added protection, especially when robots connect to cloud services or internal systems, implement multi-factor authentication (MFA) or certificate-based access. Securing login credentials early helps prevent one of the most common and avoidable threats.</p>



<h3 class="wp-block-heading">2. Know What’s on Your Network: Asset Visibility and Inventory</h3>



<p class="wp-block-paragraph">Robots can quietly join a network without drawing attention, especially in large or fast-moving environments. That makes real-time visibility essential. Use tools like Nmap or Nessus to scan for connected devices and log key details like IP address, manufacturer, and firmware version. For larger setups, platforms like AWS IoT Device Management or Azure IoT Hub can automate this process and alert you when new or unknown devices appear. Keeping track of every connected robot helps ensure nothing slips through the cracks.</p>



<h3 class="wp-block-heading">3. Encrypt Data</h3>



<p class="wp-block-paragraph">Robots contain sensitive information such as video streams from their camera, location data, and control commands. It’s important to protect this information by encrypting both the data being sent across networks and the data stored on the device or in the cloud. Using strong encryption methods, such as TLS for network communication and AES for stored data, helps prevent attackers from intercepting, reading, or altering critical information. This keeps robot operations secure and protects user privacy.</p>



<h3 class="wp-block-heading">4. Implement Network Segmentation and Monitoring</h3>



<p class="wp-block-paragraph">Keeping robots on a separate part of your network helps limit the damage if one gets compromised. Using isolated VLANs or subnets means an attacker can’t easily move from a robot to more sensitive systems. In addition, continuous monitoring tools like Nagios can watch for unusual activity, such as unexpected connections or spikes in data, that might signal a security issue. This combination of isolation and vigilance helps detect problems early and contain threats before they spread.</p>



<h3 class="wp-block-heading">5. Keep Software Up to Date</h3>



<p class="wp-block-paragraph">Robots run on software that can have security flaws. Making sure these are regularly updated is extremely important as the updates will likely contain patches or fixes to previously known security vulnerabilities. If possible, we want these devices to update automatically as well as keep an eye on what these updates entail so we can make sure they stay protected against both the old threats and any new threats.</p>



<h3 class="wp-block-heading">6. Ensure it Can be Stopped</h3>



<p class="wp-block-paragraph">Since robots are capable of moving around as well as physically interacting with the environment around them, it&#8217;s essential to ensure a way of stopping it should it go out of control for any reason. A button on the device, a remote kill switch, or some sort of software should be made to shut down the robot should this happen. While you could also simply disable the motors to stop it from moving, it’ll be more secure to shut down the device completely to cut off any connection if it were hacked.</p>



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



<p class="wp-block-paragraph">As robots become more common in workplaces, keeping them secure is more important than ever. Understanding their unique risks and following simple best practices, like changing default passwords, keeping track of devices on your network, encrypting data, separating networks, and regularly updating software, can help protect your business from costly hacks. Taking these steps isn’t just about technology; it’s about making sure your team can safely get the most out of these powerful tools.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Master Oracle DB Monitoring with Nagios XI</title>
		<link>https://library.nagios.com/tutorials/monitoring-oracle-db-with-xi/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Mon, 14 Jul 2025 14:24:30 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Oracle DB]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=60556</guid>

					<description><![CDATA[Oracle Database is a powerful relational database system designed for enterprise applications, but if disrupted, it can lead to serious consequences for your data and business operations. With the Premium version of Nagios XI, you gain access to multiple wizards that simplify gathering key information from the database, enabling easy and effective monitoring without complex [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Oracle Database is a powerful relational database system designed for enterprise applications, but if disrupted, it can lead to serious consequences for your data and business operations. With the Premium version of Nagios XI, you gain access to multiple wizards that simplify gathering key information from the database, enabling easy and effective monitoring without complex setup.</p>



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



<p class="wp-block-paragraph">To use all these wizards, you&#8217;ll need to install the Oracle plugins. Please refer to <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Installing-Oracle-Plugins-in-Nagios-XI-2024.pdf" target="_blank" rel="noopener">this document</a> for instructions on installing the required plugins.</p>



<h2 class="wp-block-heading">Why Use the Oracle DB Wizards</h2>



<p class="wp-block-paragraph">Nagios XI includes three specialized wizards for monitoring Oracle Database: the Oracle Query Wizard, Oracle Serverspace Wizard, and Oracle Tablespace Wizard. Each wizard is designed to gather specific, detailed information about your database, ensuring accurate and up-to-date monitoring with just a few clicks. The wizards can be found by navigating to <strong>Configure &gt; Configuration Wizards</strong>, then searching for &#8216;oracle&#8217;.</p>



<h2 class="wp-block-heading">Metrics You Can Monitor</h2>



<p class="wp-block-paragraph">The wizards allow you to monitor many valuable aspects, such as: </p>



<h3 class="wp-block-heading">Query Wizard</h3>



<ul class="wp-block-list">
<li><strong>Query</strong>: Able to monitor specific queries and set thresholds for them</li>
</ul>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="881" height="510" src="https://library.nagios.com/wp-content/uploads/2025/07/image-1.png" alt="Oracle DB Query Details " class="wp-image-60682" title="Master Oracle DB Monitoring with Nagios XI 1" srcset="https://library.nagios.com/wp-content/uploads/2025/07/image-1.png 881w, https://library.nagios.com/wp-content/uploads/2025/07/image-1-300x174.png 300w, https://library.nagios.com/wp-content/uploads/2025/07/image-1-768x445.png 768w" sizes="(max-width: 881px) 100vw, 881px" /><figcaption class="wp-element-caption">Oracle DB Query Details </figcaption></figure>



<p class="wp-block-paragraph">For more details about the Query wizard read <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-Oracle-DB-Queries-Nagios-XI-2024.pdf" target="_blank" rel="noreferrer noopener">here</a>.</p>



<h3 class="wp-block-heading">Tablespace Wizard</h3>



<ul class="wp-block-list">
<li><strong>Usage</strong>: Check space being sued by tablespace</li>



<li><strong>Free Space</strong>: The amount of unused space</li>



<li><strong>Remaining time until full</strong>: Estimates the time before tablespace is full</li>



<li><strong>I/O Balance</strong>: Helps identify uneven disk distribution</li>
</ul>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="400" src="https://library.nagios.com/wp-content/uploads/2025/07/image-2-1024x400.png" alt="Oracle DB Tablespace Metrics" class="wp-image-60683" title="Master Oracle DB Monitoring with Nagios XI 2" srcset="https://library.nagios.com/wp-content/uploads/2025/07/image-2-1024x400.png 1024w, https://library.nagios.com/wp-content/uploads/2025/07/image-2-300x117.png 300w, https://library.nagios.com/wp-content/uploads/2025/07/image-2-768x300.png 768w, https://library.nagios.com/wp-content/uploads/2025/07/image-2.png 1140w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Oracle DB Tablespace Metrics</figcaption></figure>



<p class="wp-block-paragraph">For more details about the Tablespace wizard read <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-Oracle-Tablespace-in-Nagios-XI-2024.pdf" target="_blank" rel="noreferrer noopener">here</a>.</p>



<h3 class="wp-block-heading">Serverspace Wizard</h3>



<ul class="wp-block-list">
<li><strong>Connection Time</strong>: How long it takes to establish connection</li>



<li><strong>Connected Users</strong>: How many active user sessions</li>



<li><strong>SGA Data Buffer Hit Ratio</strong>: Reflects efficient memory usage</li>



<li><strong>PGA in memory sort ratio</strong>: How many sorts are handled in memory, higher ratio means faster performance</li>



<li><strong>Redo I/O traffic</strong>: Volume of redo logs being written</li>



<li><strong>And more&#8230;</strong></li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="881" height="706" src="https://library.nagios.com/wp-content/uploads/2025/07/image.png" alt="Oracle DB Serverspace Metrics" class="wp-image-60681" title="Master Oracle DB Monitoring with Nagios XI 3" srcset="https://library.nagios.com/wp-content/uploads/2025/07/image.png 881w, https://library.nagios.com/wp-content/uploads/2025/07/image-300x240.png 300w, https://library.nagios.com/wp-content/uploads/2025/07/image-768x615.png 768w" sizes="(max-width: 881px) 100vw, 881px" /><figcaption class="wp-element-caption">Oracle DB Serverspace Metrics</figcaption></figure>



<p class="wp-block-paragraph">For more details about the Serverspace wizard read <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-Oracle-Serverspace-in-Nagios-XI-2024.pdf" target="_blank" rel="noreferrer noopener">here</a>.</p>



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



<p class="wp-block-paragraph">Proactive monitoring is key to maintaining a stable, high-performing Oracle Database environment. The Oracle Database wizards in the Premium edition of Nagios XI simplify this process, helping you track key metrics and catch issues early. With less time spent on setup and troubleshooting, you can keep your databases running smoothly and focus on supporting your business.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Prometheus Monitoring with Nagios XI: Installing the Exporters</title>
		<link>https://library.nagios.com/nagios-updates/prometheus-monitoring-nagios-xi/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Fri, 06 Jun 2025 20:13:47 +0000</pubDate>
				<category><![CDATA[Nagios Updates]]></category>
		<category><![CDATA[Techtips]]></category>
		<category><![CDATA[Agents]]></category>
		<category><![CDATA[Network Monitoring System]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Prometheus]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=57577</guid>

					<description><![CDATA[Learn how to integrate Prometheus metrics into Nagios XI for enhanced monitoring, alerting, and visualization across Windows and Linux systems.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Integrating Prometheus with Nagios XI combines powerful time-series monitoring with flexible alerting and visualization. By leveraging Prometheus’s efficient data collection and querying capabilities alongside Nagios XI’s mature alerting and escalation workflows, IT teams can monitor systems more proactively and respond to anomalies faster. In this guide, we’ll walk through configuring Prometheus to export metrics, for both Windows and Linux.</p>



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



<ul class="wp-block-list">
<li>You have Internet or Ethernet access</li>



<li>Your host is running Linux or Windows</li>
</ul>



<h2 class="wp-block-heading">Installing the Windows Exporter from Prometheus Community GitHub onto  a Windows Host</h2>



<h3 class="wp-block-heading">1. Download the latest version from GitHub</h3>



<ul class="wp-block-list">
<li>Go to <a href="https://github.com/prometheus-community/windows_exporter/releases" target="_blank" rel="noreferrer noopener">https://github.com/prometheus-community/windows_exporter/releases</a></li>



<li>Look for the latest release and download the <code>amd64.msi</code> file</li>
</ul>



<h3 class="wp-block-heading">2. Run the installer</h3>



<ul class="wp-block-list">
<li>In the initial <strong>Custom Setup</strong> section, choose <strong>Entire feature will be installed on local hard drive</strong> under <strong>Firewall Exception</strong>. This will add an inbound permission for the Exporter listening port.</li>
</ul>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/prometheus-win-exporter-firewall.png"><img loading="lazy" decoding="async" width="490" height="382" src="https://library.nagios.com/wp-content/uploads/2025/06/prometheus-win-exporter-firewall.png" alt="Screenshot of the Prometheus Windows Exporter installer, highlighting the Firewall Exception settings." class="wp-image-58682" title="Prometheus Monitoring with Nagios XI: Installing the Exporters 4" srcset="https://library.nagios.com/wp-content/uploads/2025/06/prometheus-win-exporter-firewall.png 490w, https://library.nagios.com/wp-content/uploads/2025/06/prometheus-win-exporter-firewall-300x234.png 300w" sizes="(max-width: 490px) 100vw, 490px" /></a><figcaption class="wp-element-caption">Enabling the Firewall Exception feature. </figcaption></figure>



<ul class="wp-block-list">
<li>Click<strong> Next</strong> or <strong>Proceed</strong> through the remaining steps in the installer.
<ul class="wp-block-list">
<li>You do not need to change or add any other information to use the Prometheus Wizard in Nagios XI, you can simply keep the defaults. </li>
</ul>
</li>
</ul>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-02_155641_480.png"><img loading="lazy" decoding="async" width="480" height="374" src="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-02_155641_480.png" alt="Prometheus Windows Exporter COnfiguration" class="wp-image-57648" title="Prometheus Monitoring with Nagios XI: Installing the Exporters 5" srcset="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-02_155641_480.png 480w, https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-02_155641_480-300x234.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></a><figcaption class="wp-element-caption">Windows Exporter Configuration</figcaption></figure>



<ul class="wp-block-list">
<li>It will say it is installed</li>



<li>(Optional) Confirm it is up and running by entering <code>http://&lt;HOST_IP>:9182/metrics</code></li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132.png"><img loading="lazy" decoding="async" width="1024" height="435" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132-1024x435.png" alt="Windows Exporter Metrics" class="wp-image-57649" title="Prometheus Monitoring with Nagios XI: Installing the Exporters 6" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132-1024x435.png 1024w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132-300x127.png 300w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132-768x326.png 768w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132-1536x653.png 1536w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-02-161132.png 1730w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Results from the metrics page</figcaption></figure>



<p class="wp-block-paragraph">With all the above steps completed, your Windows system is now properly configured for Prometheus monitoring, and you’re ready to move on to <a href="https://library.nagios.com/techtips/how-to-integrate-the-prometheus-wizard/" target="_blank" rel="noreferrer noopener">integrating it with Nagios XI</a>.</p>



<h2 class="wp-block-heading">Installing and Running the Prometheus Node Exporter on a Linux Host</h2>



<h3 class="wp-block-heading">1. Download the latest version using command line</h3>



<ul class="wp-block-list">
<li>Go to <a href="https://prometheus.io/download/#node_exporter" target="_blank" rel="noopener">https://prometheus.io/docs/guides/node-exporter/</a> </li>



<li>Right-click the Linux download link and select <strong>Copy Link</strong> to get exactly what you need to enter in the below <code>wget</code> command.</li>



<li>On your Linux host, open the terminal</li>



<li>Run the following command:<br></li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#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://github.com/prometheus/node_exporter/releases/download/v&lt;VERSION>/node_exporter-&lt;VERSION>.&lt;OS>-&lt;ARCH>.tar.gz</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://github.com/prometheus/node_exporter/releases/download/v&lt;VERSION&gt;/node_exporter-&lt;VERSION&gt;.&lt;OS&gt;-&lt;ARCH&gt;.tar.gz</span></span></code></pre></div>



<p class="wp-block-paragraph">This will download the Node Exporter to your Linux host. </p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095213_720.png"><img loading="lazy" decoding="async" width="720" height="85" src="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095213_720.png" alt="Node Exporter Install Success" class="wp-image-57679" title="Prometheus Monitoring with Nagios XI: Installing the Exporters 7" srcset="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095213_720.png 720w, https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095213_720-300x35.png 300w" sizes="(max-width: 720px) 100vw, 720px" /></a><figcaption class="wp-element-caption">Node Explorer Downloaded</figcaption></figure>



<h3 class="wp-block-heading">2. Run Node Explorer</h3>



<ul class="wp-block-list">
<li>Run the following commands:</li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#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>tar xvfz node_exporter-*.*-amd64.tar.gz
cd node_exporter-*.*-amd64
./node_exporter</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">tar xvfz node_exporter-*.*-amd64.tar.gz</span></span>
<span class="line"><span style="color: #D4D4D4">cd node_exporter-*.*-amd64</span></span>
<span class="line"><span style="color: #D4D4D4">./node_exporter</span></span></code></pre></div>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095432_480-2.png"><img loading="lazy" decoding="async" width="480" height="67" src="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095432_480-2.png" alt="Node Exporter Directory" class="wp-image-57800" title="Prometheus Monitoring with Nagios XI: Installing the Exporters 8" srcset="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095432_480-2.png 480w, https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095432_480-2-300x42.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></a><figcaption class="wp-element-caption">Node Exporter Directory Made</figcaption></figure>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095623_720.png"><img loading="lazy" decoding="async" width="720" height="495" src="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095623_720.png" alt="Running Node Exporter" class="wp-image-57683" title="Prometheus Monitoring with Nagios XI: Installing the Exporters 9" srcset="https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095623_720.png 720w, https://library.nagios.com/wp-content/uploads/2025/06/screenshot_2025-06-03_095623_720-300x206.png 300w" sizes="(max-width: 720px) 100vw, 720px" /></a><figcaption class="wp-element-caption">Node Exporter Running</figcaption></figure>



<p class="wp-block-paragraph">With these above steps completed, your Linux host is ready for Prometheus monitoring, and we are ready to move on to <a href="https://library.nagios.com/techtips/how-to-integrate-the-prometheus-wizard/" target="_blank" rel="noreferrer noopener">integrating with Nagios XI</a>.</p>



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



<p class="wp-block-paragraph">With this, we’ve set up the data exporters and are ready to configure monitoring in Nagios XI, enabling you to gather all of the same data the same way that Prometheus does, giving us access to the detailed information it provides while showing the data in XI in a clear way.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using the Prometheus Wizard in Nagios XI</title>
		<link>https://library.nagios.com/techtips/how-to-integrate-the-prometheus-wizard/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Fri, 06 Jun 2025 19:11:06 +0000</pubDate>
				<category><![CDATA[Techtips]]></category>
		<category><![CDATA[Agents]]></category>
		<category><![CDATA[Network Monitoring System]]></category>
		<category><![CDATA[Prometheus]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=57575</guid>

					<description><![CDATA[Set up Prometheus monitoring in Nagios XI quickly using the built-in wizard for streamlined metrics and service checks.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Nagios XI is a robust monitoring platform and integrating it with Prometheus enhances your ability to collect performance metrics from a wide range of systems and applications. This wizard comes with the premium version of Nagios XI. Whether you’re an experienced administrator or new to Nagios XI, this guide will help you quickly deploy and leverage the full power of Prometheus integration.</p>



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



<ul class="wp-block-list">
<li>Know the IP address of your host</li>



<li>Your Host is Linux or Windows</li>



<li>You have the Linux Exporter or Windows Exporter installed on your host
<ul class="wp-block-list">
<li>If you need help with this, you can refer to this <a href="https://library.nagios.com/nagios-updates/prometheus-monitoring-nagios-xi/" target="_blank" rel="noreferrer noopener">article</a> and come back</li>
</ul>
</li>
</ul>



<h2 class="wp-block-heading">Configuring Hosts using the Prometheus Wizard</h2>



<p class="wp-block-paragraph">As long as you are using the premium version of Nagios XI, you will automatically have the Prometheus wizard. If you are not using premium, you will need to upgrade to access the wizard.</p>



<ul class="wp-block-list">
<li>Go to <strong>Configure (gear icon) &gt; Configuration Wizards  </strong></li>



<li>Find and select <strong>Prometheus</strong></li>
</ul>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-115759.png"><img loading="lazy" decoding="async" width="409" height="163" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-115759.png" alt="Prometheus Wizard" class="wp-image-57849" title="Using the Prometheus Wizard in Nagios XI 10" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-115759.png 409w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-115759-300x120.png 300w" sizes="(max-width: 409px) 100vw, 409px" /></a><figcaption class="wp-element-caption">Prometheus Wizard</figcaption></figure>



<ul class="wp-block-list">
<li>Enter the host IP Address</li>



<li>Select the Operating System (<strong>Windows </strong>or <strong>Linux</strong>)</li>



<li>Do not change the host port, it will select the default for both Windows and Linux</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114344.png"><img loading="lazy" decoding="async" width="1024" height="442" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114344-1024x442.png" alt="Prometheus Wizard Setup " class="wp-image-57850" title="Using the Prometheus Wizard in Nagios XI 11" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114344-1024x442.png 1024w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114344-300x130.png 300w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114344-768x332.png 768w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114344.png 1471w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Prometheus Wizard Setup</figcaption></figure>



<p class="wp-block-paragraph">By default, the wizard will be set up to perform services for the CPU usage, memory usage and the disk usage.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114412.png"><img loading="lazy" decoding="async" width="831" height="257" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114412.png" alt="Wizard default services" class="wp-image-57851" title="Using the Prometheus Wizard in Nagios XI 12" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114412.png 831w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114412-300x93.png 300w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114412-768x238.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></a><figcaption class="wp-element-caption">Default services for the Wizard</figcaption></figure>



<p class="wp-block-paragraph">You can add more services that the exporter grabs by scrolling a little lower, should you wish to also monitor any of these services simply click them or hit select all.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114427.png"><img loading="lazy" decoding="async" width="1011" height="692" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114427.png" alt="Extra services from the exporter" class="wp-image-57852" title="Using the Prometheus Wizard in Nagios XI 13" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114427.png 1011w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114427-300x205.png 300w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114427-768x526.png 768w" sizes="(max-width: 1011px) 100vw, 1011px" /></a><figcaption class="wp-element-caption">Additional services to select</figcaption></figure>



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



<p class="wp-block-paragraph">On the homepage find your new host and check its services. You&#8217;ll be able to see all the services and depending on how long they have been running you can see a graph showing the changes over time.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114636.png"><img loading="lazy" decoding="async" width="1024" height="414" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114636-1024x414.png" alt="Services " class="wp-image-57853" title="Using the Prometheus Wizard in Nagios XI 14" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114636-1024x414.png 1024w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114636-300x121.png 300w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114636-768x311.png 768w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-04-114636.png 1350w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Host Services</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-03-125449-1.png"><img loading="lazy" decoding="async" width="1024" height="445" src="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-03-125449-1-1024x445.png" alt="24 Hour CPU Graph" class="wp-image-58247" title="Using the Prometheus Wizard in Nagios XI 15" srcset="https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-03-125449-1-1024x445.png 1024w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-03-125449-1-300x130.png 300w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-03-125449-1-768x334.png 768w, https://library.nagios.com/wp-content/uploads/2025/06/Screenshot-2025-06-03-125449-1.png 1164w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">24 Hour CPU Usage Graph</figcaption></figure>



<p class="wp-block-paragraph">As you can see with our new host, it has started to monitor all services that we had selected.</p>



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



<p class="wp-block-paragraph">Integrating the Prometheus Wizard with Nagios XI streamlines performance monitoring, greatly improving the efficiency and responsiveness of your infrastructure oversight. With this intuitive tool, administrators can easily tap into key metrics, quickly detect issues, and maintain the health and stability of their systems.</p>



<p class="wp-block-paragraph">To learn more about using monitoring wizards in Nagios XI, you can take a look at this document: </p>



<p class="wp-block-paragraph"><a href="https://assets.nagios.com/downloads/nagiosxi/docs/Understanding-And-Using-Configuration-Wizards-In-Nagios-XI.pdf" target="_blank" rel="noopener">Understanding and Using Configuration Wizards in Nagios XI</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>User Management Dashlet</title>
		<link>https://library.nagios.com/developer-corner/user-management-dashlet/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Mon, 28 Apr 2025 14:42:05 +0000</pubDate>
				<category><![CDATA[Developer Corner]]></category>
		<category><![CDATA[Dashlet]]></category>
		<category><![CDATA[User Management]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=53628</guid>

					<description><![CDATA[Nagios XI administrators have the capability to create and manage user accounts, each with specific permissions to monitor hosts and services within the Nagios XI instance. For administrators who require quick access to this user information, the User Management Dashlet provides an efficient solution. This Dashlet enables administrators to view, add, and remove users directly [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Nagios XI administrators have the capability to create and manage user accounts, each with specific permissions to monitor hosts and services within the Nagios XI instance. For administrators who require quick access to this user information, the User Management Dashlet provides an efficient solution. This Dashlet enables administrators to view, add, and remove users directly from their dashboards, streamlining the management process and offering a centralized interface for user oversight.</p>



<h2 class="wp-block-heading">How the User Management Dashlet works</h2>



<p class="wp-block-paragraph">The User Management Dashlet utilizes the Nagios XI API, specifically interacting with the system tree, to retrieve and manage user information. The API endpoint designed for user data includes several details about each user, such as their user ID, username, full name, email address, and account status (enabled/disabled). However, for the dashlet’s intended functionality, only the username and user ID are required, as these are the primary identifiers necessary for adding or removing users.</p>



<p class="wp-block-paragraph">Upon initialization, the Dashlet queries the API to fetch a list of all users within the Nagios XI instance. This list is then displayed on the administrator&#8217;s dashboard, where the user IDs and usernames are shown in an easily navigable format. With this data in hand, the administrator can efficiently perform actions such as adding new users or removing existing ones directly from the dashboard interface, without needing to navigate through multiple pages or API endpoints.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105539.png"><img loading="lazy" decoding="async" width="246" height="80" src="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105539.png" alt="Screenshot 2025 04 02 105539" class="wp-image-54082" title="User Management Dashlet 16"></a><figcaption class="wp-element-caption">List of Existing Users</figcaption></figure>



<p class="wp-block-paragraph">The user management process is seamless, allowing for immediate updates to the user list in real-time, with all changes being reflected instantly across the Nagios XI environment. The integration with the API ensures that the Dashlet always displays up-to-date information, providing administrators with a reliable and efficient tool to maintain user access.</p>



<p class="wp-block-paragraph">The other features of this Dashlet allow an administrator to add or delete users in the Nagios XI instance. The buttons won’t do anything immediately, aside from revealing a modal where you can input or select information.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-110222.png"><img loading="lazy" decoding="async" width="452" height="76" src="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-110222.png" alt="Screenshot 2025 04 02 110222" class="wp-image-54084" title="User Management Dashlet 17" srcset="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-110222.png 452w, https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-110222-300x50.png 300w" sizes="(max-width: 452px) 100vw, 452px" /></a><figcaption class="wp-element-caption">Add and Delete Buttons</figcaption></figure>



<p class="wp-block-paragraph">Let’s start with the &#8220;Add Users&#8221; modal. This modal requests the necessary details for creating a user, including their username, full name, email, and a simple password. The password is considered simple because the new user will be prompted to change it upon logging in. Once all information is entered, pressing the button will send the request to the API, officially adding the user to Nagios XI. The newly created user will have basic privileges. This means their API access will be very limited compared to the administrator account, which is only able to view objects. If you want to make a user an administrator, you will have to change permissions in <strong>Admin>Manage Users.</strong></p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105547.png"><img loading="lazy" decoding="async" width="299" height="437" src="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105547.png" alt="Screenshot 2025 04 02 105547" class="wp-image-54085" title="User Management Dashlet 18" srcset="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105547.png 299w, https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105547-205x300.png 205w" sizes="(max-width: 299px) 100vw, 299px" /></a><figcaption class="wp-element-caption">Add Users Modal</figcaption></figure>



<p class="wp-block-paragraph">The final feature of this dashlet allows you to delete users. It does this fairly simply, it uses a dropdown that collects users in the same way as our earlier list. This means that the list will update when either of the dashlet functions is run. Simply choose a user from the dropdown and click delete, it will ask you to confirm just to make sure you didn&#8217;t select the wrong user, but after you confirm, the user will be deleted.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105557.png"><img loading="lazy" decoding="async" width="600" height="234" src="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105557.png" alt="Screenshot 2025 04 02 105557" class="wp-image-54119" title="User Management Dashlet 19" srcset="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105557.png 600w, https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105557-300x117.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption class="wp-element-caption">Delete Users Modal</figcaption></figure>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105604.png"><img loading="lazy" decoding="async" width="568" height="137" src="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105604.png" alt="Screenshot 2025 04 02 105604" class="wp-image-54086" title="User Management Dashlet 20" srcset="https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105604.png 568w, https://library.nagios.com/wp-content/uploads/2025/04/Screenshot-2025-04-02-105604-300x72.png 300w" sizes="(max-width: 568px) 100vw, 568px" /></a><figcaption class="wp-element-caption">Delete Users Drop Down</figcaption></figure>



<p class="wp-block-paragraph">To try the User Management Dashlet, download it <a href="https://github.com/NagiosEnterprises/dashlets-extra/tree/user-management" data-type="link" data-id="https://github.com/NagiosEnterprises/dashlets-extra/tree/user-management" target="_blank" rel="noopener">here</a>. If you&#8217;d like to read more about the Nagios XI API, please read this article: <a href="https://library.nagios.com/training/using-the-nagios-xi-api/" target="_blank" rel="noreferrer noopener">https://library.nagios.com/training/using-the-nagios-xi-api/</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Master Using the Nagios XI API</title>
		<link>https://library.nagios.com/training/using-the-nagios-xi-api/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Wed, 02 Apr 2025 19:49:22 +0000</pubDate>
				<category><![CDATA[Training]]></category>
		<category><![CDATA[API]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=49234</guid>

					<description><![CDATA[The built-in Nagios XI API (Application Programming Interface) provides access to a wide range of data, including hosts, services, users, and more. There are times when you may need to interact with the API. To do that you need to learn how to access the API as well as what it contains. What is Contained [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The built-in Nagios XI API (Application Programming Interface) provides access to a wide range of data, including hosts, services, users, and more. There are times when you may need to interact with the API. To do that you need to learn how to access the API as well as what it contains.</p>



<h2 class="wp-block-heading">What is Contained in the API</h2>



<p class="wp-block-paragraph">The Nagios XI API is divided into three core sections: Objects, Config, and System. Each section serves a distinct purpose, making the API highly flexible and powerful.</p>



<p class="wp-block-paragraph"><strong>Objects</strong>: This section is read-only and provides detailed information about various elements within Nagios XI. It allows users to query important resources, such as hosts, services, and other objects, providing insight into their current states and configurations. The data retrieved from this section can be delivered in either XML or JSON formats, making it easy to integrate and process within other applications or systems.</p>



<p class="wp-block-paragraph"><strong>Config</strong>: The Config section is designed for administrative tasks, giving administrators the ability to add, remove, and modify objects such as hosts, services, and other configurations within Nagios XI. This section works directly with the Core Config Manager, allowing the creation and deletion of items. It provides a more dynamic role within the API, as it enables direct management and updates of system configurations to meet specific needs or changes in the infrastructure.</p>



<p class="wp-block-paragraph"><strong>System</strong>: Like the Config section, the System section is reserved for administrators and provides the ability to manage the core subsystems of Nagios XI. It allows admins to execute system-level commands, configure system settings, and perform administrative tasks that impact the overall functionality and health of the Nagios XI environment.</p>



<h3 class="wp-block-heading">Types of API Requests</h3>



<p class="wp-block-paragraph">When interacting with the Nagios XI API, you&#8217;ll primarily use four types of HTTP requests to interact with the system: <strong>GET</strong>, <strong>POST</strong>, <strong>PUT</strong>, and <strong>DELETE</strong>. Each request type serves a different purpose, allowing you to retrieve, create, update, or delete data.</p>



<ol class="wp-block-list">
<li><strong>GET</strong> – <strong>Retrieve Data</strong><br>The <strong>GET</strong> request is used to retrieve information from the Nagios XI API. It is typically used to query data such as host status, service status, or configuration details. This is a read-only operation and does not modify any data within the system. For example, you might use a GET request to check the current status of a host or service.<br><strong>Example</strong>: Retrieve host status or service details.</li>



<li><strong>POST</strong> – <strong>Create or Submit Data</strong><br>The <strong>POST</strong> request is used to send data to the server, typically to create new resources or submit information. For example, when adding a new host or service to Nagios XI, you’ll use a POST request to submit the necessary configuration data. It is used when creating new objects or triggering actions that modify the state of the system.<br><strong>Example</strong>: Add a new host, service, or update configuration.</li>



<li><strong>PUT</strong> – <strong>Update Data</strong><br>The <strong>PUT</strong> request is used to update or modify an existing resource. It’s typically used when you want to change the configuration of a current host, service, or other object in Nagios XI. Unlike POST, which creates new resources, PUT is meant for updating existing ones.<br><strong>Example</strong>: Update the configuration of an existing host or service.</li>



<li><strong>DELETE</strong> – <strong>Remove Data</strong><br>The <strong>DELETE</strong> request is used to remove a resource from the Nagios XI system. It’s used when you want to delete objects such as hosts, services, or configurations. Deleting data through the API is a permanent operation, so it&#8217;s important to be sure before making this type of request.<br><strong>Example</strong>: Remove a host or service from the system.</li>
</ol>



<h2 class="wp-block-heading">How to Access the API via URL</h2>



<p class="wp-block-paragraph">The Nagios XI API can be accessed in a similar way to how you interact with Nagios XI itself—using a web browser. However, it&#8217;s important to note that this method is limited to <strong>GET </strong>requests, which allow you to retrieve and view data from the system. For tasks like creating, updating, or deleting resources (such as adding hosts or modifying configurations), you’ll need to use a different approach, typically by making <strong>POST</strong>, <strong>PUT</strong>, or <strong>DELETE</strong> requests through code. To get started, simply enter the following URL in your browser:</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>http://&lt;Your Nagios XI IP>/nagiosxi/api/v1/</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">http://&lt;Your Nagios XI IP&gt;/nagiosxi/api/v1/</span></span></code></pre></div>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2026/10/XI-API-Error.png"><img loading="lazy" decoding="async" width="288" height="72" src="https://library.nagios.com/wp-content/uploads/2026/10/XI-API-Error.png" alt="Screenshot of XI API Error" class="wp-image-70740" title="Master Using the Nagios XI API 21"></a><figcaption class="wp-element-caption">API Error</figcaption></figure>



<p class="wp-block-paragraph">At this point, you’ll see an error message—this is expected since no requests have been made yet. To retrieve data, you need to specify the section of the API you want to query and the resource you&#8217;re interested in. The URL should look like this, where <code>&lt;Your Nagios XI IP></code> is the IP address of your XI server:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>http://&lt;Your Nagios XI IP>/nagiosxi/api/v1/&lt;section>/&lt;resource></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">http://&lt;Your Nagios XI IP&gt;/nagiosxi/api/v1/&lt;section&gt;/&lt;resource&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">The section refers to a main area of the API, like <code>objects</code>, <code>config</code>, or <code>system</code>, each offering access to different data or functions. For example, the <code>objects</code> section retrieves information about items like hosts and services, while the <code>config</code> section allows administrators to manage those objects. A resource is a specific data type or object within that section that you query or manipulate. In the <code>objects</code> section, a resource might be <code>hoststatus</code>, showing the current status of hosts, while in the <code>config</code> section, a resource could be service, used to manage service configurations.</p>



<p class="wp-block-paragraph">To access the API, you&#8217;ll also need to include your API key in the URL. This key grants you access to the system and helps determine the permissions you have based on your user role. Depending on your level of access, different sections and resources may be available to you. </p>



<p class="wp-block-paragraph">To find your API key, navigate to the <strong>Authentication</strong> section of <strong>Help > API Docs > Introduction</strong> in the Nagios XI interface. Once you have it, append it to the URL like this, where <code>&lt;API key></code> is your API key:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#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>http://&lt;Your Nagios XI IP>/nagiosxi/api/v1/&lt;section>/&lt;resource>?apikey=&lt;API key></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">http://&lt;Your Nagios XI IP&gt;/nagiosxi/api/v1/&lt;section&gt;/&lt;resource&gt;?apikey=&lt;API key&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">With everything set up correctly, you should now see real data returned from the API. We’ll use the results from querying hoststatus objects as an example.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341.png"><img loading="lazy" decoding="async" width="1024" height="292" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341-1024x292.png" alt="API Query Results" class="wp-image-49560" title="Master Using the Nagios XI API 22" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341-1024x292.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341-300x85.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341-768x219.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341-1536x438.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-115341.png 1902w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Object Host Status Query Results</figcaption></figure>



<p class="wp-block-paragraph">By default, the output can appear a bit messy. To improve readability, you can check the <strong>Pretty-print</strong> box in the UI, which automatically organizes the response. Alternatively, append <code>&amp;pretty=1</code> to the end of the URL for instant formatting. This makes the output clean, organized, and easy to digest.</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>http://&lt;Your Nagios XI IP>/nagiosxi/api/v1/objects/hoststatus?apikey=&lt;API key>&amp;pretty=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">http://&lt;Your Nagios XI IP&gt;/nagiosxi/api/v1/objects/hoststatus?apikey=&lt;API key&gt;&amp;pretty=1</span></span></code></pre></div>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-120446.png"><img loading="lazy" decoding="async" width="710" height="931" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-120446.png" alt="API Query results( Clean)" class="wp-image-49562" title="Master Using the Nagios XI API 23" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-120446.png 710w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-24-120446-229x300.png 229w" sizes="(max-width: 710px) 100vw, 710px" /></a><figcaption class="wp-element-caption">Object Host Status Query Results Cleaned</figcaption></figure>



<p class="wp-block-paragraph">Objects are for displaying information, while Config and System are used for adding, removing, or modifying objects. What you write will depend on the action you want to perform with the API. For tasks like editing or modifying data, you’ll need to use code, as this involves making requests that modify the system.</p>



<h2 class="wp-block-heading">Access the API Using Code</h2>



<p class="wp-block-paragraph">There are many reasons why you might want to access the Nagios XI API programmatically. For instance, you may want to fetch the data posted to the system, monitor host/service statuses, or edit configurations directly through your code. Interacting with the API via code provides flexibility and automation, streamlining your workflow.</p>



<p class="wp-block-paragraph">To access the API, we can use the appropriate method for interacting with URLs in the programming language you&#8217;re working with. Since Nagios XI runs on a web-based interface, the most common language for writing programs inside Nagios XI itself is PHP.</p>



<p class="wp-block-paragraph">Below is an example of how to access and interact with the Nagios XI API using PHP:</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>&lt;?php
// Define the server IP and API token
$server_ip = '&lt;Your Nagios XI IP>';  // Replace with your Nagios XI IP
$api_token = '&lt;Your API Key>';  // Replace with your Nagios XI API key

// Build the URL for the API request
$url = "http://$server_ip/nagiosxi/api/v1/&lt;section>/&lt;resource>?apikey=$api_token&amp;pretty=1";

// Initialize cURL session
$ch = curl_init();

// Set the URL for the request
curl_setopt($ch, CURLOPT_URL, $url);

// Set option to return the response as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the request and store the response
$response = curl_exec($ch);

// Check if the request was successful
if ($response === false) {
    echo "Error: " . curl_error($ch);  // Handle errors if the request fails
} else {
    // Decode the JSON response
    $data = json_decode($response, true);
    
    // Output the response (for testing or processing)
    echo "&lt;pre>";
    print_r($data);  // Print the data in a readable format
    echo "&lt;/pre>";
}

// Close the cURL session
curl_close($ch);
?></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;?php</span></span>
<span class="line"><span style="color: #6A9955">// Define the server IP and API token</span></span>
<span class="line"><span style="color: #9CDCFE">$server_ip</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&#39;&lt;Your Nagios XI IP&gt;&#39;</span><span style="color: #D4D4D4">;  </span><span style="color: #6A9955">// Replace with your Nagios XI IP</span></span>
<span class="line"><span style="color: #9CDCFE">$api_token</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&#39;&lt;Your API Key&gt;&#39;</span><span style="color: #D4D4D4">;  </span><span style="color: #6A9955">// Replace with your Nagios XI API key</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Build the URL for the API request</span></span>
<span class="line"><span style="color: #9CDCFE">$url</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;http://</span><span style="color: #9CDCFE">$server_ip</span><span style="color: #CE9178">/nagiosxi/api/v1/&lt;section&gt;/&lt;resource&gt;?apikey=</span><span style="color: #9CDCFE">$api_token</span><span style="color: #CE9178">&amp;pretty=1&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Initialize cURL session</span></span>
<span class="line"><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">curl_init</span><span style="color: #D4D4D4">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Set the URL for the request</span></span>
<span class="line"><span style="color: #DCDCAA">curl_setopt</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">, CURLOPT_URL, </span><span style="color: #9CDCFE">$url</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Set option to return the response as a string</span></span>
<span class="line"><span style="color: #DCDCAA">curl_setopt</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">, CURLOPT_RETURNTRANSFER, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Execute the request and store the response</span></span>
<span class="line"><span style="color: #9CDCFE">$response</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">curl_exec</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Check if the request was successful</span></span>
<span class="line"><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">$response</span><span style="color: #D4D4D4"> === </span><span style="color: #569CD6">false</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">echo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Error: &quot;</span><span style="color: #D4D4D4"> </span><span style="color: #D4D4D4">.</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">curl_error</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">);  </span><span style="color: #6A9955">// Handle errors if the request fails</span></span>
<span class="line"><span style="color: #D4D4D4">} </span><span style="color: #C586C0">else</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Decode the JSON response</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$data</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">json_decode</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$response</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">    </span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Output the response (for testing or processing)</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">echo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;&lt;pre&gt;&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">print_r</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$data</span><span style="color: #D4D4D4">);  </span><span style="color: #6A9955">// Print the data in a readable format</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">echo</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;&lt;/pre&gt;&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Close the cURL session</span></span>
<span class="line"><span style="color: #DCDCAA">curl_close</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">?&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">This code example demonstrates how to send a request to the API, process the response, and display the data in a readable format. It&#8217;s a simple and efficient way to automate interactions with Nagios XI.</p>



<p class="wp-block-paragraph">When interacting with the Nagios XI API to modify data, such as adding a new host, the process differs significantly from simply retrieving information. Instead of making a <strong>GET</strong> request, we’ll use a <strong>POST</strong> request, which allows us to send data to the server to create or modify resources. The Config section of the API is used for this purpose, as it enables administrators to make changes to the Nagios XI configuration.</p>



<p class="wp-block-paragraph">Here’s an example of how you can easily add a host to your Nagios XI setup using the API and PHP. This example walks you through how to structure the API request, send the necessary data, and handle the response. By automating the process like this, you can quickly add hosts to your Nagios XI environment, saving time and reducing the need for manual configuration.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>function add_host_via_api($api_token)
{
    // Example: Prepare the POST data
    $data = &#91;
        'host_name'                => 'testapihost',
        'address'                  => '127.0.0.1',
        'check_command'            => 'check_ping!3000,80%!5000,100%',
        'max_check_attempts'       => 2,
        'check_period'             => '24x7',
        'contacts'                 => 'nagiosadmin',
        'notification_interval'    => 5,
        'notification_period'      => '24x7',
        'applyconfig'              => 1
    &#93;;

    // Set up the POST fields
    $post_fields = http_build_query($data);

    // Get the Nagios server IP address
    $server_ip = get_nagios_server_ip();

    // Prepare the URL for the API call
    $url = "http://$server_ip/nagiosxi/api/v1/config/host?apikey=$api_token";

    // Use cURL to send the POST request
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);

    // Execute the cURL request and get the response
    $response = curl_exec($ch);

    // Check for errors in the cURL request
    if ($response === false) {
        return curl_error($ch);
    }

    // Close the cURL handle
    curl_close($ch);

    // Decode the response (optional)
    $response_data = json_decode($response, true);
    
    // Check for success or failure in response
    if (isset($response_data&#91;'error'&#93;)) {
        return "API Error: " . $response_data&#91;'error'&#93;;
    }

    return true;  // Return true if the host was added successfully
}</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: #569CD6">function</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">add_host_via_api</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$api_token</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Example: Prepare the POST data</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$data</span><span style="color: #D4D4D4"> = &#91;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;host_name&#39;</span><span style="color: #D4D4D4">                =&gt; </span><span style="color: #CE9178">&#39;testapihost&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;address&#39;</span><span style="color: #D4D4D4">                  =&gt; </span><span style="color: #CE9178">&#39;127.0.0.1&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;check_command&#39;</span><span style="color: #D4D4D4">            =&gt; </span><span style="color: #CE9178">&#39;check_ping!3000,80%!5000,100%&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;max_check_attempts&#39;</span><span style="color: #D4D4D4">       =&gt; </span><span style="color: #B5CEA8">2</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;check_period&#39;</span><span style="color: #D4D4D4">             =&gt; </span><span style="color: #CE9178">&#39;24x7&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;contacts&#39;</span><span style="color: #D4D4D4">                 =&gt; </span><span style="color: #CE9178">&#39;nagiosadmin&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;notification_interval&#39;</span><span style="color: #D4D4D4">    =&gt; </span><span style="color: #B5CEA8">5</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;notification_period&#39;</span><span style="color: #D4D4D4">      =&gt; </span><span style="color: #CE9178">&#39;24x7&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #CE9178">&#39;applyconfig&#39;</span><span style="color: #D4D4D4">              =&gt; </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #D4D4D4">    &#93;;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Set up the POST fields</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$post_fields</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">http_build_query</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$data</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Get the Nagios server IP address</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$server_ip</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">get_nagios_server_ip</span><span style="color: #D4D4D4">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Prepare the URL for the API call</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$url</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;http://</span><span style="color: #9CDCFE">$server_ip</span><span style="color: #CE9178">/nagiosxi/api/v1/config/host?apikey=</span><span style="color: #9CDCFE">$api_token</span><span style="color: #CE9178">&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Use cURL to send the POST request</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">curl_init</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">curl_setopt</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">, CURLOPT_URL, </span><span style="color: #9CDCFE">$url</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">curl_setopt</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">, CURLOPT_RETURNTRANSFER, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">curl_setopt</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">, CURLOPT_POST, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">curl_setopt</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">, CURLOPT_POSTFIELDS, </span><span style="color: #9CDCFE">$post_fields</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Execute the cURL request and get the response</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$response</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">curl_exec</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Check for errors in the cURL request</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">$response</span><span style="color: #D4D4D4"> === </span><span style="color: #569CD6">false</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">curl_error</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">    }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Close the cURL handle</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">curl_close</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$ch</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Decode the response (optional)</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$response_data</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">json_decode</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$response</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">    </span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Check for success or failure in response</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #DCDCAA">isset</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">$response_data</span><span style="color: #D4D4D4">&#91;</span><span style="color: #CE9178">&#39;error&#39;</span><span style="color: #D4D4D4">&#93;)) {</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;API Error: &quot;</span><span style="color: #D4D4D4"> </span><span style="color: #D4D4D4">.</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">$response_data</span><span style="color: #D4D4D4">&#91;</span><span style="color: #CE9178">&#39;error&#39;</span><span style="color: #D4D4D4">&#93;;</span></span>
<span class="line"><span style="color: #D4D4D4">    }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">;  </span><span style="color: #6A9955">// Return true if the host was added successfully</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph">Once the request is made, the response will let you know if the host was added successfully or if there were any issues. We’ve included error handling to catch potential problems, such as network errors or invalid parameters. If everything goes as planned, the function will return <code>true</code>, confirming the host was added with no issues.</p>



<p class="wp-block-paragraph">This example highlights how modifying your Nagios XI configuration through the API is quite different from just retrieving data. With <strong>POST</strong> requests, you gain the ability to create, update, and delete resources, giving you full control over your Nagios XI instance.</p>



<p class="wp-block-paragraph">The other types of calls that can be made are <strong>PUT </strong>requests, which are used to edit existing data in the API and <strong>DELETE </strong>requests, which deletes aspects of the API.</p>



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



<p class="wp-block-paragraph">The Nagios XI API is a powerful tool for managing your Nagios XI instance, offering programmatic access to key data and configuration management capabilities. By following the steps outlined here, you can quickly integrate the API into your processes, improving your workflow. Whether you&#8217;re querying status data, managing configurations, or integrating with other systems, the Nagios XI API gives you the flexibility to enhance your Nagios XI experience.</p>



<p class="wp-block-paragraph">For additional assistance, be sure to check the Nagios XI Help page for more in-depth resources and support regarding the Nagios XI API.</p>



<p class="wp-block-paragraph">Related Documentation: <a href="https://assets.nagios.com/downloads/nagiosxi/docs/Accessing-and-Using-the-XI-REST-API.pdf" target="_blank" rel="noreferrer noopener">Accessing and Using the XI REST API</a></p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2026/10/XI-Help-APIDocs.png"><img loading="lazy" decoding="async" width="278" height="481" src="https://library.nagios.com/wp-content/uploads/2026/10/XI-Help-APIDocs.png" alt="Screenshot of Nagios XI Help menu for API Docs" class="wp-image-70741" title="Master Using the Nagios XI API 24" srcset="https://library.nagios.com/wp-content/uploads/2026/10/XI-Help-APIDocs.png 278w, https://library.nagios.com/wp-content/uploads/2026/10/XI-Help-APIDocs-173x300.png 173w" sizes="(max-width: 278px) 100vw, 278px" /></a><figcaption class="wp-element-caption">The Help page is where the API docs are located in the Nagios XI interface</figcaption></figure>



<p class="wp-block-paragraph">For a full overview of the interfaces Nagios products expose, see <a href="https://library.nagios.com/apis/">Nagios APIs</a>.</p>

]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Check Down Hosts at a Glance &#8211; a 2025 Nagios XI Dashlet</title>
		<link>https://library.nagios.com/support-tips/nagios-x-down-hosts-dashlet/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Tue, 04 Mar 2025 20:18:38 +0000</pubDate>
				<category><![CDATA[Support Tips]]></category>
		<category><![CDATA[Dashlet]]></category>
		<category><![CDATA[Down Host]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=43392</guid>

					<description><![CDATA[Nagios XI contains many features and details about your hosts and their services. While you can go into view them in a number of ways, sometimes with everything going on, you want a quick glance to see what the problem areas are. The Down Hosts Dashlet allows users to see in their dashboards which hosts [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Nagios XI contains many features and details about your hosts and their services. While you can go into view them in a number of ways, sometimes with everything going on, you want a quick glance to see what the problem areas are. The Down Hosts Dashlet allows users to see in their dashboards which hosts are down at a glance. We will be going over what the Dashlet does, how it works, as well as how to set it up.</p>



<h2 class="wp-block-heading">What the Hosts Down Dashlet Does &amp; How</h2>



<p class="wp-block-paragraph">This Dashlet is a useful tool for monitoring the status of your hosts within Nagios XI. It provides a quick overview by scanning through all your hosts and displaying only those that are in a down state. This focused approach helps you identify issues faster, without having to sift through your entire list of hosts.</p>



<p class="wp-block-paragraph">What makes this Dashlet especially convenient is that each host name is a clickable link, which takes you directly to the host&#8217;s detailed status page. This allows you to quickly investigate the problem and take the necessary actions. It&#8217;s a simple yet effective way to enhance your dashboard and streamline the monitoring process, making it easier to stay on top of any critical issues.</p>



<p class="wp-block-paragraph">The Hosts Down Dashlet uses Nagios XI&#8217;s built-in API to collect real-time data about the status of your hosts. It queries the API to check the status of all hosts and then filters out those that are marked as down. This process ensures that the Dashlet always provides an accurate list of hosts that are down.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113225.png"><img loading="lazy" decoding="async" width="465" height="269" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113225.png" alt="Screenshot 2025 02 25 113225" class="wp-image-50157" title="Check Down Hosts at a Glance - a 2025 Nagios XI Dashlet 25" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113225.png 465w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113225-300x174.png 300w" sizes="(max-width: 465px) 100vw, 465px" /></a><figcaption class="wp-element-caption">Down Hosts Dashlet in use</figcaption></figure>



<h2 class="wp-block-heading">Setting up the Dashlet</h2>



<p class="wp-block-paragraph">Once you’ve downloaded and installed the Hosts Down Dashlet on your Nagios XI instance (download <a href="https://github.com/NagiosEnterprises/dashlets-extra/blob/hosts-down/dashlet-down-hosts-dashlet.zip" data-type="link" data-id="https://github.com/NagiosEnterprises/dashlets-extra/blob/hosts-down/dashlet-down-hosts-dashlet.zip" target="_blank" rel="noopener">here</a>), setting it up is quick and easy. First, head to the Admin section to find and copy your API key. This unique code allows the Dashlet to securely access and display the necessary data from your Nagios XI instance. Then, navigate to the Dashboards tab and go to Available Dashlets. From there, locate and click on the &#8220;Down Hosts Dashlet,&#8221; choose the dashboard you want to add it to, and paste your API key in the provided field. Once that’s done, the Dashlet will be ready to show the real-time status of your hosts.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113453.png"><img loading="lazy" decoding="async" width="443" height="363" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113453.png" alt="Screenshot 2025 02 25 113453" class="wp-image-50158" title="Check Down Hosts at a Glance - a 2025 Nagios XI Dashlet 26" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113453.png 443w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-25-113453-300x246.png 300w" sizes="(max-width: 443px) 100vw, 443px" /></a><figcaption class="wp-element-caption">Dashlet Setup</figcaption></figure>



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



<p class="wp-block-paragraph">Setting up the Hosts Down Dashlet in Nagios XI is a quick and straightforward process that enhances your ability to monitor critical host statuses in real time. With just a few simple steps, you can have the Dashlet up and running, giving you a clear overview of any issues that need immediate attention. For more advanced details on how the API works and how to make the most of it, check <a href="https://library.nagios.com/training/using-the-nagios-xi-api/" data-type="link" data-id="https://library.nagios.com/training/using-the-nagios-xi-api/" target="_blank" rel="noreferrer noopener">here</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Set Up Ubuntu 22 for Nagios Log Server</title>
		<link>https://library.nagios.com/training/ubuntu-22-log-server/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Wed, 19 Feb 2025 15:47:42 +0000</pubDate>
				<category><![CDATA[Training]]></category>
		<category><![CDATA[Ubuntu 22]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=44283</guid>

					<description><![CDATA[Setting up Ubuntu 22 for log monitoring with Nagios Log Server (LS) is an important step in maintaining system health and security. Nagios Log Server offers a powerful, centralized solution for capturing and analyzing logs from multiple sources. This article outlines the necessary steps to prepare your Ubuntu 22 system and configure Nagios LS for [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Setting up Ubuntu 22 for log monitoring with Nagios Log Server (LS) is an important step in maintaining system health and security. Nagios Log Server offers a powerful, centralized solution for capturing and analyzing logs from multiple sources. This article outlines the necessary steps to prepare your Ubuntu 22 system and configure Nagios LS for effective log monitoring and storage. By the end, you’ll have a fully operational log monitoring setup.</p>



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



<p class="wp-block-paragraph">The only prerequisite for setting up is installing the <code>curl</code> command. <code>curl</code> is a versatile tool used in Linux systems to transfer data from or to a server, supporting a variety of protocols such as HTTP, HTTPS, FTP, and more. It’s commonly used to download files, make API requests, or test network connections. To install curl we will need <code>sudo </code>or root permissions and use the command:</p>



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



<p class="wp-block-paragraph">As long as you get some form of output you now have curl installed.</p>



<h2 class="wp-block-heading">Step 1: Run Commands Listed in Log Server</h2>



<p class="wp-block-paragraph">The exact commands we need to use in our instance of Ubuntu 22 are listed inside of Nagios LS, so we will be going there and looking at the commands needed. To do this we will want to add a log source, specifically a Linux source. We will want to click the circled area in the image below and select to add a Linux source.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720.png"><img loading="lazy" decoding="async" width="719" height="113" src="https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720.png" alt="add log source screenshot 720" class="wp-image-48092" title="How to Set Up Ubuntu 22 for Nagios Log Server 27" srcset="https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720.png 719w, https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720-300x47.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720-360x57.png 360w" sizes="(max-width: 719px) 100vw, 719px" /></a><figcaption>How to Set Up Ubuntu 22 for Nagios Log Server 30</figcaption></figure>



<p class="wp-block-paragraph">Now there are instructions here, we will be going over them as well as their intended output. The first command is:</p>



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



<p class="wp-block-paragraph">This command downloads the <code>setup-linux.sh</code> script from the Nagios Log Server URL and ensures it retains its original filename. Since the <code>-sS</code> flags suppress normal output, you won’t see anything unless there’s an error. If the download completes without issues, you can proceed to the next step by running the script with 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" data-code="sudo bash setup-linux.sh -s <Nagios LS IP Address&gt; -p 5544" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">sudo bash setup-linux.sh -s &lt;Nagios LS IP Address&gt; -p 5544</span></span></code></pre></div>



<p class="wp-block-paragraph">This should give us the following output: </p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154606.png"><img loading="lazy" decoding="async" width="933" height="178" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154606.png" alt="setup-linux.sh Output" class="wp-image-48139" title="How to Set Up Ubuntu 22 for Nagios Log Server 28" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154606.png 933w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154606-300x57.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154606-768x147.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154606-360x69.png 360w" sizes="(max-width: 933px) 100vw, 933px" /></a><figcaption class="wp-element-caption">setup-linux.sh Output</figcaption></figure>



<p class="wp-block-paragraph">With this it is all set up and should be sending Logs to Nagios Log Server.</p>



<h2 class="wp-block-heading">Step 2: Verify Logs</h2>



<p class="wp-block-paragraph">Next, we need to verify that the Log Server is successfully receiving logs, and this step is straightforward. All you need to do is enter the IP address of your Ubuntu 22 host where it prompts you to &#8216;Verify Incoming Logs.&#8217; This will confirm that the logs from your host are being properly sent to and received by the Log Server, ensuring everything is functioning as expected.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154647.png"><img loading="lazy" decoding="async" width="929" height="159" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154647.png" alt="Log Server Verification" class="wp-image-48155" title="How to Set Up Ubuntu 22 for Nagios Log Server 29" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154647.png 929w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154647-300x51.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154647-768x131.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-154647-360x62.png 360w" sizes="(max-width: 929px) 100vw, 929px" /></a><figcaption class="wp-element-caption">Log Server Verification</figcaption></figure>



<p class="wp-block-paragraph">As you can see, the message confirms that logs are being received from our new host. This means that all the setup steps have been completed successfully, and Nagios Log Server is now properly receiving logs from the newly added host.</p>



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



<p class="wp-block-paragraph">By following these steps, you’ve successfully set up Nagios Log Server on your Ubuntu 22 system, allowing you to capture and analyze logs efficiently. The process of configuring your server, running the necessary commands, and verifying log reception ensures that Nagios LS is fully operational, giving you the tools to monitor and manage your system’s health and security.</p>



<p class="wp-block-paragraph">Now that your log monitoring is set up, you may want to explore additional monitoring methods for a more comprehensive approach. For system performance and resource monitoring, consider setting up <strong><a href="https://library.nagios.com/training/ubuntu-22-install-ncpa/" target="_blank" data-type="link" data-id="https://library.nagios.com/training/ubuntu-22-install-ncpa/" rel="noreferrer noopener">NCPA on Ubuntu 22</a></strong>, a flexible agent that integrates seamlessly with Nagios XI. Alternatively, you can also use <strong><a href="https://library.nagios.com/training/how-to-monitor-ubuntu-22-using-snmp/" target="_blank" data-type="link" data-id="https://library.nagios.com/training/how-to-monitor-ubuntu-22-using-snmp/" rel="noreferrer noopener">SNMP on Ubuntu 22</a></strong> for monitoring with Nagios XI.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Set Up Debian for Nagios Log Server</title>
		<link>https://library.nagios.com/training/set-up-debian-10-log-server/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Wed, 19 Feb 2025 15:47:19 +0000</pubDate>
				<category><![CDATA[Training]]></category>
		<category><![CDATA[Debian 10]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=48175</guid>

					<description><![CDATA[Setting up Debian 10 for log monitoring with Nagios Log Server (LS) is an important step in maintaining system health and security. Nagios Log Server offers a powerful, centralized solution for capturing and analyzing logs from multiple sources. This article outlines the necessary steps to prepare your Debian 10 system and configure Nagios LS for [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Setting up Debian 10 for log monitoring with Nagios Log Server (LS) is an important step in maintaining system health and security. Nagios Log Server offers a powerful, centralized solution for capturing and analyzing logs from multiple sources. This article outlines the necessary steps to prepare your Debian 10 system and configure Nagios LS for effective log monitoring and storage. By the end, you’ll have a fully operational log monitoring setup.</p>



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



<p class="wp-block-paragraph">The only prerequisite for setting up is installing the <code>curl</code> command. <code>curl</code> is a versatile tool used in Linux systems to transfer data from or to a server, supporting a variety of protocols such as HTTP, HTTPS, FTP, and more. It’s commonly used to download files, make API requests, or test network connections. To install curl we will need <code>sudo </code>or root permissions and use the command:</p>



<pre class="wp-block-code"><code>sudo apt install curl</code></pre>



<p class="wp-block-paragraph">As long as you get some form of output you now have curl installed.</p>



<h2 class="wp-block-heading">Step 1: Run Commands listed in Log Server</h2>



<p class="wp-block-paragraph">The exact commands we need to use in our instance of Debian 10 are listed inside of Nagios LS, so we will be going there and looking at the commands needed. To do this we will want to add a log source, specifically a Linux source. We will want to click the circled area in the image below and select to add a Linux source.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720.png"><img loading="lazy" decoding="async" width="719" height="113" src="https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720.png" alt="add log source screenshot 720" class="wp-image-48092" title="How to Set Up Debian for Nagios Log Server 31" srcset="https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720.png 719w, https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720-300x47.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/add_log_source_screenshot_720-360x57.png 360w" sizes="(max-width: 719px) 100vw, 719px" /></a><figcaption>How to Set Up Debian for Nagios Log Server 34</figcaption></figure>



<p class="wp-block-paragraph">Now there are instructions here, we will be going over them as well as their intended output. The first command is:</p>



<pre class="wp-block-code"><code>curl -sS -O http://&lt;Nagios LS IP address&gt;/nagioslogserver/scripts/setup-linux.sh</code></pre>



<p class="wp-block-paragraph">This command downloads the <code>setup-linux.sh</code> script from the Nagios Log Server URL and ensures it retains its original filename. Since the <code>-sS</code> flags suppress normal output, you won’t see anything unless there’s an error. If the download completes without issues, you can proceed to the next step by running the script with the following command:</p>



<pre class="wp-block-code"><code>sudo bash setup-linux.sh -s &lt;Nagios LS IP Address&gt; -p 5544</code></pre>



<p class="wp-block-paragraph">This should give us the following output: </p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-144809.png"><img loading="lazy" decoding="async" width="788" height="175" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-144809.png" alt="Screenshot 2025 02 18 144809" class="wp-image-48179" title="How to Set Up Debian for Nagios Log Server 32" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-144809.png 788w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-144809-300x67.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-144809-768x171.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-144809-360x80.png 360w" sizes="(max-width: 788px) 100vw, 788px" /></a><figcaption class="wp-element-caption">setup-linux.sh Output</figcaption></figure>



<p class="wp-block-paragraph">With this it is all set up and should be sending Logs to Nagios Log Server.</p>



<h2 class="wp-block-heading">Step 2: Verify Logs</h2>



<p class="wp-block-paragraph">Next, we need to verify that the Log Server is successfully receiving logs, and this step is straightforward. All you need to do is enter the IP address of your Debian 10 host where it prompts you to &#8216;Verify Incoming Logs.&#8217; This will confirm that the logs from your host are being properly sent to and received by the Log Server, ensuring everything is functioning as expected.</p>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-145016.png"><img loading="lazy" decoding="async" width="913" height="166" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-145016.png" alt="Screenshot 2025 02 18 145016" class="wp-image-48178" title="How to Set Up Debian for Nagios Log Server 33" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-145016.png 913w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-145016-300x55.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-145016-768x140.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-18-145016-360x65.png 360w" sizes="(max-width: 913px) 100vw, 913px" /></a><figcaption class="wp-element-caption">Log Server Verification</figcaption></figure>



<p class="wp-block-paragraph">As you can see, the message confirms that logs are being received from our new host. This means that all the setup steps have been completed successfully, and Nagios Log Server is now properly receiving logs from the newly added host.</p>



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



<p class="wp-block-paragraph">By following these steps, you’ve successfully set up Nagios Log Server on your Debian 10 system, allowing you to capture and analyze logs efficiently. The process of configuring your server, running the necessary commands, and verifying log reception ensures that Nagios LS is fully operational, giving you the tools to monitor and manage your system’s health and security.</p>



<p class="wp-block-paragraph">Now that your log monitoring is set up, you may want to explore additional monitoring methods for a more comprehensive approach. For system performance and resource monitoring, consider setting up <strong><a href="https://library.nagios.com/training/how-to-monitor-an-debian-device-with-ncpa/" target="_blank" data-type="link" data-id="https://library.nagios.com/training/ubuntu-22-install-ncpa/" rel="noreferrer noopener">NCPA on Debian 10</a></strong>, a flexible agent that integrates seamlessly with Nagios XI. Alternatively, you can also use <strong><a href="https://library.nagios.com/training/debian-10-snmp/" target="_blank" data-type="link" data-id="https://library.nagios.com/training/how-to-monitor-ubuntu-22-using-snmp/" rel="noreferrer noopener">SNMP on Debian 10</a></strong> for monitoring with Nagios XI.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Monitor a Debian Device with NCPA</title>
		<link>https://library.nagios.com/training/how-to-monitor-an-debian-device-with-ncpa/</link>
		
		<dc:creator><![CDATA[Louie Mattia]]></dc:creator>
		<pubDate>Fri, 14 Feb 2025 21:51:05 +0000</pubDate>
				<category><![CDATA[Training]]></category>
		<category><![CDATA[Debian 10]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NCPA]]></category>
		<category><![CDATA[Operating System Monitoring]]></category>
		<guid isPermaLink="false">https://library.nagios.com/?p=46846</guid>

					<description><![CDATA[This guide will show you two methods to install the Nagios Cross-Platform Agent (NCPA) on your Debian 10 system. It&#8217;s essential to have root privileges to execute the necessary commands, so I recommend using sudo -i to switch to the root user before proceeding. Method 1, Step 1: Installing via the Repository (Recommended) The preferred [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This guide will show you two methods to install the Nagios Cross-Platform Agent (NCPA) on your Debian 10 system. It&#8217;s essential to have root privileges to execute the necessary commands, so I recommend using <code>sudo -i</code> to switch to the root user before proceeding.</p>



<h2 class="wp-block-heading">Method 1, Step 1: Installing via the Repository (Recommended)</h2>



<p class="wp-block-paragraph">The preferred method for installing NCPA is through the repository. This approach involves a series of simple steps that can all be executed from the command line.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"><strong>Add the Nagios repository to your sources list:</strong> To do this, execute the following command:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2"><span role="button" data-code="echo &quot;deb https://repo.nagios.com/deb/$(lsb_release -cs) /&quot; &gt; /etc/apt/sources.list.d/nagios.list" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">echo &quot;deb https://repo.nagios.com/deb/$(lsb_release -cs) /&quot; &gt; /etc/apt/sources.list.d/nagios.list</span></span></code></pre></div>



<p class="wp-block-paragraph">This command will add the repository to your system, ensuring you have access to the NCPA package.</p>



<p class="wp-block-paragraph"><strong>Add the GPG key for the repository:</strong> The GPG key is required to verify the integrity of the packages you&#8217;ll download. You might encounter a warning saying that the command used is deprecated, but don&#8217;t worry—it will still function correctly. To add the GPG key, use:</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"><span role="button" data-code="wget -qO - https://repo.nagios.com/GPG-KEY-NAGIOS-V3 | apt-key add -" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">wget -qO - https://repo.nagios.com/GPG-KEY-NAGIOS-V3 | apt-key add -</span></span></code></pre></div>



<p class="wp-block-paragraph">If successful, you should see the message <code>OK</code>, confirming the key was added correctly.</p>



<p class="wp-block-paragraph"><strong>Update your package list:</strong> Now that the repository and key are set up, update your package lists:</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"><span role="button" data-code="apt-get update" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">apt-get update</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Install the NCPA package:</strong> With the update complete, you can now install NCPA using the following command:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2"><span role="button" data-code="apt-get install ncpa" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">apt-get install ncpa</span></span></code></pre></div>



<figure class="wp-block-image size-full"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142214.png"><img loading="lazy" decoding="async" width="661" height="337" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142214.png" alt="Screenshot 2025 02 14 142214" class="wp-image-46862" title="How to Monitor a Debian Device with NCPA 35" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142214.png 661w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142214-300x153.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142214-360x184.png 360w" sizes="(max-width: 661px) 100vw, 661px" /></a><figcaption class="wp-element-caption">Output of install NCPA</figcaption></figure>



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



<p class="wp-block-paragraph">After installing NCPA, the agent will work out of the box, but it&#8217;s highly recommended to configure the API token for added security. Without this step, the default token will be used, which might not be ideal for your environment. Enter the following into your command line:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2"><span role="button" data-code="sudo nano /usr/local/ncpa/etc/ncpa.cfg" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">sudo nano /usr/local/ncpa/etc/ncpa.cfg</span></span></code></pre></div>



<p class="wp-block-paragraph">In the configuration file, look for the line that reads: <em>community_string = mytoken</em>.</p>



<figure class="wp-block-image size-full is-resized"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142448.png"><img loading="lazy" decoding="async" width="780" height="131" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142448.png" alt="Screenshot 2025 02 14 142448" class="wp-image-46864" style="width:800px;height:auto" title="How to Monitor a Debian Device with NCPA 36" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142448.png 780w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142448-300x50.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142448-768x129.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-142448-360x60.png 360w" sizes="(max-width: 780px) 100vw, 780px" /></a><figcaption class="wp-element-caption">Community String in ncpa.cfg</figcaption></figure>



<p class="wp-block-paragraph">Replace <code>mytoken</code> with a secure token of your choice. After updating the token, press <code>CTRL + X</code>, then press <code>Y</code> to confirm the changes, and hit <code>Enter</code> to save the file. We want to use the token we made so there is one final step, which is to restart our NCPA. At the moment its API token that will be accepted is still the default token. We want it to use the newly created one. To do this we enter 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"><span role="button" data-code="systemctl restart ncpa" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">systemctl restart ncpa</span></span></code></pre></div>



<p class="wp-block-paragraph">This will restart the service, and NCPA will now use the newly configured token.</p>



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



<p class="wp-block-paragraph">If you&#8217;re running a firewall on your system, you&#8217;ll need to allow traffic on port 5693, which is used by NCPA. For Ubuntu systems with UFW (Uncomplicated Firewall) enabled, follow these steps to configure the firewall and allow NCPA traffic:</p>



<p class="wp-block-paragraph"><strong>Create the directory for UFW application profiles:</strong> First, create the necessary directory where UFW can store application profiles:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2"><span role="button" data-code="sudo mkdir -p /etc/ufw/applications.d" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">sudo mkdir -p /etc/ufw/applications.d</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Create a custom application profile for NCPA:</strong> Next, set up a custom profile for NCPA by running the following commands:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2"><span role="button" data-code="sudo sh -c &quot;echo '[NCPA]' &gt; /etc/ufw/applications.d/ncpa&quot;
sudo sh -c &quot;echo 'title=Nagios Cross Platform Agent' &gt;&gt; /etc/ufw/applications.d/ncpa&quot;
sudo sh -c &quot;echo 'description=Nagios Monitoring Agent' &gt;&gt; /etc/ufw/applications.d/ncpa&quot;
sudo sh -c &quot;echo 'ports=5693/tcp' &gt;&gt; /etc/ufw/applications.d/ncpa&quot;" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#039;[NCPA]&#039; &gt; /etc/ufw/applications.d/ncpa&quot;</span></span>
<span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#039;title=Nagios Cross Platform Agent&#039; &gt;&gt; /etc/ufw/applications.d/ncpa&quot;</span></span>
<span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#039;description=Nagios Monitoring Agent&#039; &gt;&gt; /etc/ufw/applications.d/ncpa&quot;</span></span>
<span class="line"><span style="color: #adbac7">sudo sh -c &quot;echo &#039;ports=5693/tcp&#039; &gt;&gt; /etc/ufw/applications.d/ncpa&quot;</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Allow NCPA traffic through the firewall:</strong> Once the profile is set up, allow NCPA through the firewall 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"><span role="button" data-code="sudo ufw allow NCPA" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">sudo ufw allow NCPA</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Reload the firewall to apply the changes:</strong> Finally, reload UFW to apply the changes:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-Geist-Mono" style="font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2"><span role="button" data-code="sudo ufw reload" style="color:#adbac7" aria-label="Copy" class="code-block-pro-copy-button"></span><pre class="shiki github-dark-dimmed" style="background-color: #22272e"><code><span class="line"><span style="color: #adbac7">sudo ufw reload</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 4 (Optional): Confirm NCPA installation</h2>



<p class="wp-block-paragraph">This step is straightforward. Simply open a web browser and navigate to <code>https://&lt;host-ip-address&gt;:5693</code>.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958.png"><img loading="lazy" decoding="async" width="1024" height="235" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958-1024x235.png" alt="Screenshot 2025 02 05 101958" class="wp-image-43946" title="How to Monitor a Debian Device with NCPA 37" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958-1024x235.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958-300x69.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958-768x176.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958-1536x353.png 1536w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-05-101958.png 1894w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">NCPA GUI</figcaption></figure>



<p class="wp-block-paragraph">This will bring you to the login page, where you can enter your token. The purpose of this step is to verify that the NCPA is up and running, that it is reading the token correctly, and that remote access is functional.</p>



<h2 class="wp-block-heading">Step 5: Configuring on Nagios XI</h2>



<p class="wp-block-paragraph">The final step involves configuring Nagios XI. To do this, navigate to the <em>Configuration Wizards</em> section in Nagios and select the <em>NCPA Wizard</em>.</p>



<ol class="wp-block-list">
<li>Navigate to the <em>Configuration Wizards</em> section in Nagios XI and select the <em>NCPA Wizard</em>.</li>



<li>Enter the necessary information, including the IP address, the token, and the system type (Ubuntu in this case).</li>



<li>During the setup, you will be prompted to choose a name for your host and select the services you want to monitor with NCPA.</li>
</ol>



<p class="wp-block-paragraph">Once the setup is complete, the new host will appear in your monitoring dashboard. You can navigate to the <em>Host Status</em> section to confirm that it is being monitored properly.</p>



<figure class="wp-block-image size-large"><a href="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707.png"><img loading="lazy" decoding="async" width="1024" height="482" src="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707-1024x482.png" alt="Screenshot 2025 02 14 153707" class="wp-image-46892" title="How to Monitor a Debian Device with NCPA 38" srcset="https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707-1024x482.png 1024w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707-300x141.png 300w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707-768x361.png 768w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707-360x169.png 360w, https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-14-153707.png 1403w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">New Host Status</figcaption></figure>



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



<p class="wp-block-paragraph">By following this guide, you have successfully installed and configured the Nagios Cross-Platform Agent (NCPA) on Debian 10. You are now able to monitor the system using Nagios XI. If any issues are encountered, we recommend using the <a href="https://support.nagios.com/forum/" data-type="link" data-id="https://support.nagios.com/forum/" target="_blank" rel="noopener">Nagios Support Forum</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
