INSTALL NAGIOS SERVER
- Clean CentOS minimal install
- Install as per: [Link]
[Link]
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 [Link]
- 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/[Link]
- 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
[Link]
[Link]
- Configure Configuration Wizard
- DONT USE AUTO-DICOVER FOR HOSTS it will bring down internet connection.
- Add host and services manually.
ZFS SNAPSHOTS
wget [Link]
unzip [Link]
cd zfs-auto-snapshot-master
make install
- set true/false on zpool and dataset with
zfs set [Link]:auto-snapshot=true/false zpool
- get current with
zfs get [Link]:auto-snapshot
- set frequent,daily,hourly,weekly or monthly
zfs set [Link]:auto-snapshot:frequent=true/false zpool
- get frequent,daily,hourly,weekly or monthly
zfs get [Link]: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/[Link]/zfs-auto-snapshot
- bolded are the parts to change