Nagios 3 on Debian Wheezy or Ubuntu 14.x

After a quick dap with Observium, I’ve decided to go back to Nagios. Nagios3 is a full featured monitoring package for Linux hosts.
The article will describe how to install Nagios 3 on a Debian or Ubuntu host. For the people who never heard about Nagios, please take a look at http://www.nagios.org/projects/nagioscore . In this how-to we will use the opensource version, named Nagios Core.

To start with Nagios Core, you will need a fully functioning LAMP server. If you don’t have a LAMP enviroment run the following command:

The MySQL install will ask you for an administrative password who you will need to enter 2 times.

After the LAMP installation we can go further with the Nagios installation. Run the following command on your Nagios server:

I gave the password as per my choice, please give the values as per your server environment.

Next we need to configure the Nagios at Server, as follows:

Next change the values for check_external_commands to 1 to enable settings as follows:

Now we need to make the changes effective by restarting the Nagios service by using the command:

Accessing the web-interface at http://server1.example.com/nagios3 or http://IP/nagios3 as follows:

Username will be nagiosadmin and password as created above!

Next click on Host Groups:

It will show the present server as localhost. Just click over the localhost.

Now that the basic setup of the Nagios server is finished, we can add our first client / server to monitor.

A monitored client/server on Nagios is called a “host”. To add a host you will need to install the following package:

Further at  server2.example.com define the main Nagios monitoring server entries in Nagios configuration file as :

Where 192.168.0.100 is the main Nagios monitor server server1.example.com IP. Next start nrpe service as shown below

Similarly we can add more nodes to which we want monitoring.

We also need to define the Nagios client entries at server end. Create a file monitor1.cfg in directory /etc/nagios3/conf.d/ and define the values at server1.example.com. In the object configuration files, you can define hosts, host groups, contacts, contact groups, services, etc. You can split your object definitions across several config files if you wish, or keep them all in a single config file.

Default directory is /etc/nagios3/conf.d/ , you can use any name such as I used monitor1.cfg Entries must be like this:

In above file define host contains the information about the added client server2.example.com, next we can use Nagios to check different services. I used to check PING SSH and DISK services. For more details of services used in Nagios check directory /etc/nagios-plugins/config.

Next to make the changes effective restart the nagios3 service.

Now we can check the client details at the Nagios web-interface at Host Groups as follows:

Next on server2.example.com and check the values there.

 

That is it! Now you have a working Nagios server with 2 monitored hosts.

In following posts I will describe how you can implement monitoring alerts, have detailed graphs and much more. So stay tuned!

Acronis 11.5 Linux agent installation – Debian / Ubuntu

From my point of view is Acronis one of the best back-up tools on the market. They provide agent for different kind of OS’s, cloud storage support, central management and etc. Nevertheless installation of the Acronis 11.5 Linux agent has some dependencies that are not written out in the Acronis manual. Therefor I’m writing still how-to for the installation on Debian / Ubuntu.

This how-to is tested on Debian 6 & 7 and Ubuntu 12.04 (all i386), the installation of the Acronis Management server is not covered by this how-to. For detailed information on how to install and configure the Acronis Management server I need to redirect you to the Acronis 11.5 manual

First we need to download the up to date and correct Acronis 11.5 Linux agent, the best place for this is Acronis website @ www.acronis.eu/my

So head on over to your account, go to “My Product & Downloads”, choose your product and download the agent on the Linux component tab. Once you have downloaded the Agent you will have a file called “ABR11.5AL_en-EU.i686”, this file needs to be transferred to your Linux server. If you are looking for a secure way to transfer file on and off your Linux server please check out WinSCP.

Once the Acronis 11.5 Linux agent is transferred to a temporary folder like /tmp , you will need to execute the following commands as root (su or sudo)

Give the appropriate rights

Update, upgrade, download and install the dependencies

Once all the dependencies are installed you can start the agent by executing

The installation process of the Acronis 11.5 Linux agent will start, now just follow the wizard and fill out the license and management server and your Linux Acronis Agent is configured and installed.

Installation Zabbix agent on Debian 7 x64

I could not find a tutorial that showed how to install the precompiled Zabbix 2.0 agents on a 64 bit Debian box, so I’m making a how to for Zabbix agent on Debian 7 x64 . This tut also works on Debian 6 x64 or x86.

The latest downloads for precompiled agents and source code for building servers is here. http://www.zabbix.com/download.php , there is no Zabbix agent on Debian 7 x64 so you will need the source code.

On the Debian system that is getting the agent (remember this is for 64 bit version of Debian, go to the Zabbix download site for the link to the 32 bit agent if your system is 32 bit):

You should be logged in to a root sudo or su session for the following

Change “Server=127.0.0.1” option to the IP address of your Zabbix server, for example:

Exit and save the file

Change “LogFile=/tmp/zabbix_agentd.log” to:

Change “Server=127.0.0.1” option to the IP address of your Zabbix server, for example:

Change “ServerActive=127.0.0.1” option to the IP address of your Zabbix server, for example:

Change the hostname to the fqdn of the server or rem out the “Hostname=Zabbix server” line:

Exit and save the file

Exit and save the file

Now the Zabbix agent on Debian 7 x64 is installed. Go to your Zabbix server’s web interface and add the new system to hosts as you normally would and configure accordingly and you are done.

References:
http://www.zabbix.com/forum/showthread.php?p=103244#post103244