How To Set Up Icinga 2 on Windows Server

Because Icinga 2 does not support Windows server, we need to install Virtual Box with Ubuntu (or any  Linux distributions)

Install Icinga 2 Server

On Ubuntu virtual machine, open terminal

sudo su
sudo apt-get update
sudo apt-get upgrade

1

Now add the Icinga repository:

sudo add-apt-repository ppa:formorer/icinga
sudo apt-get update

icinga2

sudo apt-get install icinga2

icinga3

Install Data Output Module

sudo apt-get update

sudo apt-get install mysql-server icinga2-ido-mysql

#Database configuration select Yes

sudo icinga2-enable-feature ido-mysql

sudo systemctl restart icinga2

icinga4

icinga5

icinga6

icinga7

Enable ido-mysq module and restart Icinga 2

icinga2 feature enable ido-mysql

icinga8

Install Icinga2 nagious plugin

Icinga2 will collect the service information based on the monitoring plugins. Here we’re installing nagios plugins for this function.

apt-get install nagios-plugins

icinga9

Install Icinga2 Web module

apt-get install icingaweb2

icinga10

Once this is installed, we can call this URL in browser to “http://localhost//icingaweb2/setup“.

Step 1 Create token

icinga11

The initial setup page come up with a message to authenticate our Icingaweb user and create a token to proceed with the configuration.

sudo addgroup --system icingaweb2;

usermod -a -G icingaweb2 www-data;

icingacli setup config directory --group icingaweb2;

icingacli setup token create;

icinga12

icinga13

icinga14

icinga15

Step 2: Select the Modules

After providing the token, it’ll move to the next section for selecting the modules. We can choose the preferred modules to proceed to the next step.

icinga16

Step 3 : Verifying the PHP settings

icinga17

open /etc/php/7.0/apache2.0/php.ini

set date.timezone = Europe/Zurich (for example)

restart apache2.0

sudo service apache2 restart

 

Step 5: Authenticating Methods

 

icnga18

icinga18

Step 7  Create Icinga Web administration users to manage the interface

icinga19

icinga20

icinga21

Step 6: Review all chosen settings

icinga34

Step 7: Configure Monitoring Module

icinga23

configure with  IDO module

icinga24

icinga25

icinga26

icinga27

Review Monitoring Configuration

icinga28

icinga31

icinga30

Icinga 2 configuration

icinga2 node wizard

#Please specify this is satellite set up (y/N): n

#Please specify the common name(CN): icinga2-master

systemctl restart icinga2

icinga29

Windows firewall, VirtualBox network mode and port forwarding settings

VirtualBox network settings

choose setting, in Network, choose NAT

icinga35

Configure Port forwarding

We forward  2 ports 5656 and 8000 from the host to virtual machine. Port 5656 is used for client, and port 8000 is used for web monitoring tools

icinga36

Configure Windows firewall

Open windows firewall, new inbound rule and choose type of rule is program

win1.jpg

Choose the program path

win2

choose allow theconnection

win3

win4

Give it a name

win5

Add a new Host

Create ticket for new host

create new ticket for business-icinga2-client (*)


icinga2 pki ticket --cn business-icinga2-client

client1

Install Client

Download icniga 2 client http://packages.icinga.org/windows/

client2

client3

client4

client5

client6.jpg

Configure Windows client

client instance name: business-icinga-client

ticket generated in (*)

server instance name: icinga2-master

host: ip server that host icinga 2

client7.jpg

client8.jpg

 

client9

restart icinga2 service


net start incinga2

Update Master configuration

Check business-icnga-client in the node list


icnga2 node list

master1


icnga2 node update-config

master2

verify configuration


icinga2 daemon -C

master3


systemctl reload icinga2

Open browser, http://82.195.230.21:8000/icingaweb2/,

master4

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s