Actions items are marked with "ACTION:" inside the .conf files, you will need replace with correct values for your particular environment.
On the Icinga master node (icinga.brightpattern.com):
sudo vim /etc/icinga2/zones.d/<cluster>/hosts.conf
replace all hosts IP addresses
with <host_fqdn>-int.brightpattern.com
On the cluster *mon OL9 host:
git clone git@github.com:ServicePattern/monitoring.git
cd monitoring/OL9_icinga
- Chrony
sudo mv check_chrony.py /usr/lib64/nagios/plugins/check_chrony.py
- MongoDB
sudo mv check_mongodb.py /usr/lib64/nagios/plugins/check_mongodb.py
- MariaDB Slave
sudo pip install PyMySQL
sudo mv check_mysql_mariadb_slave.py /usr/lib64/nagios/plugins/sp/check_mysql_mariadb_slave.py
- SP service instances count
sudo mv icinga /etc/sudoers.d/icinga
sudo mv check_sp_service_instances_count.pl /usr/lib64/nagios/plugins/check_sp_service_instances_count.pl
cd ../OL9_archiving
- Logarchive
sudo mv logarchive.py /etc/archive/logarchive/logarchive.py
sudo mv coldstorage.py /etc/archive/logarchive/coldstorage.py
- Repo 1: Original article
sudo rpm --import https://packages.freedom-for-icinga.com/free-icinga.key
sudo curl https://packages.freedom-for-icinga.com/epel/FREE-ICINGA-release.repo -o /etc/yum.repos.d/FREE-ICINGA-release.repo
The packages depend on other packages which are distributed as part of the EPEL repository:
sudo dnf install epel-release
- or Repo 2: Original article
sudo dnf copr enable jered/icinga2
- or Repo 3: Original article
sudo dnf copr enable dnf copr enable relaix/utils
Install Icinga 2
sudo dnf install icinga2
systemctl enable icinga2
systemctl start icinga2
In order to build RPM packages for the latest version of Icinga, we need 2 files:
- Archive with Icinga source files: v2.14.2.tar.gz download from Icinga github
- icinga2.spec download from copr.fedorainfracloud.org
Build:
Install some required packages
sudo dnf -y install git-core mock
Add the current user to the mock group
sudo usermod -a -G mock $USER
Logout the system and log back in
Download the desired version release
curl -LO https://github.com/Icinga/icinga2/archive/refs/tags/v2.14.2.tar.gz
And the corresponding specification file (or locally in OL9_icinga/v2.14.2/)
curl -LO https://download.copr.fedorainfracloud.org/results/jered/icinga2/epel-9-x86_64/07227811-icinga2/icinga2.spec
Build the source rpm file
mv v2.14.2.tar.gz icinga2-2.14.2.tgz
mock --dnf --clean --spec icinga2.spec --sources=. --result=result --build
This should generate a source rpm file with the name based on the system, e.g. result/icinga2-2.14.2-2.el9.src.rpm Build the binary rpm package files based on the generated source rpm file
mock --dnf --clean --sources=. --result=result --rebuild result/icinga2-2.14.2-2.el9.src.rpm
This results in multiple rpm files within the "result" directory which can be published via a public repository and then installed on other systems