Sending Logs to Nagios Log Server R2 from CentOS 10

Picture of Tucker Falen
Tucker Falen
log

Nagios Log Server R2 introduces a revamped logging system, making it easier to centralize and analyze logs from various sources. This guide will walk you through setting up a CentOS 10 machine to send its logs to the Nagios Log Server R2 using both automatic and manual methods.

Getting Started

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

Automatic Setup Using a Script

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

Steps to Run the Script

Download the script from the Nagios Log Server R2:

curl -sS -O http://192.168.1.49/nagioslogserver/scripts/setup-linux.sh

Execute the script to configure rsyslog:

sudo bash setup-linux.sh -s 192.168.1.49 -p 5544

Replace 192.168.1.49 with your Nagios Log Server R2’s IP address.

The -p 5544 option specifies the port for log transmission.

Receiving Logs in Log Server

On your Log Servers GUI click Add Log Source.

Screenshot 2025 03 21 131259
Sending Logs to Nagios Log Server R2 from CentOS 10 4

Click Linux.

Screenshot 2025 03 21 131443
Sending Logs to Nagios Log Server R2 from CentOS 10 5
Screenshot 2025 03 21 132800
Sending Logs to Nagios Log Server R2 from CentOS 10 6

Now type in your machines IP address to see if you are receiving logs. If its working, it will confirm that logs are being received.

Conclusion

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

Share: