Quantcast
Channel: monitoring tools Archives | Unixmen
Viewing all 33 articles
Browse latest View live

Linux Server Monitoring with Bijk

$
0
0

Perex: How you can monitor your server and performs usage? With Bijk you get online 30 graphs about Load, CPU, memory, traffic, Apache, PostreSQL and others with Alerts. Bijk can be used on Debian, Ubuntu, CentOS, RedHat and with Cloud providers.

 The demands on Internet servers keep growing, with increasing numbers of visitors to sites, greater complexity of Internet traffic and projects that tend to run on ever-larger groups of servers. Development of a custom internal solution is a very costly and time-consuming process for any company.

 

Caption: Dasboard – list of servers in Bijk with graphs overview.

 But now there is a new tool that simplifies Linux administrators’ work, saves time and money and enables businesses to increase the overall speed and stability of their web servers.

 Bijk – born of a natural need for information

 SaaS application Bijk.com was introduced in summer 2010, with the sole purpose of providing Linux server administrators with user-friendly, comprehensible graphs.

Caption: Load graph – 24 hour detail – Bijk.com

 Bijk.com installation on Linux server is easy – it requires just four steps:

 1) Create a free account on Bijk.com

 2) Add a Linux repository or download source code

 3) Install the Bijk package

 4) Connect to a Bijk user account.

 Installation on three servers takes only five minutes.

 Server monitoring: Bijk.com offers a free and a commercial version, distinguished mainly by the number of servers that can be added in Bijk.

Caption: CPU usage graph – 24 hour detail – Bijk.com

 Where does Bijk save time?

 Bijk helps you to search for and prevent many causes of server downtime. You will be notified of changes in load, a full hard drive, increases in traffic and any strange server behaviour by Bijk.

 The CPU load chart indicates why the server may be slow. The chart showing the usage of the HDD can estimate the speed at which the drive will fill up and performs usage analysis, which helps to avoid overburdening of the HDD.

 The advanced Apache and MySQL charting can follow the structure of requirements including page-views, number of SELECT and UPDATE queries and even developments over time – for example, based on an aggregation of memory and disk writes.

 Operating a popular web project, server or database without using a server performance  monitoring tool is very risky.

 There are many smart, simple tools (top, htop, iostat, iptraf and many others), but none of them provide historical analysis of trends and changes that are important for future planning.

 Bijk Alerts – SMS & Email

 Every  (load, disk space, Apache stats) can be monitored by using a simple user interface, and if min/max limits are exceeded, Bijk will notify you by mobile phone or email alert.

 If the load on your servers rises rapidly, Bijk sends an SMS to a mobile phone with a direct link to a live graph that you can view direct from your mobile phone.

 Activity time

 Many Linux administrators work in companies for which the servers and IT environment are only an adjunct to the main business of the company.

 Linux administrators often find themselves in a situation in which the rest of the company does not understand how much time they need for their work; they cannot even estimate the time spent by admins on servers.

 In Bijk.com there is a simple function called “Activity time,” which measures the actual time used by Linux administrators on specified servers or groups of servers over any given time period.

Caption: Activity time – clean SSH work time on server – 4 hour work from 24 hour detail – Bijk.com

 Now you can easily confirm to your boss, your customer or anyone else how much time you really spent working on a server: the net time can be shown on a chart. (Bijk monitors the idle time value for each user.)

 For all users, the basic version of Bijk is completely free. Add your first server and start Bijking

Thanks for Zdenek for this post

--------------------------------------------------------------------- Linux Server Monitoring with Bijk


Install Pandora FMS monitoring in Fedora14 | Console, Server and Agent

$
0
0

Pandora FMS (for Pandora Flexible Monitoring System) is software solution for monitoring computer networks. Pandora FMS allows monitoring in a visual way the status and performance of several parameters from different operating systems, servers, applications and hardware systems such as firewalls, proxies, databases, web servers or routers.

Pandora FMS can be deployed in almost any operating system. It features remote monitoring (WMI, SNMP, TCP. UDP, ICMP, HTTP…) and it can also use agents. An agent is available for each platform. It can also monitor hardware systems with a TCP/IP stack, such as load balancers, routers, network switches, printers or firewalls.

Pandora FMS has several servers that process and get information from different sources, using WMI for gathering remote Windows information, a predictive server, a plug-in server which makes complex user-defined network tests, an advanced export server to replicate data between different sites of Pandora FMS, a network discovery server, and an SNMP Trap console.

Install the Consol

 

Before to start we need to  Install  LAMP  for  Fedora14  by following instructions in this post.

After LAMP is installed we can start installing the Consol

1-  Download  the  Pandora_console  tarbal, extract it  and  copy  it to /var/www/html/

[root@unixmen-Fedora14 html]# cp -r  /home/pirat9/Downloads/pandora_console/   .
[root@unixmen-Fedora14 html]# pwd
/var/www/html
[root@unixmen-Fedora14 html]# ls -ltr
total 8
drwxr-xr-x  12 root root 4096 Mar  2 13:57 pandora_console
[root@unixmen-Fedora14 html]#

You need to setup permissions to be able to write in ./include  and  ./attachment directory

Under  root :

chmod -R  777  include/  and chmod -R 777  attachment

Now open the browser http://ip/pandora_console

 

Click  next and  check  every  time  if  something gone  wrong

 

Check if all dependencies are installed in your system, if everything is  green (See screenshot bellow) then is ok, click next

FMS pandora

 

Insert  database  admin user and  password  and  the  database  that  you want to  create

 

 

 

New database  will be  created and a new  password  will be generated for a later use in  pandora server  configuration, write it down and continue

 

 

 

After  this  back to  your  shell , move of   remove install.php  file and  open http://ip/pandora_console    and  login with  user admin  and  password  pandora

Install the server


1-First :  install  dependencies


yum install perl-XML-SAX* perl-Tie* perl-XML-Simple* perl-IO-Socket* perl-Time-modules* perl-NetAddr-IP* perl-DateTime* perl-ExtUtils perl-DBI nmap

2-Configure pandora_server.conf

Add  password  and  database name generated from installation of Pandora_console to   /etc/pandora/pandora_server.conf

[root@unixmen-Fedora14 pandora_server]# ./pandora_server_installer   --install

Output

Installing binaries and libraries
cp lib/PandoraFMS/Traceroute/PurePerl.pm blib/lib/PandoraFMS/Traceroute/PurePerl.pm
cp lib/PandoraFMS/GIS.pm blib/lib/PandoraFMS/GIS.pm
cp lib/PandoraFMS/ReconServer.pm blib/lib/PandoraFMS/ReconServer.pm
cp lib/PandoraFMS/SNMPServer.pm blib/lib/PandoraFMS/SNMPServer.pm
cp lib/PandoraFMS/Traceroute.pm blib/lib/PandoraFMS/Traceroute.pm
cp lib/PandoraFMS/PredictionServer.pm blib/lib/PandoraFMS/PredictionServer.pm
cp lib/PandoraFMS/Tools.pm blib/lib/PandoraFMS/Tools.pm
cp lib/PandoraFMS/GeoIP.pm blib/lib/PandoraFMS/GeoIP.pm
cp lib/PandoraFMS/Server.pm blib/lib/PandoraFMS/Server.pm
cp lib/PandoraFMS/Sendmail.pm blib/lib/PandoraFMS/Sendmail.pm
cp lib/PandoraFMS/ProducerConsumerServer.pm blib/lib/PandoraFMS/ProducerConsumerServer.pm
cp lib/PandoraFMS/WMIServer.pm blib/lib/PandoraFMS/WMIServer.pm
cp lib/PandoraFMS/DB.pm blib/lib/PandoraFMS/DB.pm
cp lib/PandoraFMS/Config.pm blib/lib/PandoraFMS/Config.pm
cp lib/PandoraFMS/Core.pm blib/lib/PandoraFMS/Core.pm
cp lib/PandoraFMS/PluginServer.pm blib/lib/PandoraFMS/PluginServer.pm
cp lib/PandoraFMS/NetworkServer.pm blib/lib/PandoraFMS/NetworkServer.pm
cp lib/PandoraFMS/DataServer.pm blib/lib/PandoraFMS/DataServer.pm
cp bin/pandora_exec blib/script/pandora_exec
/usr/bin/perl -MExtUtils::MY -e ‘MY->fixin(shift)’ — blib/script/pandora_exec
cp bin/pandora_server blib/script/pandora_server
/usr/bin/perl -MExtUtils::MY -e ‘MY->fixin(shift)’ — blib/script/pandora_server
Manifying blib/man3/PandoraFMS::Traceroute.3pm
Manifying blib/man3/PandoraFMS::Tools.3pm
Manifying blib/man3/PandoraFMS::GeoIP.3pm
Manifying blib/man3/PandoraFMS::Core.3pm
Manifying blib/man3/PandoraFMS::Traceroute::PurePerl.3pm
Manifying blib/man3/PandoraFMS::GIS.3pm
Manifying blib/man3/PandoraFMS::Sendmail.3pm
Installing /usr/lib/perl5/PandoraFMS/DataServer.pm
Installing /usr/lib/perl5/PandoraFMS/SNMPServer.pm
Installing /usr/lib/perl5/PandoraFMS/Server.pm
Installing /usr/lib/perl5/PandoraFMS/Traceroute.pm
Installing /usr/lib/perl5/PandoraFMS/Sendmail.pm
Installing /usr/lib/perl5/PandoraFMS/Tools.pm
Installing /usr/lib/perl5/PandoraFMS/WMIServer.pm
Installing /usr/lib/perl5/PandoraFMS/PluginServer.pm
Installing /usr/lib/perl5/PandoraFMS/DB.pm
Installing /usr/lib/perl5/PandoraFMS/ReconServer.pm
Installing /usr/lib/perl5/PandoraFMS/Config.pm
Installing /usr/lib/perl5/PandoraFMS/PredictionServer.pm
Installing /usr/lib/perl5/PandoraFMS/NetworkServer.pm
Installing /usr/lib/perl5/PandoraFMS/GIS.pm
Installing /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm
Installing /usr/lib/perl5/PandoraFMS/GeoIP.pm
Installing /usr/lib/perl5/PandoraFMS/Core.pm
Installing /usr/lib/perl5/PandoraFMS/Traceroute/PurePerl.pm
Installing /usr/local/share/man/man3/PandoraFMS::Traceroute.3pm
Installing /usr/local/share/man/man3/PandoraFMS::Traceroute::PurePerl.3pm
Installing /usr/local/share/man/man3/PandoraFMS::GeoIP.3pm
Installing /usr/local/share/man/man3/PandoraFMS::Tools.3pm
Installing /usr/local/share/man/man3/PandoraFMS::Sendmail.3pm
Installing /usr/local/share/man/man3/PandoraFMS::Core.3pm
Installing /usr/local/share/man/man3/PandoraFMS::GIS.3pm
Installing /usr/local/bin/pandora_exec
Installing /usr/local/bin/pandora_server
Appending installation info to /usr/lib/perl5/perllocal.pod
Checking binaries at /usr/local/bin -> /usr/bin
Creating common Pandora FMS directories
uid=502(pandora) gid=0(root) groups=0(root)

User pandora does exist, make sure the SSH directories are correct
Giving proper permission to /var/spool/pandora
48
Creating setup directory in /etc/pandora
cp conf/pandora_server.conf /etc/pandora
Installing Pandora Server manual
Copying the daemon script into /etc/init.d/pandora_server
Linking startup script to /etc/rc.d/rc5.d
Creating logrotate.d entry for Pandora FMS log management
Installing tentacle server in /etc/rc.d/rc5.d/S80tentacle_serverd
Installing Tentacle Server manual
Creating Pandora FMS distribution directory in /usr/share/pandora_server
Creating the Cron script to run daily Pandora DB tool

Now you have to edit your /etc/pandora/pandora_server.conf file to change the database password (default is pandora) with the one set in include/config.php of your Pandora FMS Console.
After setting password you can start your Pandora FMS Server!!
Managing Pandora FMS logs with logrotate (Distro independent)

4-Start The Server  from Init

As root type the following command:

 /etc/init.d/pandora_server start

Install the Agent

Download  The  pandora  agent from  the  website then  extract . and  run the  install as root using the following command

 ./pandora_agent_installer  --install

