Na­gios: A Mod­u­lar Mon­i­tor­ing Tool for In­fras­truc­ture and Net­works

If you are look­ing for an en­ter­prise class open source net­work, ap­pli­ca­tion and server mon­i­tor­ing tool, there is no bet­ter op­tion than Na­gios. This ar­ti­cle ex­plores the very pop­u­lar Na­gios net­work in­fras­truc­ture mon­i­tor­ing tool.

OpenSource For You - - Contents -

It is not un­com­mon for the IT depart­ment in an or­gan­i­sa­tion to run into prob­lems and spend a great deal of time on trou­bleshoot­ing. So there is al­ways a need to be more proac­tive and pre­vent these is­sues. It is also worth­while to op­ti­mise the per­for­mance of the in­fras­truc­ture and the net­work. When a prob­lem oc­curs, fig­ur­ing it out im­me­di­ately and trou­bleshoot­ing it is stren­u­ous. Most of the prob­lems tend to build up over a pe­riod of time. Mon­i­tor­ing the de­vices and the net­work is cru­cial in pre­vent­ing ma­jor is­sues and en­hanc­ing per­for­mance. More­over, if the health of the IT en­vi­ron­ment is not mon­i­tored, how can one en­sure ef­fi­cient ser­vice to the end users? Hav­ing to­tal vis­i­bil­ity of your in­fras­truc­ture is para­mount in pre­vent­ing is­sues and mak­ing in­formed de­ci­sions to shape the fu­ture of the IT en­vi­ron­ment.

Mon­i­tor­ing not only helps in pre­vent­ing IT dis­as­ters, it also has a lot of other ad­van­tages. It en­ables data-driven in­sights and helps in de­ci­sion mak­ing. We can im­prove productivity and per­for­mance us­ing this data. It pre­vents down­time and busi­ness losses. It can also help to cut down a com­pany’s bud­get and in­crease sav­ings. Keep­ing track of the per­for­mance of hard­ware and soft­ware re­sources in­volves hav­ing first-hand knowl­edge of the health of the net­work and a com­plete con­trol over IT re­source us­age trends.

In­tro­duc­ing Na­gios

There are nu­mer­ous open source and com­mer­cial prod­ucts in the mar­ket for mon­i­tor­ing the net­work and the in­fras­truc­ture. Some of the well known open source mon­i­tor­ing tools are Na­gios, Zab­bix, Cacti, Icinga, Ground­work, OpenNMS and Hyperic. Among these, Na­gios is the most pow­er­ful tool. It is a frame­work that is ca­pa­ble of mon­i­tor­ing a large net­work of around 100,000 hosts and al­most all com­po­nents. Na­gios can be in­te­grated with third party tools. It uses the con­cept of mod­u­lar­ity via plu­g­ins, which pro­vide sup­port for pro­to­cols, op­er­at­ing sys­tems, sys­tem met­rics, ap­pli­ca­tions, ser­vices, Web servers, web­sites, mid­dle­ware, etc.

Na­gios does not have any in­ter­nal mon­i­tor­ing logic. It is un­aware of what is to be mon­i­tored and con­tains no built-in

pro­pri­etary in­ter­preters. It only does what it is in­structed to do in a way one ex­pects it to be done. Na­gios lets the user in­tel­li­gently sched­ule mon­i­tor­ing pro­grams in any lan­guage. These mon­i­tor­ing pro­grams are called plu­g­ins, which re­port the mon­i­tor­ing sta­tus back to Na­gios. It has lots of hooks that make it easy to get data in and out; so it can pro­vide real-time data to graph­ing pro­grams such as RRDTool and MRTG, and can eas­ily work along with other mon­i­tor­ing sys­tems, ei­ther by feed­ing them or by be­ing fed by them.

Na­gios Core and Na­gios XI

Na­gios Core is open source whereas Na­gios XI is a com­mer­cial, en­ter­prise ver­sion of Na­gios. Un­like Na­gios Core, Na­gios XI is com­pletely Web based. It is also wizard driven. The dash­boards are more ro­bust and per­son­alised. There are plenty of ad­di­tional fea­tures in the en­ter­prise ver­sion such as an ad­vanced UI, main­te­nance tools, in­te­gra­tion with third party tick­et­ing and much more.

