icinga complete reference May 2024

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Day 1

OS - Ubuntu 20.X

	icinga core
	icinga web
			PHP - Version??  - PHP version ≥ 7.2
	Database - MariaDB - Version??
	Web Server - Apache - Version??
	===============================
	Method - 1 - Install everything individually
	Method - 2 - Xampp | Lampp | Wamp

Step 1 - Setup XAMPP

$ apt-get update
$ wget https://liquidtelecom.dl.sourceforge.net/project/xampp/XAMPP%20Linux/7.4.27/xampp-linux-x64-7.4.27-2-installer.run?viasf=1
$ mv xampp-linux-x64-7.4.27-2-installer.run\?viasf\=1 xampp-linux-x64-7.4.27-2-installer.run
$ chmod 755 xampp-linux-x64-7.4.27-2-installer.run
$ ./xampp-linux-x64-7.4.27-2-installer.run

root@ip-172-31-12-175:/opt# ./xampp-linux-x64-7.4.27-2-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.

XAMPP Core Files : Y (Cannot be edited)

XAMPP Developer Files [Y/n] :n

Is the selection above correct? [Y/n]: Y

----------------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp
Press [Enter] to continue:Y

----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

Do you want to continue? [Y/n]: Y

----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.

 Installing
 0% ______________ 50% ______________ 100%


Step 2 - Install icinga core
Step 3 - Install icinga web
Step 4 - Configure and Access

Day 1 – Lab

  • Spend 15 mins – https://icinga.com/
  • Login to Lab server and Insall XAMPP (https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.4.27/)

Error

root@ip-172-31-12-175:/opt# /opt/lampp/lampp start
Starting XAMPP for Linux 7.4.27-2...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
ok.
XAMPP: Starting ProFTPD.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
ok.
root@ip-172-31-12-175:/opt#

FIX

$ apt-get update
$ apt-get install net-tools
$ /opt/lampp/lampp stop
$ /opt/lampp/lampp start
$ apt update
$ apt -y install apt-transport-https wget gnupg
$ wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg
$ . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;  echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >  /etc/apt/sources.list.d/${DIST}-icinga.list
$ echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >>  /etc/apt/sources.list.d/${DIST}-icinga.list
$ apt update
$ apt install icinga2
$ systemctl status icinga2
$ systemctl stop icinga2
$ systemctl start icinga2
$ systemctl status icinga2
$ cd /etc/icinga2/
$ more icinga2.conf
$ ls conf.d/
$ more conf.d/hosts.conf
$ more conf.d/services.conf


root@ip-172-31-12-175:/etc/icinga2# icinga2 daemon -C
[2024-05-06 07:07:32 +0000] information/cli: Icinga application loader (version: r2.14.2-1)
[2024-05-06 07:07:32 +0000] information/cli: Loading configuration file(s).
[2024-05-06 07:07:32 +0000] information/ConfigItem: Committing config item(s).
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 13 Notifications.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 2 HostGroups.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 Host.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 Downtime.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 FileLogger.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 3 Zones.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 User.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 Endpoint.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 246 CheckCommands.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 UserGroup.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 3 ServiceGroups.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 3 TimePeriods.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 1 ScheduledDowntime.
[2024-05-06 07:07:32 +0000] information/ConfigItem: Instantiated 12 Services.
[2024-05-06 07:07:32 +0000] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2024-05-06 07:07:32 +0000] information/cli: Finished validating the configuration file(s).


$ bapt install monitoring-plugins


Validate this must be up and runng

http://3.108.55.97/dashboard/


Day2

 167  /opt/lampp/lampp stop\
  168  /opt/lampp/lampp stop
  169  sudo apt-get update -y && sudo apt-get upgrade -y
  170  clear
  171  ls
  172  sudo apt install apache2 -y
  173  sudo systemctl enable apache2 && sudo systemctl start apache2
  174  sudo systemctl status apache2
  175  sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl libapache2-mod-php
  176  sudo apt install mariadb-server -y
  177  sudo systemctl start mariadb && sudo systemctl enable mariadb
  178  sudo systemctl status mariadb
  179  clear
  180  apt update
  181  apt -y install apt-transport-https wget gnupg
  182  get -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg
  183  wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg
  184  . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;  echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >  /etc/apt/sources.list.d/${DIST}-icinga.list
  185  clear
  186  wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg
  187  . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;  echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >  /etc/apt/sources.list.d/${DIST}-icinga.list
  188  wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg
  189  clear
  190  . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;  echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >  /etc/apt/sources.list.d/${DIST}-icinga.list
  191  echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >>  /etc/apt/sources.list.d/${DIST}-icinga.list
  192  apt update
  193  sudo apt install icinga2 -y
  194  sudo systemctl start icinga2 && sudo systemctl enable icinga2
  195  sudo systemctl status icinga2
  196  clear
  197  ls
  198  cd /etc/icinga2/
  199  ls
  200  ls features-available
  201  sudo apt install icinga2-ido-mysql -y
  202  mysql
  203  mysql -u root
  204  ps -eaf
  205  clear
  206  ps -eaf | grep mysqld
  207  ps -eaf | grep mar
  208  which mysql
  209  mysql -u root -p
  210  sudo mysql_secure_installation
  211  mysql -u root -p\
  212  mysql -u root -p
  213  clear
  214  sl
  215  mysql -u root -p
  216  show databases;
  217  mysql -u root -p
  218  clear
  219  ls
  220  ls /usr/share/icinga2-ido-mysql/schema/mysql.sql
  221  sudo mysql -u root -p icinga_ido_db < /usr/share/icinga2-ido-mysql/schema/mysql.sql
  222  vi /etc/icinga2/features-available/ido-mysql.conf
  223  sudo icinga2 feature enable ido-mysql
  224  systemctl restart icinga2
  225  systemctl status icinga2
  226  history
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x