Install Nagios on Raspberry Pi

The Raspberry Pi is a small ARM computer that runs a variety of Linux distributions (in this guide we are going to be using the official Raspbian image). So I have a Raspberry Pi and it has spent most of the last year just sitting on my desk in my office not doing anything for me. I figure maybe I should put this little guy to work. The Pi has GPIO pins so I can use a temperature sensor and a humidity sensor to monitor atmosphere in my server closet, but why stop there why not setup Nagios so I can monitor the servers also. In a previous How-to I outlined how to send SMS messages with the Raspberry PI, in this How-to I will outline how to install Nagios on the Raspberry Pi for monitoring servers so we can monitor our systems using nagios nrpe.
nagios

Step1: SSH to you Raspberry Pi (or open a terminal if you are local on the device)

Step2: Update your Raspbian install
Run the following command (I am assuming you are logged in as root):

apt-get update

 

Wait for the Raspberry Pi to update (you will see a lot of text scrolling on the screen).
apt-get-update

Step3: Upgrade your Raspbian install
Run the following command:

apt-get upgrade

 

Wait for the Raspberry Pi to upgrade (more text and more waiting)
apt-get-upgrade

Step4: Install Nagios.
Run the following command:

apt-get install nagios3

 

This will install Nagios Core 3.4.1 on your Pi (4.X is the current version but you will need to compile from source to install it, and I am trying to make this as simple for you as possible.)

You will be prompted to enter a password for the web admin user (enter a password).
nagios_password

Step5: Log into Nagios.

Open a browser and go to http://ip_of_the_raspberry_pi/nagios3
the username is nagiosadmin and the password is whatever you set in step 4.
nagios_interface

 

A future post will go over nagios plugins.

2 comments on “Install Nagios on Raspberry Pi

Leave a Reply

Your email address will not be published. Required fields are marked *