How does Na­gios work?

Na­gios was de­vel­oped for Linux but is now ca­pa­ble of mon­i­tor­ing UNIX based op­er­at­ing sys­tems. It has three com­po­nents — the dae­mon, the Web in­ter­face, and the plu­g­ins. Na­gios has four ba­sic ob­ject types, which are listed be­low.

Com­mands: These are used to in­ter­act with the plu­g­ins, and to con­trol the event han­dlers, no­ti­fi­ca­tions and checks.

Con­tact and con­tact groups: These de­fine the in­di­vid­u­als to be con­tacted in case of an event.

Host and host groups: These are used to spec­ify ser­vices and hosts in a par­tic­u­lar net­work.

No­ti­fi­ca­tions: These de­fine what con­tent needs to be sent to con­tacts and con­tact groups when there are drifts.

Ser­vices: These spec­ify net­work ser­vices such as HTTP/80, SSH, FTP, etc, and host ser­vices such as clock,

DNS en­tries, etc.

Host and ser­vice check def­i­ni­tions in­struct Na­gios which plu­g­ins to call to ob­tain the sta­tus of a host or ser­vice. The def­i­ni­tions in the plu­g­ins are checked against that par­tic­u­lar host/ser­vice. If it is seen go­ing be­yond the thresh­old, Na­gios no­ti­fies the con­tacts/con­tact groups. Na­gios re­turns any one of the fol­low­ing four sta­tus codes for any event:

0-OK

1-Warn­ing

2-Crit­i­cal

3-Un­known

Na­gios can be con­fig­ured to do ei­ther pas­sive checks or ac­tive checks. In ac­tive checks, the host that runs Na­gios ‘polls’ de­vices or ser­vices for sta­tus in­for­ma­tion every so of­ten, whereas pas­sive checks are ini­ti­ated and per­formed by ex­ter­nal ap­pli­ca­tions/pro­cesses. The re­sults are then sent to the mon­i­tor­ing host (where Na­gios runs) for pro­cess­ing. The ma­jor dif­fer­ence be­tween ac­tive and pas­sive checks is that ac­tive checks are ini­ti­ated and per­formed by Na­gios, while pas­sive checks are per­formed by ex­ter­nal ap­pli­ca­tions. Pas­sive checks can be used to mon­i­tor asyn­chro­nous ser­vices and to mon­i­tor the ser­vices that are lo­cated be­hind a fire­wall. Ac­tive checks can be used for on-de­mand checks and reg­u­lar in­ter­val checks. The re­sults can be mon­i­tored via the Web GUI, which is CGI based.

Fea­tures

The fea­tures of Na­gios are listed be­low:

Cen­tralised view of the en­tire mon­i­tored IT in­fras­truc­ture Au­to­matic restart of failed ap­pli­ca­tions is granted by its event han­dlers

Multi-user ac­cess

Se­lec­tive ac­cess al­lows clients to view only the in­fras­truc­ture com­po­nents that af­fect them

Mon­i­tor­ing of net­work ser­vices like SMTP, POP3, HTTP, NNTP, PING, etc

Mon­i­tor­ing of host re­sources such as pro­ces­sor load, disk us­age, etc

Par­al­lelised ser­vice checks

Abil­ity to de­fine net­work host hi­er­ar­chy us­ing ‘par­ent’ hosts, al­low­ing de­tec­tion of and dis­tinc­tion be­tween hosts that are down and those that are un­reach­able

Op­tional Web in­ter­face for view­ing cur­rent net­work sta­tus, no­ti­fi­ca­tions and prob­lem history, log files, etc Pow­er­ful script APIs al­low easy mon­i­tor­ing of in-house and cus­tom ap­pli­ca­tions, ser­vices, and sys­tems Avail­abil­ity re­ports en­sure SLAs are be­ing met

Failover ca­pa­bil­i­ties en­sure non-stop mon­i­tor­ing of crit­i­cal IT in­fras­truc­ture com­po­nents

