The purpose of this article is to show how to automatically install the Nagios server and the NRPE clients using the prearranged python scripts.

First of all, you must activate root access on all hosts (server and clients).

The following are the list and scheme of Nagios server and clients machines:

nagios-logo-720345

Server:

  1. Ubuntu 14.04

Clients:

  1. Ubuntu 14.04
  2. FreeBSD 10.3
  3. Centos 6.7
  4. CentOS7

fan

Now  we  start   Full automated Nagios   installation

After you have activated the root access and performed the system update on all machines, you must perform one additional step on FreeBSD. Install bash and copy the shell executable from /usr/local/bin/bash to /bin/bash.

Now we can prepare a Linux desktop, install the git package on it and copy all necessary scripts from the repository.

# git clone https://github.com/jamalshahverdiev/full-automated-nagios.git

Execute the python-installer.sh to automatically install python2.7, python3.4, and all necessary libraries.

Automated scripts consist of the following parts:

clients.txt – List of IP addresses for all Nagios clients.
nagios-clients.py – Automatic installation of Nagios Server.
nagios-server.py – Automatic installation of Nagios Clients.
run.py – Installation lunch script with an interactive menu.

Please, execute the following  to start the installation ( Full automated Nagios installation ) :

Please choose the installation option: 3

Done
Your nagios Server + Clients are installed in one go .

Please test this wonderful  script and let us know your feed back about.

 

 

SHARE
Jamal Shahverdiyev, I was born in Azerbaijan. I have 10 years experience in IT especially in open source technologies. I have worked as a lead specialist in many important government projects. I am author of dozens of books about open source technologies in my native language and three of them have been published. I share my knowledge in universities regularly and teach Unix/Linux.

LEAVE A REPLY

Please enter your comment!
Please enter your name here