Install Nagios Core 4.1.1 in Debian Jessie Part 4

We already have Nagios working and our optionals clients. Now we have to configure our clients.

Installing Check_MK Agent

Preparing centralized repository

To get all the files together and make easily to deploy new host, I created a directory on my Nagios to put all the installers.

cd /usr/src
wget https://github.com/lplinux/scripts/raw/master/mk_agents.tar.gz
tar xvzf mk_agents.tar.gz  -C /var/www/
chown -R www-data:www-data /var/www/mk_agents/

Configuring Apache

To get access to the installer from any host in the network, we have to add this block to our Apache configuration:

vim /etc/apache2/sites-available/mk_agents.conf
Alias /mk_agents "/var/www/mk_agents"

<Directory "/var/www/mk_agents">
#       Require all granted
        AllowOverride None
        Order allow,deny
        Allow from all
        #
        # Use the same value as defined in nagios.conf
        #
        AuthName "MK Agent Download Center"
        AuthType Basic
        AuthUserFile /var/www/mk_agents/htpasswd.users
        Require valid-user
        <IfModule mod_rewrite.c>
                # Turn on URL rewriting
                RewriteEngine On
                Options FollowSymLinks
                # Installation directory
                RewriteBase /mk_agents
                # Protect application and system files from being viewed
                
Continue Reading

Install Nagios Core 4.1.1 in Debian Jessie Part 3

Now that we have our Nagios working, we might need some other clients to work with. We already have Check_MK for some checks,but in this guide we are going to install a couple more clients.

SNMP MIBs

In some cases, mostly with routers, we need to use SNMP for checks and the OID are differents than Linux or Windows OS.

Installing MIBs

For licensing reasons, net-snmp package installs only a small number of MIBs in /usr/share/mibs directory. A large number of standard MIBs can be installed using snmp-mibs-downloader package:

apt-get install snmp-mibs-downloader
download-mibs

To add another MIBs than default, for example cisco MIBs:

cp /usr/share/doc/snmp-mibs-downloader/examples/cisco* /etc/snmp-mibs-downloader/
cd /etc/snmp-mibs-downloader && sudo gzip -d ciscolist.gz

Change /etc/snmp-mibs-downloader/snmp-mibs-downloader.conf

Continue Reading

Install Nagios Core 4.1.1 in Debian Jessie Part 2

We already have a Nagios Core installed. Now we want to add some very nice add ons to the platform.

Download additional software

Go to Mathias Kettner web and download the last version of Check_MK.

wget -O /usr/src/check_mk-1.2.6p16.tar.gz http://mathias-kettner.com/download/check_mk-1.2.6p16.tar.gz

We also need Nagvis and PNP4Nagios

wget -O /usr/src/nagvis-1.8.5.tar.gz http://www.nagvis.org/share/nagvis-1.8.5.tar.gz 
wget -O /usr/src/pnp4nagios-0.6.25.tar.gz  http://downloads.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.25.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpnp4nagios%2Ffiles%2FPNP-0.6%2F&ts=1460394997&use_mirror=pilotfiber

PNP4Nagios

Prerequisites

Continue Reading

Install Nagios Core 4.1.1 in Debian Jessie Part 1

About Nagios

Nagios is an enterprise class, open source software that can be used for network and infrastructure monitoring. Using Nagios, we can monitor servers, switches, applications and services etc. It alerts the System Administrator when something goes wrong and also alerts back when the issues have been rectified.

Features

Using Nagios, you can:

  • Monitor your entire IT infrastructure.
  • Identify problems before they occur.
  • Know immediately when problems arise.
  • Share availability data with stakeholders.
  • Detect security breaches.
  • Plan and budget for IT upgrades.
  • Reduce downtime and business losses.

Prerequisites

Make sure your server have installed with fully working LAMP stack. If not, follow the below link to install LAMP server.

Then install the following prerequisites:

apt-get install build-essential libgd2-xpm-dev apache2-utils unzip curl
a2enmod rewrite
a2enmod cgi

Create Nagios User And Group

Create a new nagios user account:

useradd -m nagios
passwd nagios

Create a new

Continue Reading

Install LAMP on Debian Jessie

LAMP_Linux_Apache_MySQL_PHP

LAMP is a combination of operating system and open-source software stack. The acronym LAMP came from the first letters of Linux, Apache HTTP Server, MySQL or MariaDB database, and PHP/Perl/Python. This tutorial describes how to install it on a Debian Jessie distribution, but it should work on previous version of Debian and derivatives.

1. Install Apache

Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains.

To install Apache, enter:

apt-get install apache2

Test Apache:
Open your web browser and navigate to http://localhost/ or http://server-ip-address/.

Apache2-Ubuntu-Default-Page

2. Install MariaDB

 

Under Debian systems, it’s highly recommended to install ‘python-software-properties‘ package, before heading up for the MariaDB installation from official repositories.

apt-get install python-software-properties

Next, import and regtister the GPG key, which enables apt to verify the integrity

Continue Reading

Create an LXC Container on Proxmox 4.1

With our server installed we are going to  create our first VM using LXC.

Imagen10

We have to select the node where we want to create the VM (if we have a cluster we could pick any node), the VMID, the hostname (FQDN or not) and the root password:

Imagen11

Next step is select the storage that contains the templates and pick one for the new machine (you can download from here or have your own).

Imagen12

Go next and put the disk and the storage that should contain the VM (be careful with this value, since you won’t be able to change it easily).

Imagen13

Next we have to set the CPU Limit and CPU Units for the machine.

Imagen14

We also have to set the memory assigned to the machine…

Imagen15

… and the network parameters.

Imagen16

We could set a different DNS Server or just leave the same of the host.

Imagen17

As final step

Continue Reading

Install Proxmox 4.1

First thing to do is download and burn the ISO file of Proxmox VE Server 4.1:

http://www.proxmox.com/en/downloads/item/proxmox-ve-4-1-iso-installer

Boot and pick the installation process.

Imagen01

Agree with the EULA.

Imagen02

Select the Hard drive to install the OS.

Imagen03

 

Set up the TimeZone and the Location.

Imagen04

Set the root password and an email.

Imagen05

Specify the hostname (FQDN) and network parameters.

Imagen06

Wait until the installation process is finished.

Imagen08

 

Reboot the system and ready to start managing it through th GUI https://192.168.1.133:8006/

Imagen09

Continue Reading