In­stal­la­tion

Let’s in­stall Na­gios on Ubuntu 16.x (or above) where SELinux is not in an en­forc­ing state.

Pre­req­ui­site: Graph­ics li­brary to dis­play the mon­i­tor­ing on the Web front-end (Apache). Use the fol­low­ing com­mands to down­load it:

$sudo apt-get up­date

$sudo apt-get in­stall -y au­to­conf gcc libc6 make wget un­zip apache2 php liba­pache2-mod-php7.0 libgd2-xpm-dev

Down­load Na­gios from the source, as fol­lows:

$cd /tmp

$wget -O na­gioscore.tar.gz https://github.com/ Na­giosEn­ter­prises/na­gioscore/ar­chive/na­gios-4.3.4.tar.gz $ttar xzf na­gioscore.tar.gz

Com­pile the source us­ing the fol­low­ing code:

$cd /tmp/na­gioscore-na­gios-4.3.4/

$sudo ./con­fig­ure ­­with­httpd­conf=/etc/apache2/site­sen­abled

$sudo make all

Cre­ate User na­gios and www-data. Add www-data to the Na­gios group, as fol­lows:

$sudo user­add na­gios

$sudo user­mod -a -G na­gios www-data

In­stall bi­na­ries, HTMLs and CGIs by giv­ing the fol­low­ing com­mand:

$sudo make in­stall

In­stall and con­fig­ure the ser­vice or dae­mon that has to start on boot­ing up, as fol­lows:

$sudo make in­stall-init

$sudo up­date-rc.d na­gios de­faults

Next, in­stall the *SAM­PLE* con­fig­u­ra­tion files to al­low Na­gios to start:

$sudo make in­stall­con­fig

In­stall the Apache Web server con­fig­u­ra­tion files and con­fig­ure Apache set­tings, as shown be­low:

$sudo make in­stall-we­b­conf $sudo a2en­mod re­write $sudo a2en­mod cgi

Con­fig­ure the fire­wall to al­low Port 80 in­bound traf­fic on the lo­cal fire­wall in or­der to reach the Na­gios Core Web in­ter­face, as fol­lows:

$sudo ufw al­low Apache $sudo ufw reload

Cre­ate an Apache user ac­count to be able to log into Na­gios. This user name and pass­word would be used to log in to the Na­gios Web page:

$sudo ht­passwd -c /usr/lo­cal/na­gios/etc/ht­passwd.users na­giosad­min

Restart Na­gios Core and Apache Ser­vice, as fol­lows:

$sudo sys­tem­ctl restart apache2.ser­vice $sudo sys­tem­ctl start na­gios.ser­vice

To test how Na­gios Core works, open the Na­gios Web client in the browser at http://<ip ad­dress or FQDN>/na­gios. The page that ap­pears is shown in Fig­ure 1.

The host and ser­vices page will dis­play er­rors as there are no plu­g­ins in­stalled, but once they are, these er­rors will get re­solved. Here are steps to in­stall plu­g­ins from the Na­gios Plu­gin Pack­age.

Down­load the pre­req­ui­sites as fol­lows:

$sudo apt-get in­stall -y au­to­conf gcc libc6 libm­crypt-dev make lib­ssl-dev wget bc gawk dc build-es­sen­tial snmp lib­net-sn­mp­perl get­text

Next, down­load and com­pile the source, and in­stall the plu­g­ins:

$cd /tmp

$wget ­­no­check­cer­tifi­cate ­O na­gios­plu­g­ins.tar.gz https:// github.com/na­gios-plu­g­ins/na­gios-plu­g­ins/ar­chive/re­lease2.2.1.tar.gz

$tar zxf na­gios-plu­g­ins.tar.gz

$cd /tmp/na­gios-plu­g­ins-re­lease-2.2.1/

$sudo ./tools/setup

$sudo ./con­fig­ure

$sudo make

$sudo make in­stall

Fig­ure 1: Na­gios Web UI

Fig­ure 2: Ser­vices sta­tus af­ter in­stalling plu­g­ins

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.