Configuring Oracle Linux 9 to Forward Logs to Nagios Log Server 2024R2


Keeping track of system logs is crucial for maintaining security, troubleshooting issues, and ensuring optimal system performance. Nagios Log Server simplifies log collection and analysis, providing a centralized platform for managing logs across your IT infrastructure.
In this guide, you’ll learn how to configure Oracle Linux 9 to forward logs to Nagios Log Server 2024R2 using rsyslog. By setting up seamless log transmission, you’ll gain real-time visibility into system events, detect anomalies faster, and strengthen your overall monitoring strategy. Let’s dive in and get started!
Prerequisites
Before proceeding, ensure you have the following:
- Access to a Nagios Log Server instance (latest stable release recommended)
- A system running Oracle Linux 9
- Root or sudo privileges on your Oracle Linux machine
- Network connectivity between Oracle Linux and Nagios Log Server (ensure port 5544 is open)
Step 1: Add a New Log Source in Nagios Log Server
- Login to Nagios Log Server:
- Open your web browser and navigate to your Nagios Log Server instance.
- Log in using your administrator credentials.
- Navigate to Log Source Setup:
- On the Home page, locate and click the + Linux button in the upper right.

3. Alternatively, click + Add Log Source in the navigation bar and select Linux.

Step 2: Configuring the Linux Log Source
1. Download and Run the Setup Script
The Linux Source Setup page provides a code block with a pre-configured command.
If curl
is not installed, run:
sudo dnf install -y curl
Then, run the following command (replace <nagios-log-server-address>
with your actual server IP or hostname):
curl -sS -O http://<nagios-log-server-address>/nagioslogserver/scripts/setup-linux.sh
sudo bash setup-linux.sh -s <nagios-log-server-address> -p 5544
-s
specifies the Log Server address-p 5544
is the default port for syslog ingestion
2. Verify the Script Execution
You should see an output like:
Detected rsyslog 8.2102.0
Detected rsyslog work directory /var/lib/rsyslog
Destination Log Server: 192.168.0.31:5544
Creating /etc/rsyslog.d/99-nagioslogserver.conf...
SELinux is disabled.
rsyslog configuration check passed.
Restarting rsyslog service with 'service'...
rsyslog is running with the new configuration.
Check the Nagios Log Server dashboard to confirm that logs are being received.
Step 3: Confirming Log Reception
- Navigate to the Dashboards section in Nagios Log Server.
- In the Search panel, run a query for the new source IP:
host.ip:<Oracle Linux 9 IP>
- Send a test log entry from the Linux machine:
logger "This is a test log entry"
If successful, the test entry will appear in the results.

Step 4: Accessing the Setup Script on the Server
The script is stored on the Nagios Log Server here:
/var/www/html/nagioslogserver/www/scripts/setup-linux.sh
This script can be accessed directly via a browser or edited via SSH for custom changes.
Step 5: Manual Setup (Optional)
If you prefer to configure manually:
- Create a configuration file:
sudo nano /etc/rsyslog.conf
- Add the following lines at the begin forwarding rule section:
# ### begin forwarding rule ### NAGIOSLOGSERVER
$WorkDirectory /var/lib/rsyslog
$ActionQueueFileName fwdRule1
$ActionQueueMaxDiskSpace 1g
$ActionQueueSaveOnShutdown on
$ActionQueueType LinkedList
$ActionResumeRetryCount -1
*.* @@192.168.1.113:5544
# ### end of the forwarding rule ###
- Restart rsyslog:
sudo /etc/init.d/rsyslog restart
Step 6: Adding More Log Sources
Use the + Add Log Source button to configure additional sources such as:
- Windows Event Logs
- Application Logs
- Archived Log Files
Both scripted and manual setup options are available. Manual setup allows for deeper customization by editing config files directly.
Troubleshooting Tips
- Check rsyslog Status:
sudo systemctl status rsyslog
Start it if it’s not running:
sudo systemctl start rsyslog
- Check Connectivity: Ensure port 5544 is open and reachable.
- Check Firewall:
sudo firewall-cmd --zone=public --add-port=5544/tcp --permanent
sudo firewall-cmd --reload
- Review Logs:
cat /var/log/messages | grep rsyslog
On Nagios Log Server:
tail -f /var/log/logserver/nagios.log
Conclusion
You’ve successfully configured Oracle Linux 9 to forward logs to Nagios Log Server 2024R2. This setup gives you real-time visibility into system logs, performance events, and security data—essential for proactive system administration.
Explore additional sources and alerting options in Nagios Log Server for an even more powerful monitoring setup.
For additional resources:
Share:
On this page
Related Articles
- How to Install Nagios Cross-Platform Agent (NCPA) on macOS Monterey
- Monitoring Void Linux with NCPA in Nagios XI: A Step-by-Step Guide
- Sending Logs from RHEL 9 to Nagios Log Server R2
- Comprehensive Guide to Monitoring NixOS with NCPA in Nagios XI
- Efficient Server Monitoring with NCPA and Nagios XI on RHEL 9