Add the agent to the server

Open the  shellbox  and  edit  /etc/pandora/pandora_agent.conf

In the  configuration file  add  the  ip  adress of the server  pandora  fms and restart

In The  Server  (Fedora14) :

/etc/init.d/tentacle_serverd  restart

In the  Client  (ubuntu 10.10)

/etc/init.d/pandora_agent_daemon start

Is done.

 

--------------------------------------------------------------------- Install Pandora FMS monitoring in Fedora14 | Console, Server and Agent

Install Nagios in 1 command on Ubuntu and Debian Squeez

$
0
0

Nagios ( is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong nagios_logoand again when they get better.

Nagios was originally designed to run under GNU/Linux, but also runs well on other Unix variants. It is free software, licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

In our previous posts, we did show you how to install Nagios from source in Ubuntu, today we wil see together  how to install Nagios in one command.

First  install  Step we will install  nagioa3  package using the command :

sudo apt-get   install  nagios3

Now  after  download is done.  insert  the  password  of  nagiosadmin user

After  the  installation  open thebrowser  http://localhost/nagios3  and insert  the  login admin and the password  inserted in the  step   before

 

Now  you  can check  your  monitored  services  and  you can  make more monitoring configuration for  your  Server

Enjoy

{module user9-footer}

--------------------------------------------------------------------- Install Nagios in 1 command on Ubuntu and Debian Squeez

Ho to install Pandorafms on RHEL,CentOS & Sientific Linux

$
0
0

Pandora FMS (for Pandora Flexible Monitoring System) is software solution for monitoring computer networks. Pandora FMS allows monitoring in a visual pandora-fmsway the status and performance of several parameters from different operating systems, servers, applications and hardware systems such as firewalls, proxies, databases, web servers or routers.

Pandora FMS can be deployed in almost any operating system. It features remote monitoring (WMI, SNMP, TCP. UDP, ICMP, HTTP…) and it can also use agents. An agent isavailable for each platform. It can also monitor hardware systems with a TCP/IP stack, such as load balancers, routers, network switches, printers or firewalls.

 

Pandora FMS has several servers that process and get information from different sources, using WMI for gathering remote Windows information, a predictive server, a plug-in server which makes complex user-defined network tests, an advanced export server to replicate data between different sites of Pandora FMS, a network discovery server, and an SNMP Trap console.

 

 

Before to begin  installing  PandoraFMS is required to install Lamp first.

To  Install  lamp follow the instructions in this  LINK

Now  lets start with Pandora  Console:

Download the  RPM  pages  from  the  Pandroafms.org  website

[pirat9@Scientific-Linux Downloads]$ ls  -altr  pandorafms_*
-rw-rw-r-- 1 pirat9 pirat9 7005911 May 23 21:36 pandorafms_console-3.2-1.noarch.rpm
-rw-rw-r-- 1 pirat9 pirat9  247712 May 23 21:36 pandorafms_server-3.2-2.noarch.rpm
[pirat9@Scientific-Linux Downloads]$

Now  before  to  install  pandora  Console  you  need to install some  extra  packages: php-snmp  php-pear php-ldap  php-pear-DB xorg-x11-fonts-75dpi  graphvi,  as root enter the following commad:

yum  install php-snmp  php-pear php-ldap  php-pear-DB xorg-x11-fonts-75dpi  graphvi

 

I-install  the  pandora  console

Now we will install the pandora console

[root@Scientific-Linux Downloads]# rpm -ivh   pandorafms_console-3.2-1.noarch.rpm 
Preparing...                ########################################### [100%]
 1:pandorafms_console     ########################################### [100%]
Please, now, point your browser to http://your_IP_address/pandora_console/install.php and follow all the steps described on it.
[root@Scientific-Linux Downloads]# 
 

Now before to  begin  the  Gui  install via  the  browser, we need to restart apache  to  activate   php_ldap   and  php_snmp

- Change the  ownership of incluse directory  to 777

chmod -R 777 include

- Service httpd  restart

- Now  lets  begin the  installation  via the    browser

Open your favorite  browser  and  point your it to http://your_IP_address/pandora_console/

- Click  Next  and  accept  the  licence  terms

- Check if  everything  is  green

- Enter the  root  password  of mysql admin

- The Server  will  create the  database  Pandora  with  generated  password  bellow,  this  password  you  need  it  to  star  the pandora  Server

next

Now  the  pandora_console is installed ,  move or  remove  install.php  and  open http://ip/pandora_console

then login with  admin:pandora

 

II- Install Pandora Server  RPM

Before  install  the  rpm  package  you  need  to install some  dependencies first:

yum  install  perl-XML-Simple perl-XML-SAX perl-NetAddr-IP nmap  wmic

if you  have  issue  with   wmic package  please  download   manually wmic-4.0.0SVN-2.1.el5.centos.noarch.rpm  and  install with rpm -ivh

install now  the  pandora  server  rpm package

# rpm -ivh pandorafms_server-3.2-2.noarch.rpm

 

Note : Don’t forget to start Tentacle Server daemon if you want to receive  data using tentacle

Before to  start  the pandora  Server .  add  the  generateed  password in the console  installation to /etc/pandora/pandora_server.conf

# dbpass: Database password

dbpass pandora

Change  pandora  with  your  generated  passowrd   (wdnywysi)

 

- Start the server

# /etc/init.d/pandora_server start

- Start tentacle server

# /etc/init.d/tentacle_serverd  start

 


III- Install Pandora_Agent

Pandora agent can be Worstation/laptop/Windows/Unix/Firewall /Android

 

Just install the agent and add it to config the Ip adress of pandora Server

 

 
# rpm -ivh pandorafms_agent_unix-3.2-1.noarch.rpm

 

 

Configure the agaent on the file /etc/pandora/pandora_agent.conf

and make the pandora Server ip

 

########################################
server_ip  192.168.1.131
server_path     /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log

###################################

Start The agent

 

[root@localhost Downloads]# /etc/init.d/pandora_agent_daemon  start
Pandora FMS Agent is now running with PID 3479
[root@localhost Downloads]#

Now back the Server restart the Daemon and check the consol, in My case Fedora 15 is the Agent Server is Scientific Linux 6

The Server Data

The Agent Data

If you have any question or remarks, please comment the current post or post your questions on the forum. Thanks

{module user9-footer}

--------------------------------------------------------------------- Ho to install Pandorafms on RHEL,CentOS & Sientific Linux

How to Install and configure Nagios in Archlinux

$
0
0

Nagios is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better.

Nagios was originally designed to run under Linux, but also runs well on other Unix variants. It is free software, licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

First thing  to do  is to  install Lamp on Arck to  activate apache  or php

Download  tarballs from AUR  ArchLinux  (Nagios and  Nagios-plugins)

Download  nagios  from : http://aur.archlinux.org/packages.php?ID=12306

Dwonload nagios-plugins : http://aur.archlinux.org/packages.php?ID=12307


Install developemnt packages

[root@localhost ~]# pacman -S base-devel
Output
:: There are 11 members in group base-devel:
:: Repository core
1) autoconf  2) automake  3) bison  4) fakeroot  5) flex  6) gcc  7) libtool
8) m4  9) make  10) patch  11) pkg-config

Enter a selection (default=all):

Extract nagios  and  nagios plugin   from AUR  and    install them

tar  -zxvf  nagios.tar.gz

Now cd Nagios directory

cd nagios

Install  and  download  nagios ,  download  and  install also  dependencies if  needed

[root@localhost nagios]# makepkg -s --asroot

Output

==> Making package: nagios 3.2.3-1 (Mon Jun 27 19:54:04 GMT 2011)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving Sources…
-> Downloading nagios-3.2.3.tar.gz…


After this  step, a new file  will be  generated  in the same  directory : nagios-3.2.3-1-i686.pkg.tar.xz

Install this file using the command:

pacman -U nagios-3.2.3-1-i686.pkg.tar.xz

Now  do  the  same  with  Nagios  plugin

Download , extract   and  install

tar -zxvf nagios-plugins.tar.gz; cd  nagios-plugin
makepkg -s --asroot
pacman -U nagios-plugins-1.4.15-1-i686.pkg.tar.xz

II Nagios Configuration


Copy the sample config files as root:

 cp /etc/nagios/cgi.cfg.sample /etc/nagios/cgi.cfg
 cp /etc/nagios/resource.cfg.sample /etc/nagios/resource.cfg
 cp /etc/nagios/nagios.cfg.sample /etc/nagios/nagios.cfg
 cp /etc/nagios/objects/commands.cfg.sample /etc/nagios/objects/commands.cfg
 cp /etc/nagios/objects/contacts.cfg.sample /etc/nagios/objects/contacts.cfg
 cp /etc/nagios/objects/localhost.cfg.sample /etc/nagios/objects/localhost.cfg
 cp /etc/nagios/objects/templates.cfg.sample /etc/nagios/objects/templates.cfg
 cp /etc/nagios/objects/timeperiods.cfg.sample /etc/nagios/objects/timeperiods.cfg

Make owner/group for all the files to nagios/nagios:

chown -R nagios:nagios /etc/nagios

Create htpasswd.users file with a username and password, eg. admin and  insert  you   chosen password

htpasswd -c /etc/nagios/htpasswd.users admin

change the  owner and group of  this  directorychown -R nagios:nagios /usr/share/nagios


Download SNMP
pacman -S net-snmp
Targets (1): net-snmp-5.6.1-1
Total Download Size:    2.08 MB
Total Installed Size:   13.09 MB
Proceed with installation? [Y/n] y


you can add snmpd to /etc/rc.conf to start with system next time under DAEMON=

Start Nagios


/etc/rc.d/nagios restart

You can add nagios to /etc/rc.conf to start with system next time unde DAEMON=

III Apache Configuration

Edit /etc/httpd/conf/httpd.conf, add the following

# nagios
Include /etc/httpd/conf/extra/nagios.conf 

Add the apache user http to the group nagios, otherwise you will get the following error when using nagios:

Could not open command file '/var/nagios/rw/nagios.cmd' for update!:  

Add user to apache using the command:

# usermod -G nagios -a http
 


 

VI PHP Configuration

Edit /etc/php/php.ini to include /usr/share/nagios in the open_basedir directive.

Example configuration:

open_basedir = /srv/http/:/usr/share/nagios

 

ARE YOU READY


restart apache and nagios
rc.d restart snmpd
rc.d sretart httpd
rc.d restart nagios

Start the browser http://ip/nagios or http://hostname/nagios

and login with your login and password


{module user9-footer}

--------------------------------------------------------------------- How to Install and configure Nagios in Archlinux

How to install Nagios from repo Fedora/Centos/SL

$
0
0

Nagios  is  one of  the most  powerful  open source  monitoring tool,  its  giving  the opportunity for monitoring  all OS and  devices ,   in our previous posts, we did show you how to install Nagios from source in Fedora and CentOS,  today we will see how to install  it directly  from yum in Fedora/Centos/SL(Scientific Linux) in easy steps.

Install Nagios

yum install nagios*
  • Now Start Nagios 
 /etc/init.d/nagios start  
  • Start nagios on boot

chkconfig nagios on Start httpd apache

/etc/init.d/httpd start 
Start apache on boot 
chkconfig httpd on
  • Make Nagios admin password  
htpasswd -c /etc/nagios/passwd nagiosadmin
  • check the nagios.conf  file  in the  apache conf.d directory
/etc/httpd/conf.d/nagios.conf
  • Disable SELinux:
# vim /etc/selinux/config 
SELINUX=disabled 
# reboot
  • Check   if  nagios  users and groups are added
# groupadd nagios 
# adduser nagios -g nagios 
# passwd nagios
# usermod -G nagios nagios 
# usermod -G apache,nagios apache
  • Check nagios  config  with
nagios -v /etc/nagios/nagios.cfg
Checking obsessive compulsive processor commands
... Checking misc settings... Total Warnings: 0 Total Errors:   0

 Now start nagios   and  report if worked for you.

http://ip/nagios  and login with  your  nagiosadmin user already created

--------------------------------------------------------------------- How to install Nagios from repo Fedora/Centos/SL

How to Monitor Realtime Network Traffic in Ubuntu / Debian /Mint

