0% found this document useful (0 votes)
105 views2 pages

Linux - PDF: Install Nagios Server

This document provides instructions for installing and configuring Nagios XI for server monitoring. It includes steps to install the Nagios server, set up NRPE clients, configure custom scripts and notifications, add hosts and services, and enable automated ZFS snapshots.

Uploaded by

Dneto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views2 pages

Linux - PDF: Install Nagios Server

This document provides instructions for installing and configuring Nagios XI for server monitoring. It includes steps to install the Nagios server, set up NRPE clients, configure custom scripts and notifications, add hosts and services, and enable automated ZFS snapshots.

Uploaded by

Dneto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

INSTALL NAGIOS SERVER

- Clean CentOS minimal install


- Install as per: https://assets.nagios.com/downloads/nagiosxi/docs/Installing-Nagios-XI-Manually-on-
Linux.pdf

INSTALL NRPE ON CLIENTS


set up nrpe on each client.
- download nagios-plugins
- untar, make and install
./configure
make
make install
- yum install xinetd
- download nrpe source
- untar config with args, make and install
./configure –enable-command-args
make all
make install-groups-users
make install
make install-config
make install-init
- echo “nrpe 5666/tcp” >> /etc/services
- open port 5666/tcp in firewall

- edit the file in /etc/xinetd.d/nrpe


change disable to “no”
and comment out the “only_from” option

- VERY IMPORTANT making changes to the /etc/xinetd.d/nrpe


need to “systemctl reload xinetd” then restart the services

- test with on the node /usr/local/nagios/libexec/check_nrpe -H localhost


- test from the nagios server with /usr/local/nagios/libexec/check_nrpe -H IP.OF.NODE.YUP

- if it reports back the version of NRPE running it worked.


-if not use tail -f /var/log/messages and fix the errors that come up. (check firewalls

SETUP CUSTOM SCRIPTS


ZFS
- copy plugin scripts to “/usr/local/nagios/libexec/” from
- chmod +x
- add entry into /usr/local/nagios/etc/nrpe.cfg
- be sure to add sudo if root privliges for nagios user
- add to group wheel and comment the wheel no passwd entry
Email/ Notification Setup

go to user profile.
- Notification Prefs – check enable and set desired settings
- Notification Methods – check enable for desired methods
- Notification Messages
https://assets.nagios.com/downloads/nagiosxi/docs/Configuring-Email-And-Text-Notifications-in-
Nagios-XI.pdf

- Configure Configuration Wizard


- DONT USE AUTO-DICOVER FOR HOSTS it will bring down internet connection.
- Add host and services manually.

ZFS SNAPSHOTS

wget https://github.com/zfsonlinux/zfs-auto-snapshot/archive/master.zip
unzip master.zip
cd zfs-auto-snapshot-master
make install

- set true/false on zpool and dataset with


zfs set com.sun:auto-snapshot=true/false zpool

- get current with


zfs get com.sun:auto-snapshot

- set frequent,daily,hourly,weekly or monthly


zfs set com.sun:auto-snapshot:frequent=true/false zpool

- get frequent,daily,hourly,weekly or monthly


zfs get com.sun:auto-snapshot:frequent

- change max number of snaps to keep in the zfs-auto-snapshot file in each respective cron directory
- run this command to edit number of snaps to keep:
sed -i 's/\(--keep=\)\(.*\)/\17 \/\//' /etc/cron.hourly/zfs-auto-snapshot
- bolded are the parts to change

You might also like