Enable Remote Logging in Rsyslog on Linux (Debian, Ubuntu, CentOS, Fedora)

Edit the rsyslog file

sudo vi /etc/rsyslog.conf

add the following. Change out the IP address for your remote syslog server IP address.

The syntax for this has changes. Newer recommended way is

*.*  action(type="omfwd" target="192.0.10.5" port="514" protocol="tcp"

Old Syntax

## rsyslog Server
*.*     @10.0.10.5:514

https://www.rsyslog.com/sending-messages-to-a-remote-syslog-server/

Restart the rsyslog service and check your remote log server.

systemctl restart rsyslog

If you are having issues viewing logs in LibreNMS, try adding the hostname in the /etc/rsyslog.conf file

$LocalHostName server.hostname.com

How to Install Nagios 4.0.6 on CentOS 6.3

Install the prerequisite packages

yum install gd gd-devel httpd php gcc glibc glibc-common make perl

Create the Nagios user.

useradd -m nagios
passwd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

Create a directory to download and build Nagios from

mkdir /root/nagios
cd /root/nagios

Download Nagios and the Nagios plugins

wget downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.6/nagios-4.0.6.tar.gz
wget nagios-plugins.org/download/nagios-plugins-2.0.2.tar.gz 

Extract the Nagios zip

 tar xvzf nagios-4.0.6.tar.gz
cd nagios-4.0.6

Compile and make it

./configure
make all
make install-init
make install-commandmode
make install-config
make install-webconf

Create a password so you can login to the web interface

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Enable Nagios on startup

 chkconfig nagios on

Start the service

service nagios start

Install the plugins.

cd ..
tar xvzf nagios-plugins-2.0.2.tar.gz
cd nagios-plugins-2.0.2
./configure
make
make install

Start apache and make sure it starts on boot.

service httpd start
chkconfig httpd on