$
0
0

Question: How to Monitor Realtime Network Traffic in Ubuntu / Debian /Mint  ?

Answer:

What you need to do is to install ifstat tool,  from terminal run the following command

sudo apt-get install ifstat

Now  run ifstat

$ifstat
Output
eth0               wlan0               vmnet1              vmnet8
KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
1.29      1.74      0.00      0.00      0.00      0.00      0.00      0.00 29.08     28.83      0.00      0.00      0.00      0.00      0.00      0.00

 

--------------------------------------------------------------------- How to Monitor Realtime Network Traffic in Ubuntu / Debian /Mint

Install and Configure Monit on CentOS/RHEL/Ubuntu/Debian

$
0
0

Monit is a free open-source tool used to manage and monitor processes, programs, files, directories and filesystems on a local or remote LINUX/UNIX systems. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.

monit_banner

It starts a process automatically if it is stopped, restart a process if it doesn’t respond and stop the process it it consumes more resources. This is the main difference between Monit and other monitoring tools.

In this article, let us see how to install Monit on CentOS/RHEL/Scientific Linux/Ubuntu/Debian systems.

Install EPEL Repository

Monit is found in CentOS official repository. So we can install it from EPEL repository. To install EPEL repository, enter the following command:

[root@server ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Install Monit on CentOS/RHEL/Scientific Linux:

[root@server ~]# yum install monit -y

Install Monit on Ubuntu/Debian:

sk@sk:~$ sudo apt-get install monit

Configure Monit

The configuration file of monit on CentOS/RHEL is /etc/monit.conf  and on Ubuntu/Debian it is /etc/monit/monitrc. The default port of monit is 2812. You need to enable the port in the configuration file. You can access the monit web interface with URL http://localhost:2812.  The default username and password to access monit web interface are admin and monit. You can change username and password as your liking. The monit will monitor all services every two minutes that you defined in the configuration file.

Uncomment the following section in the configuration file:

In CentOS/RHEL systems:

[root@server ~]# vi /etc/monit.conf
 [...]
#Uncomment the following lines
set httpd port 2812 and
use address localhost  # only accept connection from localhost
allow localhost        # allow localhost to connect to the server and
allow admin:monit      # require user 'admin' with password 'monit'
allow @monit           # allow users of group 'monit' to connect (rw)
 allow @users readonly  # allow users of group 'users' to connect readonly
#
[...]

In Ubuntu/Debian systems:

sk@sk:~$ sudo vi /etc/monit/monitrc
[...]
#Uncomment the following lines
set httpd port 2812 and
use address localhost  # only accept connection from localhost
allow localhost        # allow localhost to connect to the server and
allow admin:monit      # require user 'admin' with password 'monit'
allow @monit           # allow users of group 'monit' to connect (rw)
allow @users readonly  # allow users of group 'users' to connect readonly
#
[...]

Once you done, start monit service and let it to start automatically on every reboot.

In CentOS/RHEL:

[root@server ~]# service monit start
 Starting monit: monit: generated unique Monit id 685652473acf3e05b92609d989df475d and stored to '/root/.monit.id'
 [  OK  ]
 [root@server ~]# chkconfig monit on

In Ubuntu/Debian:

sk@sk:~$ sudo /etc/init.d/monit start
 * Starting daemon monitor monit                                         [ OK ]

Access Monit web interface

In order to access monit web interface, Apache server should be installed and running.

Install httpd package to access the monit web console:

In CentOS/RHEL:

[root@server ~]# yum install httpd -y

Start httpd service:

[root@server ~]# service httpd start
[root@server ~]# chkconfig httpd on

In Ubuntu/Debian:

sk@sk:~$ sudo apt-get install apache2

Start httpd service:

sk@sk:~$ sudo /etc/init.d/apache2 start

Now navigate to http://localhost:2812/ from your browser. Enter the username as admin and password as monit.

Mozilla Firefox_001

Monit: sk - Mozilla Firefox_002

Add services to monit

Now add some services which you want to monitor in monit configuration file.

You can find some default entries for services in the monit configuration file under Services section. Just uncomment them to start monitor that service. Or add the required service entries at the bottom of the file.

For instance let us add apache service in Ubuntu/Debian systems. Open the file /etc/monit/monitrc and add the following lines at the bottom:

sk@sk:~$ sudo vi /etc/monit/monitrc
[...]
#Monitor Apache##
check process apache with pidfile /run/apache2.pid
start program = "/etc/init.d/apache2 start" with timeout 60 seconds
stop program  = "/etc/init.d/apache2 stop"

Once you added all the services, check the monit configuration file for any syntax error.

In CentOS/RHEL:

[root@server ~]# monit -t
Control file syntax OK

In Ubuntu/Debian:

sk@sk:~$ sudo monit -t

Now restart the monit service:

sk@sk:~$ sudo /etc/init.d/monit restart
 * Stopping daemon monitor monit                                         [ OK ] 
 * Starting daemon monitor monit                                         [ OK ]

Navigate to http://localhost:2812 from your browser and see the changes. The apache service entry will found there.

Monit: sk - Mozilla Firefox_003

Also Check log file to verify the services.

In CentOS/RHEL:

[root@server ~]# tail -f /var/log/monit 
[IST Jun  4 14:40:48] info     : monit HTTP server started
[IST Jun  4 14:40:48] info     : 'server.unixmen.com' Monit started
[IST Jun  4 14:41:00] error    : monit: Denied connection from non-authorized client [192.168.1.100]
[IST Jun  4 14:44:12] info     : Shutting down monit HTTP server
[IST Jun  4 14:44:12] info     : monit HTTP server stopped
[IST Jun  4 14:44:12] info     : monit daemon with pid [1091] killed
[IST Jun  4 14:44:12] info     : 'server.unixmen.com' Monit stopped
[IST Jun  4 14:44:13] info     : Starting monit HTTP server at [localhost:2812]
[IST Jun  4 14:44:13] info     : monit HTTP server started
[IST Jun  4 14:44:13] info     : 'server.unixmen.com' Monit started

In Ubuntu/Debian:

sk@sk:~$ sudo tail -f /var/log/monit.log 
[IST Jun  4 14:11:06] info     : monit HTTP server started
[IST Jun  4 14:11:06] info     : 'system_sk' Monit started
[IST Jun  4 15:04:56] info     : Shutting down monit HTTP server
[IST Jun  4 15:04:56] info     : monit HTTP server stopped
[IST Jun  4 15:04:56] info     : monit daemon with pid [1498] killed
[IST Jun  4 15:04:56] info     : 'system_sk' Monit stopped
[IST Jun  4 15:04:57] info     : Starting monit daemon with http interface at [localhost:2812]
[IST Jun  4 15:04:57] info     : Starting monit HTTP server at [localhost:2812]
[IST Jun  4 15:04:57] info     : monit HTTP server started
[IST Jun  4 15:04:57] info     : 'system_sk' Monit started

You can add more services such as ftp, ssh, nginx etc and monitor them periodically.

Refer the following monit official documentation page for details about adding services.

Testing Monit

Let us stop the apache service and see what will happen?

Stop the apache service using the following command:

sk@sk:~$ sudo /etc/init.d/apache2 stop
sk@sk:~$ sudo /etc/init.d/apache2 status
Apache2 is NOT running.

Open Monit web interface to see the changes.

Monit: sk - Mozilla Firefox_004

And refer the log file:

sk@sk:~$ sudo tail -f /var/log/monit.log 
[IST Jun  4 14:11:06] info     : monit HTTP server started
[IST Jun  4 14:11:06] info     : 'system_sk' Monit started
[IST Jun  4 15:04:56] info     : Shutting down monit HTTP server
[IST Jun  4 15:04:56] info     : monit HTTP server stopped
[IST Jun  4 15:04:56] info     : monit daemon with pid [1498] killed
[IST Jun  4 15:04:56] info     : 'system_sk' Monit stopped
[IST Jun  4 15:04:57] info     : Starting monit daemon with http interface at [localhost:2812]
[IST Jun  4 15:04:57] info     : Starting monit HTTP server at [localhost:2812]
[IST Jun  4 15:04:57] info     : monit HTTP server started
[IST Jun  4 15:04:57] info     : 'system_sk' Monit started
[IST Jun  4 15:16:57] error    : 'apache' process is not running

As you seen in the above result, the apache service is not running. Wait for two minutes and again refresh the monit web interface page. The Apache service will be automatically started after two minutes.

Monit: sk - Mozilla Firefox_005

See the log file:

sk@sk:~$ sudo tail -f /var/log/monit.log 
[IST Jun  4 15:04:56] info     : monit daemon with pid [1498] killed
[IST Jun  4 15:04:56] info     : 'system_sk' Monit stopped
[IST Jun  4 15:04:57] info     : Starting monit daemon with http interface at [localhost:2812]
[IST Jun  4 15:04:57] info     : Starting monit HTTP server at [localhost:2812]
[IST Jun  4 15:04:57] info     : monit HTTP server started
[IST Jun  4 15:04:57] info     : 'system_sk' Monit started
[IST Jun  4 15:16:57] error    : 'apache' process is not running
[IST Jun  4 15:16:57] info     : 'apache' trying to restart
[IST Jun  4 15:16:57] info     : 'apache' start: /etc/init.d/apache2
[IST Jun  4 15:18:57] info     : 'apache' process is running with pid 3602

That’s it.

--------------------------------------------------------------------- Install and Configure Monit on CentOS/RHEL/Ubuntu/Debian


Install Pandora FMS on Ubuntu 13.10

$
0
0

Pandora FMS is a performance & availability monitoring system, ready for big environments. It uses agents for local monitoring and can do several kinds of remote network monitoring (SNMP v3, TCP checks, remote WMI probes…) Agents works on Linux, Windows, AIX, HP-UX, Solaris and BSD systems.

In this tutorial i will describe how to install Pandora FMS on Ubuntu 13.10.

First switch to root user using command:

sudo su

Let us add Pandora FMS repository to Ubuntu sources list. To do so, Edit file /etc/apt/sources.list and add the following line:

deb http://www.artica.es/debian/squeeze /

Now update the sources list using command:

apt-get update

After updating the sources list, let us install it using command:

apt-get install pandorafms-console pandorafms-server pandorafms-agent-unix
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
 dbconfig-common fontconfig fontconfig-config fonts-dejavu-core fonts-liberation graphviz libauthen-sasl-perl libblas3 libcairo2
 libcdt4 libcgraph5 libcommon-sense-perl libdatrie1 libencode-locale-perl libfile-listing-perl libfont-afm-perl libfontconfig1
 libgd3 libgraph4 libgraphite2-3 libgvc5 libgvpr1 libharfbuzz0a libhtml-form-perl libhtml-format-perl libhtml-parser-perl
 libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
 libhttp-negotiate-perl libice6 libio-html-perl libio-socket-inet6-perl libio-socket-ssl-perl libjbig0 libjpeg-turbo8 libjpeg8
 libjson-perl libjson-xs-perl liblinear-tools liblinear1 libltdl7 liblua5.2-0 liblwp-mediatypes-perl liblwp-protocol-https-perl
 libmailtools-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libpango-1.0-0 libpangocairo-1.0-0
 libpangoft2-1.0-0 libpathplan4 libperl5.14 libpixman-1-0 libsensors4 libsm6 libsnmp-base libsnmp30 libsocket6-perl libthai-data
 libthai0 libtie-ixhash-perl libtiff5 libtime-format-perl liburi-perl libvpx1 libwww-perl libwww-robotrules-perl libxaw7
 libxcb-render0 libxcb-shm0 libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl
 libxml-sax-perl libxml-simple-perl libxml-twig-perl libxml-xpath-perl libxmu6 libxpm4 libxrender1 libxt6 nmap php-db php-gettext
 php-pear php5 php5-curl php5-gd php5-ldap php5-snmp php5-xmlrpc smistrip snmp snmp-mibs-downloader snmpd traceroute
 ttf-dejavu-core unzip x11-common xprobe
Suggested packages:
 gsfonts graphviz-doc libdigest-hmac-perl libgssapi-perl libgd-tools libdata-dump-perl libsvm-tools liblinear-dev
 libcrypt-ssleay-perl ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp lm-sensors
 libauthen-ntlm-perl libunicode-map8-perl libunicode-string-perl xml-twig-tools php5-dev zip
The following NEW packages will be installed:
 dbconfig-common fontconfig fontconfig-config fonts-dejavu-core fonts-liberation graphviz libauthen-sasl-perl libblas3 libcairo2
 libcdt4 libcgraph5 libcommon-sense-perl libdatrie1 libencode-locale-perl libfile-listing-perl libfont-afm-perl libfontconfig1
 libgd3 libgraph4 libgraphite2-3 libgvc5 libgvpr1 libharfbuzz0a libhtml-form-perl libhtml-format-perl libhtml-parser-perl
 libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
 libhttp-negotiate-perl libice6 libio-html-perl libio-socket-inet6-perl libio-socket-ssl-perl libjbig0 libjpeg-turbo8 libjpeg8
 libjson-perl libjson-xs-perl liblinear-tools liblinear1 libltdl7 liblua5.2-0 liblwp-mediatypes-perl liblwp-protocol-https-perl
 libmailtools-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libpango-1.0-0 libpangocairo-1.0-0
 libpangoft2-1.0-0 libpathplan4 libperl5.14 libpixman-1-0 libsensors4 libsm6 libsnmp-base libsnmp30 libsocket6-perl libthai-data
 libthai0 libtie-ixhash-perl libtiff5 libtime-format-perl liburi-perl libvpx1 libwww-perl libwww-robotrules-perl libxaw7
 libxcb-render0 libxcb-shm0 libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl
 libxml-sax-perl libxml-simple-perl libxml-twig-perl libxml-xpath-perl libxmu6 libxpm4 libxrender1 libxt6 nmap
 pandorafms-agent-unix pandorafms-console pandorafms-server php-db php-gettext php-pear php5 php5-curl php5-gd php5-ldap php5-snmp
 php5-xmlrpc smistrip snmp snmp-mibs-downloader snmpd traceroute ttf-dejavu-core unzip x11-common xprobe
0 upgraded, 110 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.5 MB of archives.
After this operation, 109 MB of additional disk space will be used.
Do you want to continue [Y/n]?

Pandora1 Pandora2 Pandora3 Pandora4 Pandora5 Pandora6 Pandora7 Pandora8After installing Pandora, remove or rename /var/www/pandora_console/install.php file.

Now login with http://IP/pandora_console with admin/pandora.

How  to  start  Pandora   Server?

/etc/init.d/pandora_server start
Pandora FMS Server 5.0 Build 131017 Copyright (c) 2004-2011 ArticaST
This program is OpenSource, licensed under the terms of GPL License version 2.
You can download latest versions and documentation at http://www.pandorafms.org
[*] Backgrounding Pandora FMS Server process.
Cannot start Pandora FMS Server. Aborted.
Check Pandora FMS log files at '/var/log/pandora/pandora_server.error & pandora_server.log'

Edit  /etc/pandora/pandora_server.conf file

by dbpass insert the password already generated in the install step 5

Restart  pandora  Server 

/etc/init.d/pandora_server start
Pandora FMS Server 5.0 Build 131017 Copyright (c) 2004-2011 ArticaST
This program is OpenSource, licensed under the terms of GPL License version 2.
You can download latest versions and documentation at http://www.pandorafms.org
[*] Backgrounding Pandora FMS Server process.
Pandora Server is now running with PID 15688
root@ubuntu-unixmen:/var/www/pandora_console#

--------------------------------------------------------------------- Install Pandora FMS on Ubuntu 13.10

Pandora FMS – An Universal Monitoring System For Your Organization

$
0
0

What is Pandora FMS?

Pandora FMS is an open source Flexible Monitoring System developed by Artica, a Spanish based company founded in 2005. The project is initially started by Sancho Lerena in 2003. Since then it has gradually evolved to become the resilient, innovative and flexible monitoring tool. Its main aim is to be flexible enough to manage and control, the complete infrastructure, without a further need to invest any more time or money in any other monitoring tools.

Pandora FMS is being actively used by thousands of companies around the world. Pandora FMS currently avails of agents for almost all operating system such as Windows NT4 to Windows 2008 and also for AIX, Solaris, HPUX, BSD, Linux etc. Pandora FMS can, of course, be used successfully not only as a systems monitoring tool, but with all sort of network devices.

What it Monitors actually?

It is designed to adapt to every roll and to every organization. It works almost on all Applications and operating systems, Network and communications, Business processes (BPM), User experience on WEB environments (browser automation), Electrical consumption, temperature monitoring, external sensors, etc.

Here is full list that Pandora FMS can monitor.

Operating Systems:

- Linux, Solaris, AIX, HP/UX, Windows, FreeBSD, OpenBSD, NetBSD, MacOS etc.

Virtualization:

- Vmware and XEN

Applications:

- SAP, Tomcat, Weblogic, IIS, JBoss, Exchange, WebSphere, Oracle, ERP.

Hardware Sensors:

- Temperature, humidity, flood, power, etc.

Networking:

- Any manufacturer: Cisco, Juniper, 3com, Teldat, Huawei, D-Link.

Databases:

- Oracle, DB2, SQL Server, Mysql.

Supported Protocols:

- SNMP, HTTP, LDAP, Ping, TCP, WMI, RADIUS, DNS, SQL queries.

Web User Experience:

- Latency, connection, login process, sessions, buying process, etc.

Why Should you use Pandora FMS?

Unlike other monitoring tools, it’s not designed for a singular type of environment. It is designed to adapt to every roll and to every organization. It can act as an Universal Monitoring Tool for your organization.

The main advantages of Pandora FMS are:

- Same tool for different environments and technologies.

- Extreme scalability.

- Capability to develop new features on demand.

- Faster time evaluation.

- Very low TCO (Total Cost of Owenership) compared to other similar solutions.

- A large number of features with the best cost-benefit ratio.

- Greater flexibility and integration.

- Faster start-up.

- More powerful cross platform agents.

- Bigger number of features.

- Extensive international support.

- Larger user community and yes, it is Open Source too.

Pandora FMS Versions

Pandora FMS is available as open source and enterprise editions.

Open Source:

You can use open source version for learning pandora FMS and personal use.

- Free.

- Unsupported, help from community.

- Reduced features option for large environments.

Enterprise:

If you want to setup Pandora FMS for your Organization, it is better to use Enterprise edition.

- Annual fee.

- License based on the number of monitored devices.

- Professional support, Enterprise features and certified updates.

To know more details about Licensing and Versions, please visit here.

Minimum Hardware Requirements

You will need at-least the following hardware requirements to setup Pandora FMS.

Up to 500 agents or 5.000 modules:

- 3GB of RAM.

- A single­core CPU at 2.5GHz clock.

- A fast hard disk, 7200rpm or equivalent. Minimum 15GB free space Hdd. Recommended size is 25GB.

Up to 2.000 agents or 10.000 modules:

- 6GB of RAM.

- A dual core CPU clock to 2.5GHz.

- Faster hard drive (10000 rpm or more). Minimum 15GB free space Hdd. Recommended size is 25GB.

- You need to tune up your MySQL very well.

For more than 4.000 agents:

- 12GB of RAM.

- A quad­core CPU to 3GHZ.

- Very fast hard drive   (15,000   rpm   or   more). Minimum 15GB free space Hdd. Recommended size is 25GB.

- It’s recommended to have MySQL in another server. You need to tune up your MySQL very well, and/or install Percona XtraDB.

Software Requirements

The official supported operating system for Pandora FMS is Linux. Although you can use other operating systems, but you won’t get any official support from Pandora FMS.

Supported Operating systems for Pandora FMS server:

- RHEL 6.x.
- CentOS 6.x.
- SLES 11 SP1 or higher.
- OpenSUSE 11.x or higher.
- Debian 5.x or higher.
- Ubuntu 11 or higher.
- FreeBSD 9.1.
- Solaris 10 / OpenSolaris.

Supported Databases:

- MySQL. Also you can use Oracle or PostgreSQL, but these are still experimental.

Supported Operating systems for Pandora FMS Agents:

- Linux (all distributions)
- HPUX 11.x or higher, with Perl 5.8.
- AIX 4.3.3 or higher, with Perl 5.8.
- BSD (NetBSD, OpenBSD, FreeBSD), with Perl 5.8.
- MacOSX.
- Solaris 8 or higher, with Perl 5.8.
- Windows NT4/XP/2000/2003/2008/7/8/2012.

Also you need to setup a working AMP server (Apache, MySQL and PHP) on Pandora FMS server itself or on a separate server.

Installation

I strongly suggest you to setup Pandora FMS on a dedicated system. Don’t use or install other servers such as DNS, DHCP, LDAP server etc., in the same system. Installation is not that difficult. Pandora FMS team has official repository to ease the installation. Just add the repository to your system and follow instructions found in the Installation section of official documentation page.

Also you can download the ready made ISO which is built upon CentOS 6 and preconfigured. All you need to do is just download the ISO, put it in a CD/DVD or USB drive, boot your system with the ISO and follow the simple onscreen instructions and you’re done.

You can get the Pandora FMS ISO here.

After installing the latest version, this is how my Pandora FMS looks.

Pandora 5 [Running] - Oracle VM VirtualBox_001Now it’s time to monitor your clients with Pandora FMS server.

In this short tutorial, we discussed what is Pandora FMS, What it does/monitors actually and its versions. Let us discuss more in detail about how to monitor clients, applications using Pandora FMS in our upcoming articles.

Source & Credits: Pandora FMS Website

--------------------------------------------------------------------- Pandora FMS – An Universal Monitoring System For Your Organization

Install Munin Monitoring Tool On CentOS, RHEL, Scientific Linux 6.5/6.4/6.3

$
0
0

Munin is a networked resource monitoring tool that can be used to monitor all computers on your network. It displays the gathered information from your system as graphs through a web based interface. With the help of Munin, you can monitor the performance of your computers, services, networks, SANs, applications, weather measurements etc.

How it works?

Munin uses RRDTool and a frame work written in perl. Munin has a master-node architecture in which the master connects to all the nodes at regular intervals and asks them for data. It then stores the data in RRD files, and updates the graphs.

Install Munin On CentOS 6.5

While this tutorial is applicable for CentOS 6.5 32 bit Edition, it should serve you well on other RPM based distributions too.

Munin will not be found in base repositories, hence we add EPEL repository to install Munin. Refer the following link to Add EPEL Repository in your CentOS 6.x systems.

- Install EPEL Repository on RHEL/CentOS/Scientific Linux 6

Fedora users need not to install EPEL, Munin is found in the default repositories of Fedora.

Since Munin is a web based Monitoring tool, your CentOS server should have a working LAMP stack. To install LAMP server on CentOS 6.x, follow the below link.

- Install LAMP Server On RHEL/CentOS/Scientific Linux 6

Now let us install Munin with command:

# yum install munin munin-node -y

After installing munin, a folder named munin will be created automatically under your apache root document.

Configuration

Edit file /etc/httpd/conf.d/munin.conf,

# vi /etc/munin/munin.conf

Add/Edit as shown below.

[...]
#Uncomment the following lines
dbdir   /var/lib/munin
htmldir /var/www/html/munin
logdir /var/log/munin
rundir  /var/run/munin

[...]

# a simple host tree. Set your system name
[server.unixmen.local]
address 127.0.0.1
use_node_name yes

[...]

Save and close the file.

Set ownership to munin directory in the apache root document folder with following command.

# chown -R munin:munin /var/www/html/munin/

Edit file /etc/httpd/conf.d/munin.conf,

# vi /etc/httpd/conf.d/munin.conf

Add the following lines at the end.

<Directory /var/www/html/munin/>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
</Directory>

Here i allowed the clients who has IP address in 192.168.1.0/24 series to view the Munin graphs. If you want to allow all clients to access Munin graphs, change the line Allow from 127.0.0.1 192.168.1.0/24 to Allow from All.

Setup user to Munin

Now we have to setup the munin administrative account. Please note that munin administrative account name is “Munin”. It will be found in the /etc/httpd/conf.d/munin.conf file at the top.

[...]

AuthName "Munin"

[...]

You can change admin account name as per your liking. Now enter the following command to setup the password for the user “Munin”.

# htpasswd -c /etc/munin/munin-htpasswd Munin
New password:
Re-type new password:
Adding password for user Munin

You don’t have to use -c parameter if you want to add additional users.

Now start/restart apache and munin services with following commands.

# service httpd restart
# service munin-node start
# chkconfig munin-node on

Note: Wait for a couple of minutes or reboot your system to allow munin to create necessary files/folders automatically on your apache root folder.

Access Munin

Now you can access the munin web interface from your browser with URL http://domain-name/munin or http://ip-address/munin.

Enter the username and its password which we created earlier. In my case its Munin and centos.

New Tab - Mozilla Firefox_001This is how my Munin dashboard looks.

Mozilla Firefox_002Click on the hostname, you’ll see now the server status as graphs.

Munin :: unixmen.local :: server.unixmen.local - Mozilla Firefox_003By default, there are five categories(plugins) on the left to make easy to understand and monitor system status.

- Disk

- Network

- Postfix

- processes

- System

Disk Monitoring:

Munin - Mozilla Firefox_004Network:

Munin - Mozilla Firefox_005Postfix:

Munin - Mozilla Firefox_006Processes:

Munin - Mozilla Firefox_007System:

Munin - Mozilla Firefox_008Add Monitoring Client

We can monitor remote hosts too. Go to your client systems and install munin-node package.

# yum install munin-node -y

Configuration

Edit file /etc/munin/munin-node.conf,

# vi /etc/munin/munin-node.conf

Set client hostname and specify Munin server IP address.

[...]
host_name sk

[...]

allow ^192\.168\.1\.101$
allow ^::1$

[...]

Save and close file. Here sk is my client hostname. 192.168.1.101 is my Munin server IP address.

Start munin-node service on your client system.

# service munin-node start
# chkconfig munin-node on

Then go to your Munin server and add the client system host name and ip address in /etc/munin/munin.conf file at the end.

# vi /etc/munin/munin.conf

Add the following lines.

[sk]
address 192.168.1.100
use_node_name yes

Save and close. Restart the munin service. Wait for couple of minutes(approximately 5 minutes) or reboot the Munin server to allow munin to create necessary files/folders for your monitoring target.

Mozilla Firefox_009As you see in the above screen shot, My client desktop has been added to Munin server.

Enable more Munin plugins

By default, there are only few monitoring items(plugins) will be shown in Munin interface. But there are many and we can add them if we need. Those items will be found under the directory /usr/share/munin/plugins/.

For example, here we will add mysql plugins. To do that, create a sym link to the plugins as shown below.

# ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/

Restart munin-node service on your server.

# service munin-node restart

Wait for 5 minutes and you’ll see that the mysql items will be added as shown below.

Munin - Mozilla Firefox_010That’s it. We reached the end of this tutorial. Most of you will probably figure out how to install and configure Munin server/clients and also how to monitor the various services using Munin. But while it’s fairly simple, it’s not trivial. Any how If you need additional details, refer the link given below.

Reference Links:

Munin Documentation page

--------------------------------------------------------------------- Install Munin Monitoring Tool On CentOS, RHEL, Scientific Linux 6.5/6.4/6.3

Install Zabbix Monitoring Tool On Debian 7 / Ubuntu 13.10

$
0
0

Zabbix is an enterprise-class open source distributed monitoring solution that can be used to monitor and track performance and availability of network servers, devices and other IT resources. It supports distributed and WEB monitoring, auto-discovery, and more.

I tested this how-to On Debian 7, although it should work on other Debian/Ubuntu derivatives. For the testing purpose, I will use two machines.

Zabbix Server System:

Operating system: Debian 7
IP Address: 192.168.1.200/24
Hostname: server.unixmen.com

Zabbix Client System:

Operating system: Ubuntu 13.04
IP Address: 192.168.1.100/24
Hostname: sk

First let us start from server side.

Prerequisites

Before installing Zabbix, we should have install and configure LAMP stack on server. To install and configure LAMP server On Debian 7 and Ubuntu 13.10, refer the following links.

- Install LAMP Server On Debian 7

- Install LAMP Server On Ubuntu 13.10

Server Side Configuration

Zabbix is found in the default repositories, but it may be outdated. So to install most recent version, download the latest repository configuration package from here.

Or you can download and install it using commands:

# wget http://repo.zabbix.com/zabbix/2.2/debian/pool/main/z/zabbix-release/zabbix-release_2.2-1+wheezy_all.deb
# dpkg -i zabbix-release_2.2-1+wheezy_all.deb

Now update package lists and  Zabbix server using commands:

# apt-get update 
# apt-get install zabbix-server-mysql zabbix-frontend-php

During installation, you’ll be asked to answer couple of questions regarding database configuration.

sk@sk: ~_003First it will ask you to enter the MySQL root user password.

sk@sk: ~_004Then provide password for zabbix-server-mysql to register with your database server.

sk@sk: ~_005Re-enter password:

sk@sk: ~_006Now a database called ‘zabbix’ will be created along with user ‘zabbix’.

Please Note: For Debian 6 and earlier versions, you should create a new database and give proper permission to the database manually.

Next we will adjust some PHP settings for zabbix front-end.

Edit file /etc/apache2/conf.d/zabbix,

# nano /etc/apache2/conf.d/zabbix

Find the following lines and edit them as follows. If the lines doesn’t exists, add them.

[...]
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value date.timezone Asia/Kolkata
[...]

It is mandatory, to adjust the correct time zone for you. Save and close the file.

Restart apache service:

# service apache2 restart

Access Zabbix Web Console

Open web browser and access the zabbix web console with URL: http://ip-address/zabbix or http://domain-name/zabbix.

Click Next to continue:

Installation - Mozilla Firefox_007It will check all prerequisites. If everything seems ok, click  Next to continue.

Installation - Mozilla Firefox_008Next enter the mysql administrative password and click Test connection. The database called ‘zabbix’ will be created automatically during the installation. If it says Ok, click Next to continue.

Installation - Mozilla Firefox_010Click next:

Installation - Mozilla Firefox_011Check configuration parameters once again and click Next to continue if all correct. If you want to change anything, just hit Previous button and do the changes.

Installation - Mozilla Firefox_012Click Finish to complete the installation.

Installation - Mozilla Firefox_013Now you’ll be asked to enter the username and password. The default username/password is admin/zabbix.

Zabbix - Mozilla Firefox_014Congratulations! You’ve completed the zabbix server and front-end installation successfully. This is how my zabbix server Dashboard looks at first log in.

Zabbix Server: Dashboard - Mozilla Firefox_015Install zabbix-agent On zabbix server

zabbix agent is used to send the reports to the server. Let us install this package on our server with following command:

# apt-get install zabbix-agent

At the server side you don’t have to configure agent, default values will work just fine.

Now go to the Dashboard and navigate to Configuration tab on the tab menu bar. Click on the Hosts tab. You’ll see that the zabbix server is present there.

Zabbix Server: Configuration of hosts - Mozilla Firefox_016Initially, the zabbix server doesn’t monitor itself, you have to enable it.

Click on the name of the server and set host name and change value of Status to “Monitored” at the bottom. Then click Save.

Zabbix Server: Configuration of hosts - Mozilla Firefox_017Wait for few minutes and you’ll see the zabbix server status is changed to be Monitored.

Check Zabbix server Statistics

Now click on the Monitoring tab on the top menu bar and select “Latest data”. You’ll see the zabbix server details:

Zabbix Server: Latest data [refreshed every 30 sec] - Mozilla Firefox_018Expand the sub-category (ex.CPU), you’ll see more detailed information.

Zabbix Server: Latest data [refreshed every 30 sec] - Mozilla Firefox_020Graphs:

Zabbix Server: History [refreshed every 30 sec] - Mozilla Firefox_021Client Side Configuration

Install zabbix-agent package in your client system:

$ sudo apt-get install zabbix-agent

Next edit file /etc/zabbix/zabbix_agentd.conf,

$ sudo vi /etc/zabbix/zabbix_agentd.conf

Add the server ip address and client hostname.

[...]
Server=192.168.1.200
[...]
Hostname=sk
[...]

Where,

192.168.1.200 – Debian 7 Ip address(Zabbix server).

sk – Ubuntu 13,04 hostname(client hostname).

Now restart zabbix-agent service with command:

$ sudo service zabbix-agent restart

Add Monitoring host – Method 1

Next go to the zabbix server Dashboard. Go to Configuration -> Hosts and click on your zabbix server name. This time it will show a option called Clone on the bottom. Refer the following screenshot.

Zabbix Server: Configuration of hosts - Mozilla Firefox_023Enter the client hostname, change the group and ip address. Finally click Save.

Zabbix Server: Configuration of hosts - Mozilla Firefox_027Now you’ll see that the client is added to monitoring list. After a few minutes, go to Monitoring -> latest data. You’ll see there both zabbix server and client statistics.

Zabbix Server: Latest data [refreshed every 30 sec] - Mozilla Firefox_028Click on the (+) sign of the hosts if you want to see the additional details.

Zabbix Server: Latest data [refreshed every 30 sec] - Mozilla Firefox_029Click on the Graph link to view the graph statistics.

Zabbix Server: History [refreshed every 30 sec] - Mozilla Firefox_030Add Monitoring Host – Method 2

From the Dashboard, go to Configuration -> Hosts. Click on Create host on the right side.

Zabbix Server: Configuration of hosts - Mozilla Firefox_031Enter hostname, select Groups and enter IP address as shown below.

Zabbix Server: Configuration of hosts - Mozilla Firefox_033Next go to Templates section and the template depending upon the type of your Host. Hence i have a Ubuntu desktop, i select Template OS Linux and click Add. Finally click Save.

Zabbix Server: Configuration of hosts - Mozilla Firefox_034Now the client will be added in the Hosts list.

Zabbix Server: Configuration of hosts - Mozilla Firefox_037That’s it. I have covered only basic things. Explore all the options and tweak them as per your requirement to get better monitoring solution. Good luck!

Reference Links:

Zabbix Home page

--------------------------------------------------------------------- Install Zabbix Monitoring Tool On Debian 7 / Ubuntu 13.10

Install and Configure Nagios On CentOS, RHEL, Scientific Linux 6.5/6.4

$
0
0

Nagios is an open source software that can be used for network and infrastructure monitoring. Nagios will monitor servers, switches, applications and services. It alerts the System Administrator when something went wrong and also alerts back when the issues has been rectified.

With 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.

Scenario

In this tutorial i am going to use two systems as mentioned below.

Nagios server:

Operating system : CentOS 6.5 minimal installation
IP Address       : 192.168.1.101/24

Nagios client:

Operating System : Ubuntu 13.04
IP Address       : 192.168.1.100/24

Prerequisites

Before installing Nagios, make sure that you’ve a properly installed and configured LAMP stack in your server. To install and configure LAMP server, refer any one of the following links.

- Install LAMP server On CentOS/RHEL/Scientific Linux 6

Also install the following prerequisites too. All commands should be run as root user.

# yum install gd gd-devel gcc glibc glibc-common

Install Nagios

I tested this how-to on CentOS 6.5 minimal server, although it should work on all RHEL 6.x and its clones like CentOS 6.x and Scientific Linux 6.x.

Nagios will not be found in CentOS official repositories, so let us add the EPEL repository to install nagios. To add and enable EPEL repository, refer the following link.

- Install EPEL Repository On CentOS/RHEL/Scientific Linux 6

Next install nagios with all plug-ins and nagios agents(nrpe-agent) using command:

# yum install nagios*

Note: It worked for me either if i keep SELINUX and iptables enable or disable. All you need to do is allow the apache port through iptables as shown below.

# vi /etc/sysconfig/iptables

Add the following line:

[...]
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[...]

Save and close the file. Restart iptables.

# service iptables restart

Configure Nagios

Add the admin mail address in the nagios contact file to receive alerts from nagios server. To do that edit file /etc/nagios/objects/contacts.cfg,

# vi /etc/nagios/objects/contacts.cfg

Find the following line and enter the email id:

[...]
email                           sk@unixmen.com ;
[...

Save and close the file. Then Edit file /etc/httpd/conf.d/nagios.conf,

# vi /etc/httpd/conf.d/nagios.conf

And edit the following lines if you want to access nagios administrative console from a particular IP series. Here i want to allow nagios administrative access from 192.168.1.0/24 series only.

[...]
## Comment Lines 15 & 16 ##
#   Order allow,deny
#   Allow from all

## Uncomment and Change lines 17,18 & 19 as shown below ##
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
[...]

Set nagiosadmin password

# htpasswd /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Updating password for user nagiosadmin

Start nagios and httpd services and let them to start automatically on every boot.

# service nagios start
# service httpd start
# chkconfig nagios on
# chkconfig httpd on

Access Nagios admin console

Open nagios administrator console with URL http://nagios-server-ip/nagios and enter the username as nagiosadmin and its password which we created in the earlier steps.

New Tab - Mozilla Firefox_001This is how Nagios administrative console looks:

Nagios Core - Mozilla Firefox_002Click on the “Hosts” section in the left pane of the console. You will see the no of hosts to be monitored by Nagios server. Initially, the nagios server (localhost) itself will only be monitored.

Nagios Core - Mozilla Firefox_003Click on the monitoring host to display more details:

Nagios Core - Mozilla Firefox_004

 

Add Monitoring targets to Nagios server

Now let us add some clients to monitor by Nagios server. To do that we have to install nrpe and nagios-plugins in our monitoring targets.

On CentOS/RHEL/Scientifc Linux clients:

Like i said before, you have to add EPEL repository in your CentOS/RHEL/Scientific Linux 6.x clients to install nrpe package.

Install “nrpe” and “nagios-plugins” packages in client systems to be monitored.

# yum install nrpe nagios-plugins-all openssl

On Debian/Ubuntu clients:

$ sudo apt-get install nagios-nrpe-server nagios-plugins

Configure Monitoring targets

Edit /etc/nagios/nrpe.cfg file,

# vi /etc/nagios/nrpe.cfg

Add your Nagios server ip address

[...]
## Line 81 - Add the Nagios server IP ##
allowed_hosts=127.0.0.1 192.168.1.101
[...]

Start nrpe service:

# service nrpe start
# chkconfig nrpe on

For Debian/Ubuntu Clients, start nrpe service as shown below.

$ sudo /etc/init.d/nagios-nrpe-server restart

Now go back to your Nagios server to add the clients to be monitored through nagios server. Edit “/etc/nagios/nagios.cfg” file,

# vi /etc/nagios/nagios.cfg

and uncomment the following lines.

## Line 52 - Uncomment ##
cfg_dir=/etc/nagios/servers

Create a directory called “servers” under “/etc/nagios/”.

# mkdir /etc/nagios/servers

Create config file to the client to be monitored:

# vi /etc/nagios/servers/clients.cfg
define host{

use                             linux-server

host_name                       client

alias                           client

address                         192.168.1.100  ## Client IP ##

max_check_attempts              5

check_period                    24x7

notification_interval           30

notification_period             24x7

}

Like this way you can add more monitoring targets. Finally restart nagios service.

# service nagios restart

Now open the nagios admin console in the browser and navigate to “Hosts” section in the left pane. You will see the newly added client will be visible there. Click on the host to see if there is anything wrong or alerts.

Nagios Core - Mozilla Firefox_005Click on the monitoring target, you’ll get the detailed output:

Nagios Core - Mozilla Firefox_006Now you can monitor the clients(hosts) as many as you added in the “/etc/nagios/servers/clients.cfg” file. To know more about object definitions such as Host definitions, service definitions, contact definitions and more please do visit here. This page will describe you the description and format of all object definitions.

That’s all about now. Good Luck! Stay healthy!

Reference Links:

Nagios Homepage

--------------------------------------------------------------------- Install and Configure Nagios On CentOS, RHEL, Scientific Linux 6.5/6.4

Pandora FMS 5.1 Released!

$
0
0

Introducing Pandora FMS 5.1

We would like to announce the latest version of Pandora FMS – version 5.1. Pandora FMS 5.1 isa completely improved version that lets you have a more more efficient, interactive and intuitive experience when monitoring your systems.

What’s new?

• Satellite Server

This new server will discover and remotely monitor SNMP/ICMP/WMI   devices on networks without direct connectivity, without the need to install a database or any other component running on windows/unix as well.

• Improved Enterprise Network Map (Network & Interface level).

This feature has been almost rewritten from scratch. Now we can display the topology based on network interfaces of switches, routers and servers and detect new systems in the map using a WYSIWYG graphical interface.

• Windows Support for Server & Console.

Starting with 5.1 version, now Pandora FMS can be installed in a windows server. We have developed a new installer which includes  all components (including MySQL) to let you use Pandora FMS in your windows server.

• IPAM (IP Address Management).

A fully IPv4/IPv6 solution for managing the IP addresses on your networks, including realtime time alerts on new IP’s, network sweep and integration with monitoring.

• Network Devices Configuration Change Management.

With Pandora FMS 5.1, you  can detect a configuration change in your router/switch in a notification. Also viewing with a visual “diffview” the changes between both configurations and check different date setups.

pandora

To learn more about Pandora FMS 5.1, go to http://pandorafms.com/Producto/Roadmap/.

Regards,

Pandora Development Team.

---------------------------------------------------------------------
Pandora FMS 5.1 Released!

Install And Configure Nagios On CentOS 7

$
0
0

Nagios is an open source software that can be used for network and infrastructure monitoring. Nagios will monitor servers, switches, applications and services. It alerts the System Administrator when something went wrong and also alerts back when the issues has been rectified.

With Nagios you can:

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

Scenario

In this tutorial i am going to use two systems as mentioned below.

Nagios server:

Operating system : CentOS 7 minimal installation
IP Address       : 192.168.1.101/24

Nagios client:

Operating System : Ubuntu 14.04
IP Address       : 192.168.1.102/24

Prerequisites

Before installing Nagios, make sure that you’ve a properly installed and configured LAMP stack in your server. To install and configure LAMP server, refer the following link.

Also install the following prerequisites too. All commands should be run as root user.

yum install gd gd-devel gcc glibc glibc-common

Install Nagios

I tested this how-to on CentOS 7 minimal server, although it should work on all RHEL 7 and its clones like Scientific Linux 7 too.

Nagios is not available in CentOS official repositories, so let us add the EPEL repository to install nagios. To add and enable EPEL repository, refer the following link.

Next install nagios with all plug-ins and nagios agents(nrpe-agent) using command:

yum install nagios*

Configure Nagios

Add the admin mail address in the nagios contact file to receive alerts from nagios server.

To do that edit file /etc/nagios/objects/contacts.cfg,

vi /etc/nagios/objects/contacts.cfg

Find the following line and enter the email id:

[...]
define contact{
        contact_name                    nagiosadmin             ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           Nagios Admin            ; Full name of user

        email                           sk@unixmen.com  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }
[...]

Save and close the file.

Then, Edit file /etc/httpd/conf.d/nagios.conf,

vi /etc/httpd/conf.d/nagios.conf

And edit the following lines if you want to access nagios administrative console from a particular IP series. Here, I want to allow nagios administrative access from 192.168.1.0/24 series only.

[...]
## Comment the following lines ##
#   Order allow,deny
#   Allow from all

## Uncomment and Change lines as shown below ##
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
[...]

Set nagiosadmin password:

htpasswd /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Updating password for user nagiosadmin

Start nagios and httpd services and let them to start automatically on every boot.

systemctl start nagios
systemctl restart httpd
chkconfig nagios on

Access Nagios admin console

Open nagios administrator console with URL http://nagios-server-ip/nagios and enter the username as nagiosadmin and its password which we created in the earlier steps.

New Tab - Mozilla Firefox_001

This is how Nagios administrative console looks:

Nagios Core - Mozilla Firefox_002

Click on the “Hosts” section in the left pane of the console. You will see there the no of hosts to be monitored by Nagios server. Initially, the nagios server (localhost) itself will only be monitored.

Nagios Core - Mozilla Firefox_003

Click on the monitoring host to display more details:

Nagios Core - Mozilla Firefox_004

Add Monitoring targets to Nagios server

Now, let us add some clients to monitor by Nagios server. To do that we have to install nrpe and nagios-plugins in our monitoring targets.

On CentOS/RHEL/Scientifc Linux clients:

As I mentioned before, you have to add EPEL repository in your CentOS/RHEL/Scientific Linux 6.x or 7 clients to install nrpe package.

Install “nrpe” and “nagios-plugins” packages in client systems to be monitored.

yum install nrpe nagios-plugins-all openssl

On Debian/Ubuntu clients:

sudo apt-get install nagios-nrpe-server nagios-plugins

Configure Monitoring targets

Edit /etc/nagios/nrpe.cfg file,

sudo vi /etc/nagios/nrpe.cfg

Add your Nagios server ip address:

[...]
## Find the following line and add the Nagios server IP ##
allowed_hosts=127.0.0.1 192.168.1.101
[...]

Start nrpe service on CentOS clients:

service nrpe start
chkconfig nrpe on

For Debian/Ubuntu Clients, start nrpe service as shown below.

sudo /etc/init.d/nagios-nrpe-server restart

Now, go back to your Nagios server to add the clients to be monitored through nagios server.

To do that, Edit “/etc/nagios/nagios.cfg” file,

vi /etc/nagios/nagios.cfg

and uncomment the following lines.

## Find and uncomment the following line ##
cfg_dir=/etc/nagios/servers

Create a directory called “servers” under “/etc/nagios/”.

mkdir /etc/nagios/servers

Create config file to the client to be monitored:

vi /etc/nagios/servers/clients.cfg

Add the following lines:

define host{

use                             linux-server

host_name                       client

alias                           client

address                         192.168.1.102

max_check_attempts              5

check_period                    24x7

notification_interval           30

notification_period             24x7

}

Finally restart nagios service.

systemctl restart nagios

Now, open the nagios admin console in the browser and navigate to “Hosts” section in the left pane. You will see the newly added client will be visible there. Click on the host to see if there is anything wrong or any alerts it has.

Nagios Core - Mozilla Firefox_005

Click on the monitoring target to view the detailed output:

Nagios Core - Mozilla Firefox_006

By this way, you can define more clients by creating a separate config files “/etc/nagios/servers” directory for each client.

Define services

We just defined the monitoring host before. Now, let us add some services of the monitoring host. For example, to monitor the ssh service, add the following lines shown in bold in the /etc/nagios/servers/clients.cfg file.

vi /etc/nagios/servers/clients.cfg

Add the following lines:

define host{

use                             linux-server

host_name                       client

alias                           client

address                         192.168.1.102

max_check_attempts              5

check_period                    24x7

notification_interval           30

notification_period             24x7

}

define service {
        use                             generic-service
        host_name                       client
        service_description             SSH
        check_command                   check_ssh
        notifications_enabled           0
        }

Save and close the file. Restart Nagios.

systemctl restart nagios

Now log in to Nagios web console and check for the added services. Navigate to Services section on the left side bar, you’ll see the ssh service there.

Nagios Core - Mozilla Firefox_007

To know more about object definitions such as Host definitions, service definitions, contact definitions, please do visit here. This page will explain you the description and format of all object definitions.

Thats it. Cheers!

Reference Links:

---------------------------------------------------------------------
Install And Configure Nagios On CentOS 7


Install Pandora FMS Server On CentOS 7

$
0
0

Pandora FMS (Stands for Pandora Flexible Monitoring System) is software solution for monitoring computer networks. Pandora FMS allows monitoring in a visual way the status and performance of several parameters from different operating systems, servers, applications and hardware systems such as firewalls, proxies, databases, web servers or routers.

Pandora FMS can be deployed in almost any operating system. It features remote monitoring (WMI, SNMP, TCP. UDP, ICMP, HTTP…) and it can also use agents. An agent isavailable for each platform. It can also monitor hardware systems with a TCP/IP stack, such as load balancers, routers, network switches, printers or firewalls.

Pandora FMS has several servers that process and get information from different sources, using WMI for gathering remote Windows information, a predictive server, a plug-in server which makes complex user-defined network tests, an advanced export server to replicate data between different sites of Pandora FMS, a network discovery server, and an SNMP Trap console.

Scenario

In this tutorial, I am going to use two systems as mentioned below.

Pandora  Server :

Operating system : CentOS 7 minimal installation
IP Address       : 10.1.1.200/24

Pandora Agent:

Operating System :CentOS 6 minimal installation
IP Address       : 10.1.1.121/24

Before to begin,  Install LAMP stack on your Pandora Server first.

To Install lamp stack, follow the instructions in this link:

Now lets start with Pandora Console:

Download the RPM pages from the Pandroafms.org website.

[root@mel-centos7 ~]# ls -altr
-rw-r--r--.  1 root root 28016727 Jul  1 09:37 pandorafms_console-5.1-1.noarch.rpm
-rw-r--r--.  1 root root   381483 Jul  1 09:37 pandorafms_server-5.1-1.noarch.rpm

Before to install pandora Console, you need to install some extra packages:

yum install mariadb-server httpd mod_php php-gd php-mysql php-mbstring xorg-x11-fonts-misc graphviz php-snmp php-pear php-ldap php-pear-DB xorg-x11-fonts-75dpi graphviz

1 – Install the pandora console

Now we will install the pandora console:

[root@mel-centos7 ~]# rpm -ivh pandorafms_console-5.1-1.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:pandorafms_console-5.1-1         warning: user pandora does not exist - using root
################################# [100%]
Please, now, point your browser to http://your_IP_address/pandora_console/install.php and follow all the steps described on it.

Start apache to activate php_ldap and php_snmp

systemctl start httpd.service

Change the  ownership of include directory  to 777.

chmod -R 777 /var/www/html/pandora_console/include/

Add the httpd Port to the firewall:

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

Service httpd  restart

systemctl restart httpd.service

Disable SELinux:

setenforce 0

Now, let us begin the installation via the browser:

Open your favorite browser and point to http://your_IP_address/pandora_console/

pandora1

Click Next and accept the license terms:

pandora2

Check if everything is green:

pandora3

Enter the  root  password of mysql admi:

pandora4

The Server will create the database Pandora with generated password bellow, this password you need it to start the pandora  Server.

pandora5

next:

pandora6

Now the pandora_console is installed, move or remove install.php and open http://ip/pandora_console.

Then, login with: admin:pandora

pandora_console

pandora_console2

2 – Install Pandora Server RPM

Before install the rpm package you need to install some dependencies first:

yum install perl-XML-Simple perl-XML-SAX perl-NetAddr-IP nmap perl-XML-Twig net-snmp-utils perl-IO-Socket-INET6 perl-Socket6 perl-Net-Telnet wmic perl-JSON wmic perl-CPAN

If you have issues with wmic package, please download it from http://blogs.aanish.in/wp-content/uploads/WMIC_Pkgs.zip

[root@unixmen-centos7 ~]# yum install wmic-4.0.0tp4-0.x86_64.rpm
Loaded plugins: fastestmirror
Examining wmic-4.0.0tp4-0.x86_64.rpm: wmic-4.0.0tp4-0.x86_64
Marking wmic-4.0.0tp4-0.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package wmic.x86_64 0:4.0.0tp4-0 will be installed

Install now the pandora server rpm package:

rpm -ivh pandorafms_console-5.1-1.noarch.rpm

Note : Don’t forget to start Tentacle Server daemon if you want to receive  data using tentacle.

Before to start the pandora Server, add the generated password in the console installation to /etc/pandora/pandora_server.conf

# dbpass: Database password

dbpass pandora

Change pandora with your generated password (ymigwenv), look screenshot step 5:

Start the server:

/etc/init.d/pandora_server start

Start tentacle server:

/etc/init.d/tentacle_serverd start

If you have any issues with this step, please check if your perl module Time-HiRes is installed.

3 – Install Pandora_Agent

Pandora agent can be Worstation/laptop/Windows/Unix/Firewall /Android:

Just install the agent and add it to config the Ip adress of pandora Server:

rpm -ivh pandorafms_agent_unix-5.1-1.noarch.rpm

Configure the agent on the file /etc/pandora/pandora_agent.conf:

And make the pandora Server ip

########################################
server_ip       10.1.1.200   # your Pandora Server
server_path     /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log

###################################

Start the agent:

[root@Centos6-unixmen ~]# /etc/init.d/pandora_agent_daemon start

Now back the Server restart the Daemon and check the console, in my case Centos 6 is the agent and my server is Centos 7.

Monitoring_pandora

Done.

Cheers!

---------------------------------------------------------------------
Install Pandora FMS Server On CentOS 7

False Positives In Monitoring

$
0
0

False positives (as well as false negatives) are a recurrent issue in our experience in monitoring, and after a while we are pretty sure that it’s worth talking about them.

The best way to approach a problem is using an example: Suppose we use Pandora FMS to monitor a network with 500 servers, in which we have defined to make a connectivity check (ping) to each IP. The most common result is that all checks appear in green, however, sometimes and in a random way, some check appears in red. Once we detect that, we perform the ping manually and we make sure that it works perfectly.

The initial conclusion is that our monitoring system, in this case Pandora FMS, is failing, but what is really happening is that our monitoring system is not configured as it should, and that is exactly where the problem is.

To test it, we just have to do a ping to one of these IP’s that sometimes fail y leave it for hours. We will see that occasionally, in 1 of 1.000 checks or even in 1 of 10.000 the ping fails, but we shouldn’t worry about that because is relatively common for networks to have that behavior sometimes.
The following screenshot shows us how our entire monitoring system is in green and however, a ping from the console fails. If in this precise moment Pandora FMS had been doing a check, it would have probably turned into red.

falsepositives

All monitoring systems have several parameters to control this behavior. Maybe we are interested in having the maximum detail level, as Pandora FMS does by default, or otherwise we want to attenuate the detail to avoid warning at the minimum failure. Below we list many control mechanisms available in Pandora FMS (also available in other monitoring systems) to avoid this kind of behavior:

    • Nº of checks: Sometimes the first ping fails, but the second one works, that’s why almost all the systems have a number of retries. There have been cases of systems where the first ping always failed, and it only worked when we pinged constantly with three retries. In this kind of cases (infrequent), the best option is to use other adapted checks (a custom plugin) instead of the standard check.
    • Timeout: In case we want to check remote systems maybe we need to increase the Timeout response. If we talk about a LAN, a second is more than enough, in the Internet we’d probably find a lot of false positives caused by a very low Timeout. On the other hand, setting a high Timeout of 10 seconds for example, would be a drag for the capacity of our server, because in the worst case it would have to wait 10 seconds per each check considering that the system is not responding.
    • Sensibility package loss: It could be hard to believe, but different ping tools behave differently, and even the same ping tool in different systems behave differently. Sometimes, the monitoring tool allows to set up this behavior to be tuned. We can`t compare the results of tools like ping, fping, hping or nmap as it will return different values. That’s why we need to know if our monitoring tool has settings that are generally respect to the tolerance of package loss or to the speed of transmission of information (related with Timeout and Nº of checks parameters). A bad configuration can make false positives appear. In an extreme case, because of this intolerance, we can find out with our monitoring tool a network with a package loss negligible for other tools. This is a real case with Pandora ICMP Enterprise server, using T3 parameter in the Nmap scan, in which we can appreciate that some systems don’t respond randomly because of a negligible package loss for the most part of the conventional monitoring systems.
    • Flipflop: The phenomenon in which an element that usually behaves in a stable way “bounces” more or less regular. To avoid that these bounces affect to how we perceive the value we will put a bound threshold. As this sometimes has “peaks” we’ll assume that there is a problem when that failure happens twice.
  • Flipflop threshold: To avoid having to wait till the monitorization process finish we will set the flipflop threshold to control the element faster and better. This way, if something fails we will know instantly. It’s usually combined with the previous parameter (Flipflop) so that if it fails we hope to have a confirmation in a shorter time, in Pandora FMS that is called Intensive Monitoring.

In the previous example we set the flipflop threshold in 1 and the flipflop interval in 30 seconds, so that, if anything fails we will be aware and we will repeat the test after 30 seconds. If the fails again, we’ll consider it as down and we will send an alert to the system, if not, we will consider it as a false positive and we will avoid alerting the system.

In conclusion, before claiming that our system has false positives, it’s important to review and properly set up all those elements in our monitoring software to avoid unnecessary alerts.

icon_contact_us download_it-08
Do you want to know more
about false positives in Pandora FMS
Do you want to get Pandora FMS?

---------------------------------------------------------------------
False Positives In Monitoring

Trick or treating with the Pandora FMS new version?

$
0
0

We are very pleased to announce the new Service Pack 1 for version 5.1 of Pandora FMS, with many new features and numerous bug fixes compared to the last release that we launched last June. You can find out everything below:

*Improved planning of scheduled stops, and their exclusion in all reports of SLA. Now, the reports show those periods that have been excluded due to a scheduled stop. The system administrator can decide if it’s possible to set scheduled stops after the event or not. You can download the scheduled tasks on a CSV.

*New multithreaded SNMP traps server.

*New Packet loss remote plugin that measures the packet loss in a network. This plugin is now included by default in Pandora FMS.

*New features added to the IPAM module (IP address management): IP’s reservation, massive operations and delegation of network management to users non administrators of Pandora FMS.

*Unix agent now supports UDP mode for remote command execution.

*Now it’s possible to visualize traffic graphics per interface (combined) from the main agent view:

graficas_combinadas

* Non-init modules will not be deleted anymore by default. There is an option of the setup that controls this behaviour.

*Improved the verbosity of Pandora FMS, introducing by default the server level 3 and showing some critical problems as events.

*Improved the server log rotation, with a new parameter to specify number of rotated log to be stored in disk prior deletion.

*Added dynamic macros for agent custom fields.

*Optional translation of OID’s for better performance in the SNMP traps processor.

*New contextual help system and “step by step” Wizard, that we hope will help less experienced users to take advantage of the best options of Pandora FMS.

wizard1

wizard2

*Rewamped code for TCP checks, improving performance and speed.

*Unix Agent log parser now supports log rotation detection by inode.

*From this version, Unix agent supports global macros.

*Fixed some pending issues in the http/Goliat server, increasing performance and speed.

*Improved usability of the Pandora FMS menus: creating an “anchor” mode and allowing the scroll of the contents without having to scroll down to the bottom of the page.

*Improvements in the services: Added new “simple” mode that allows to create services without taking into account the weights, and considering only two types of elements: critical and non critical.

*API & CLI new functions (add event comment, recreate collections and others).

*New dynamic radial network maps.

mapas_radiales

*New IP SLA Cisco plugin to measurig quality of service in networks of latest technology. Specially recommended for VoIP services or services sensitives to package loss and high latency.

*Audit information can now be exported to Excel or PDF.

*New statistics system of traps received which is very useful to filter by source IP or OID.

estadisticas

Do you want to get Pandora FMS 5.1 SP1?

SP1_halloween

 

Happy Halloween!

---------------------------------------------------------------------
Trick or treating with the Pandora FMS new version?

Monitorix – An Open Source, Lightweight System Monitoring Tool For Linux

$
0
0

Introduction

Monitorix is a free, Open Source monitoring tool that can be used to monitor as many services and system resources as possible. Unlike other monitoring tools, it is very simple to install, configure and monitor the systems. Initially, it was developed to support only the RPM based systems such as Red Hat, CentOS etc., but, later it is expanded it’s support to other distributions like Debian/Ubuntu, and BSD systems such as FreeBSD, NetBSD, and OpenBSD.

Since version 3.0, it comes with a built-in web server, so there is no need of any external webserver. It regularly collects the system and network resources of a Linux system, and displays the results as Graphs using RRDTool. It consists mainly of two programs called monitorix and monitorix.cgi. monitorix is a perl daemon which is started automatically just like as any system service, and monitorix.cgi is a CGI script. Monitorix is licensed under GNU GPLv2, so it is absolutely free to use, and distribute.

Features

Yet Monitorix is lightweight and simple, it has a comprehensive list of features like a enterprise network monitoring tools such as nagios or Zabbix.

Here is the list of features included in Monitorix.

  • System load average and usage;
  • Global kernel usage, Per-processor kernel usage;
  • HP ProLiant System Health;
  • LM-Sensors and GPU temperatures;
  • NVIDIA temperatures and usage;
  • Disk drive temperatures and health;
  • Filesystem usage and I/O activity;
  • Network traffic and usage;
  • Display statistics of almost all services such as; Netstat, Process, mail, ftp, Apache, nginx, lighttpd, MySQL, Squid proxy web cache, NFS server/client, Bind, NTP, Fail2ban, Icecast streaming, Raspberry pi sensor, Alternative PHP Cache, Memcached, APC UPS, Wowza Media Server & Libvert etc.
  • System services demand;
  • Network port traffic;
  • Users using the system;
  • Support for monitoring remote servers;
  • Alert capabilities supported;
  • Ability to include additional configuration file(s);
  • Ability to view statistics per day, week, month or year;
  • Ability to view statistics in graphs or in plain text tables;
  • Ability to zoom in any graph to see it in more detail;
  • Ability to show network metrics in MBytes/sec or Mbits/sec;
  • Ability to show temperatures in Celsius or in Fahrenheit;
  • Ability to configure the number of years of historical data (up to 5 years);
  • Web interface offers minimal learning, ubiquitous access;
  • Configuration with only one text-plain file;
  • Silent mode to be able to retrieve the graphs from scripts;
  • And many more.

Installation

Install Monitorix in RPM based systems:

First of all, add EPEL repository in your server. In our case, I tested this how-to on CentOS 7 64bit.

If you use CentOS 6.x like systems, use the following link to install EPEL Repository.

Now, install the following prerequisites.

yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple

Then, go to Monitorix download page, and get the the latest version. As of writing this, the most recent version was 3.6.0.

wget http://www.monitorix.org/monitorix-3.6.0-1.noarch.rpm

Now, install the downloaded Monitorix RPM file using the following command:

rpm -ivh monitorix-3.6.0-1.noarch.rpm

Once succesfully installed, please take a look into the configuration file /etc/monitorix.conf to set the options according your system and enable or disable graphs.

Finally start Monitorix service using command:

On CentOS 7:

systemctl start monitorix

On CentOS 6.x:

service monitorix start
chkconfig monitorix on

Be mindful that, some graphs might not be visible due to SELInux. So, disable it to view all graphs.

vi /etc/sysconfig/selinux

Change SELINUX=enforcing to SELINUX=disabled.

[...]
SELINUX=disabled
[...]

Reboot your system.

That’s it. Monitorix has been successfully installed on your system.

Install Monitorix in DEB based systems:

First, update your system:

sudo apt-get update

Install the following prerequisites:

sudo apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl
libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl
libio-socket-ssl-perl wget

Then, got to Monitorix download page, and get the latest version.

wget http://www.monitorix.org/monitorix_3.6.0-izzy1_all.deb

Finally, Install monitorix using commands:

sudo dpkg -i monitorix_3.6.0-izzy1_all.deb
sudo apt-get install -f

Alternatively, you can easily install monitorix using IzzySoft repository.

Edit file /etc/apt/sources.list,

sudo nano /etc/apt/sources.list

Add the IzzySoft repository location at the end:

[...]
deb http://apt.izzysoft.de/ubuntu generic universe

Save and exit the file. Then, download and add the GPG key.

wget http://apt.izzysoft.de/izzysoft.asc
sudo apt-key add izzysoft.asc

Now, update the repositories, and install monitorix using the following commands:

sudo apt-get update && sudo apt-get install monitorix

Finally, start monitorix service to start monitoring your Linux host.

sudo service monitorix start

Monitorix ships with a default configuration file which works out-of-the-box. Moreover, the service is automatically started on package installation.

To fine-tune your installation, take a look at the /etc/monitorix/monitorix.conf file to adjust some things (like network interfaces, filesystems, disks, etc.).

Note: The Debian package also comes with an extra configuration file in /etc/monitorix/conf.d/00-debian.conf that includes some options specially adapted for Debian systems. This file will be loaded right after the main configuration file, hence some options in the main configuration will be overwritten by this extra file.

That’s it. Monitorix has been installed on your deb based system.

Access Monitorix Web console

After installing monitorix, navigate to http://ip-address:8080/monitorix from your web browser. You’ll see the results in graphs as shown in the below screenshots.

Sample Screenshots:

Place a title here - Mozilla Firefox_001 Place a title here - Mozilla Firefox_002 Place a title here - Mozilla Firefox_003 Place a title here - Mozilla Firefox_004

Happy monitoring!

Cheers!

Source & Reference

---------------------------------------------------------------------
Monitorix – An Open Source, Lightweight System Monitoring Tool For Linux

Install And Configure Nagios 4 On CentOS 7

$
0
0

Introduction

Nagios is an open source software that can be used for network and infrastructure monitoring. Nagios will monitor servers, switches, applications and services. It alerts the System Administrator when something went wrong and also alerts back when the issues has been rectified.

Features

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

Scenario

In this tutorial i am going to use two systems as mentioned below.

Nagios server:

Operating system : CentOS 7 minimal server
IP Address       : 192.168.1.150/24

Nagios client:

Operating System : CentOS 7 minimal server
IP Address       : 192.168.1.152/24

Prerequisites

Before installing Nagios, make sure that you’ve a properly installed and configured LAMP stack in your server. To install and configure LAMP server, refer the following link.

Also install the following prerequisites too. All commands should be run as root user.

yum install gd gd-devel gcc glibc glibc-common wget

Create Nagios User And Group

Create a new nagios user account and give it a password:

useradd -m nagios
passwd nagios

Create a new nagcmd group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.

groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

Download Nagios And Plugins

Go to the nagios download page, and get the latest version. As of writing this, the latest version was 4.0.8.

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz

And, download nagios plugins too.

wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz

Install Nagios And Plugins

Install nagios:

I tested this how-to on CentOS 7 minimal server, although it should work on all RHEL 7 and its clones like Scientific Linux 7 too.

Go to the folder where you’ve downloaded nagios, and extract it using command:

tar xzf nagios-4.0.8.tar.gz

Change to the nagios directory, and run the following commands one by one from the Terminal to compile and install nagios.

cd nagios-4.0.8
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
Install Nagios Web interface:

Enter the following commands to compile and install nagios web interface.

make install-webconf

Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account. You’ll need it while logging in to nagios web interface..

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Restart Apache to make the new settings take effect.

systemctl restart httpd
Install Nagios plugins:

Go to the directory where you downloaded the nagios plugins, and extract it.

tar xzf nagios-plugins-2.0.3.tar.gz

Change to the nagios plugins directory:

cd nagios-plugins-2.0.3

Run the following commands one by one to compile and install it.

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

We aren’t finished yet.

Configure Nagios

Nagios sample configuration files have now been installed in the /usr/local/nagios/etc directory. These sample files should work fine for getting started with Nagios. However, you’ll need to put your actual email ID to receive alerts.

To do that, Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you’d like to use for receiving alerts.

vi /usr/local/nagios/etc/objects/contacts.cfg

Find the following line and enter the email id:

[...]
define contact{
        contact_name                    nagiosadmin             ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           Nagios Admin            ; Full name of user

        email                           sk@unixmen.com  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }
[...]

Save and close the file.

Then, Edit file /etc/httpd/conf.d/nagios.conf,

vi /etc/httpd/conf.d/nagios.conf

And edit the following lines if you want to access nagios administrative console from a particular IP series. Here, I want to allow nagios administrative access from 192.168.1.0/24 series only.

[...]
## Comment the following lines ##
#   Order allow,deny
#   Allow from all

## Uncomment and Change lines as shown below ##
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
[...]

Restart httpd service:

systemctl restart httpd

Now, check for any configuration errors using command:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

If there are no errors, start nagios service and make it to start automatically on every boot.

systemctl start nagios
chkconfig --add nagios
chkconfig nagios on

Adjust SELinux Settings

By default, SELinux will be in enforcing mode, and it throws “Internal Server Error” messages when you attempt to access the Nagios CGIs.

To rectify this error, edit file /etc/selinux/config:

vi /etc/selinux/config

And, set SELinux to permissive mode.

[...
SELINUX=permissive
[...]

Reboot your server to take effects the changes.

Access Nagios Web Interface

Open nagios administrator console with URL http://nagios-server-ip/nagios and enter the username as nagiosadmin and its password which we created in the earlier steps.

Mozilla Firefox_001

This is how Nagios administrative console looks:

Nagios Core - Mozilla Firefox_002

Click on the “Hosts” section in the left pane of the console. You will see there the no of hosts to be monitored by Nagios server. We haven’t added any hosts yet. So it simply monitors the localhost itself only.

Nagios Core - Mozilla Firefox_003

Click on the particular host to display more details:

Nagios Core - Mozilla Firefox_005

Add Monitoring targets to Nagios server

Now, let us add some clients to monitor by Nagios server. To do that we have to install nrpe and nagios-plugins in our monitoring targets.

On CentOS/RHEL/Scientifc Linux clients:

Add EPEL repository in your CentOS/RHEL/Scientific Linux 6.x or 7 clients to install nrpe package.

To install EPEL on CentOS 7, run the following command:

yum install epel-release

On CentOS 6.x systems, refer the following link.

Install “nrpe” and “nagios-plugins” packages in client systems:

yum install nrpe nagios-plugins-all openssl
On Debian/Ubuntu clients:
sudo apt-get install nagios-nrpe-server nagios-plugins

Configure Monitoring targets

Edit /etc/nagios/nrpe.cfg file,

sudo vi /etc/nagios/nrpe.cfg

Add your Nagios server ip address:

[...]
## Find the following line and add the Nagios server IP ##
allowed_hosts=127.0.0.1 192.168.1.150
[...]

Start nrpe service on CentOS clients:

CentOS 7:

systemctl start nrpe
chkconfig nrpe on

CentOS 6.x:

service nrpe start
chkconfig nrpe on

For Debian/Ubuntu Clients, start nrpe service as shown below:

sudo /etc/init.d/nagios-nrpe-server restart

Now, go back to your Nagios server, and add the clients in the configuration file.

To do that, Edit “/usr/local/nagios/etc/nagios.cfg” file,

vi /usr/local/nagios/etc/nagios.cfg

and uncomment the following lines.

## Find and uncomment the following line ##
cfg_dir=/usr/local/nagios/etc/servers

Create a directory called “servers” under “/usr/local/nagios/etc/”.

mkdir /usr/local/nagios/etc/servers

Create config file to the client to be monitored:

vi /usr/local/nagios/etc/servers/clients.cfg

Add the following lines:

define host{

use                             linux-server

host_name                       client

alias                           client

address                         192.168.1.152

max_check_attempts              5

check_period                    24x7

notification_interval           30

notification_period             24x7

}

Here, 192.168.1.152 is my nagios client IP address. Finally restart nagios service.

systemctl restart nagios

Wait for few seconds, and refresh nagios admin console in the browser and navigate to “Hosts” section in the left pane. You will see the newly added client will be visible there. Click on the host to see if there is anything wrong or any alerts it has.

Nagios Core - Mozilla Firefox_006

Click on the monitoring target (client) to view the detailed output:

Nagios Core - Mozilla Firefox_007

Similarly, you can define more clients by creating a separate config files “/usr/local/nagios/etc/servers” directory for each client.

Define services

We have just defined the monitoring host. Now, let us add some services of the monitoring host. For example, to monitor the ssh service, add the following lines shown in bold in the “/usr/local/nagios/etc/servers/clients.cfg” file.

vi /usr/local/nagios/etc/servers/clients.cfg

Add the following lines shown in bold:

define host{

use                             linux-server

host_name                       client

alias                           client

address                         192.168.1.152

max_check_attempts              5

check_period                    24x7

notification_interval           30

notification_period             24x7

}

define service {
        use                             generic-service
        host_name                       client
        service_description             SSH
        check_command                   check_ssh
        notifications_enabled           0
        }

Save and close the file. Restart Nagios.

systemctl restart nagios

Wait for few seconds, and check for the added services (i.e ssh) in the nagios web interface. Navigate to Services section on the left side bar, you’ll see the ssh service there.

Nagios Core - Mozilla Firefox_008

To know more about object definitions such as Host definitions, service definitions, contact definitions, please do visit here. This page will explain you the description and format of all object definitions.

Thats it. Cheers!

Source

---------------------------------------------------------------------
Install And Configure Nagios 4 On CentOS 7

Viewing all 33 articles
Browse latest View live