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.
6 Steps total
SSH to you Raspberry Pi (or open a terminal if you are local on the device)
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).
Run the following command:
# apt-get upgrade
Wait for the Raspberry Pi to upgrade (more text and more waiting)
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).
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.
/etc/nagios3/commands.cfg
/etc/nagios3/nagios.cfg
/etc/nagios3/conf.d/ (This is the directory with the host configuration files, templates are also in there).
/etc/nagios3/nagios.cfg
/etc/nagios3/conf.d/ (This is the directory with the host configuration files, templates are also in there).
I would recommend reading up on the documentation at:
http://library.nagios.com/library/products/nagioscore/manuals/
source: https://community.spiceworks.com/how_to/68159-install-nagios-on-a-raspberry-pi
0 Komentar