APC Australia

Monitor your network with an RPi

Embrace the power of NagiosPi to keep an eye on servers, switches and applicatio­ns on your network.

-

Is your PC offline? Has your Linux box stopped serving Minecraft or Counter-Strike? If you’re out of the house, or even the country, there is no real way of knowing without trying to log in — something you probably won’t be able to do without being on the premises (unless you’re using remote desktop software, but we’re not here to talk about that, today).

A far better way would be to simply receive notificati­ons when your network devices are knocked offline, and this is why we turn to NagiosPi, a Raspberry Pi-built version of the popular open source network monitoring tool.

NagiosPi is available as a full image ready to be written to SD card, with the real configurat­ion taking place once it’s up and running. Let’s get started.

“NagiosPi is available as a full image ready to be written to SD card, with the real configurat­ion taking place once it’s up and running. ”

1 DOWNLOAD NAGIOSPI

Windows users should write the extracted contents of the NagiosPi_ v2.0.zip file to a formatted SD card using Win32 Disk Imager. Linux desktop users can use Disk Utility or the command line ( bit.ly/1z36sp8). With the image written to SD, safely eject the card and insert it into your Pi before booting.

2 LOG IN TO NAGIOSPI

As with most Pi projects, you’ll probably want to operate via SSH, so check your router’s list of connected devices to find the IP address and connect. You can also use a keyboard and monitor connected to your Raspberry Pi. The default username and password for NagiosPi is as follows: pi/raspberry.

3 EXPAND THE FILESYSTEM

Before proceeding, run sudo raspi-config . You’ll need to select the first option, Expand Filesystem, and wait a moment as the filesystem is expanded to the full size of the SD card you’ve inserted.

Once done, select ‘Change User Password’ to add some security to your NagiosPi, then select Finish and reboot.

4 OPEN IN YOUR BROWSER

With the Pi rebooted, you’ll be able to open the NagiosPi web console in your browser. Visit http://[ to see the available options.

Here you’ll spot a menu of links in the top-left corner of the page, each accompanie­d with the username and password to sign in. Start with RaspContro­l.

5 MONITOR YOUR NAGIOSPI BOX

In the RaspContro­l section you’ll get a flavour of just what Nagios can do. On the home screen you’ll see general hardware informatio­n such as connectivi­ty and system status, and as you flick through Details, Services and Disks you’ll see what level of monitoring is possible.

6 VIEW HOST STATUS

Next, go to Nagios and pick Hosts. Here you will see the current status for the configured hosts, which is a combinatio­n of items detected on your local network and preset entities. Look for ‘Current Network Status’ in the upper-left area of the console, just below this you will find alternate views.

7 ADD A HOST TO MONITOR

Open NConf to add the server you wish to monitor, using the ‘Hosts – Add’ button to input the device hostname, IP address and alias. Click Submit when done, then switch to ‘Services – Add’, where you can assign a name and check command (such as check_ ping) to monitor.

8 CREATE CONFIGURAT­ION FILE

Each check must be set up individual­ly. Some require the installati­on of NRPE (Nagios Remote Plugin Executor) on remote devices to interrogat­e and present full system details, but this isn’t necessary for basic things like ping.

When you’re done, click Submit, then Generate Nagios Config. Following this, select Deploy.

9 MONITOR YOUR SERVER

In the NagiosPi window, select Services for a view of currently monitored servers and devices. For each listed device, there will be additional informatio­n that you drill down into by clicking Actions. We’ve only shown you the basics of NagiosPi – investigat­ion will demonstrat­e just how powerful it really is!

“As with most Pi projects, you’ll probably want to operate via SSH, so check your router’s list of connected devices to find the IP address and connect. ”

 ??  ??
 ??  ??
 ??  ??

Newspapers in English

Newspapers from Australia