Linux - PDF: Install Nagios Server

Download as pdf or txt
Download as pdf or txt
You are on page 1of 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy