Installing Nagios on Ubuntu Server 11.10 then Monitoring Windows and Exchange Servers–Part 1–Configuring Ubuntu for the Installation of Nagios Core…

by Andy Grogan on January 7, 2012 · 45 comments

in Linux, Monitoring, Nagios, Ubuntu

[ NOTE: ] This part has been updated to reflect some suggestions from readers of the site. Sections that have changed are:
Installing Nagios Core – added the sed commands before the “Make” process, this fixes an issue with the Make file which prevents the Nagios home page from being displayed, as well as some issues with the RSS feed – many thanks to Michael for pointing this out, and Simon Krenger for the actual fix.

I have also changed the Verifying Nagios Permissions section to reflect Michael’s suggestions – this fixes an issue when trying to schedule a service recheck which is related to permissions on the “nagios.cmd” file.

I have also removed the suggestion for an FTP server within the configuration – in essence you should be using SSH transfers via FileZilla.

Every now and then I like to ramble off and do something with a technology that I would not normally blog about, which also I am by no means an expert in – as it is a learning experience and can be fun!.

Recently I have been looking at monitoring solutions mainly in the context of a new role that I have been appointed to, but also because I have not focussed on any real form of monitoring throughout the history of this site and I thought that it would be good to share some of my experiences.

I have been looking at SCOM (and I will get around to posting a little tip that I discovered recently during the installation of Operations Manager) as well as a few other products (some good, some bad). However what I would like to focus my next few posts upon is Nagios Core.

For those whom don’t know; Nagios Core is a popular monitoring system based around Linux and PHP which in its “Core Edition” is available for free. With Nagios you can monitor a large number of facets of your network (including but not limited to Servers, Switches, Routers, Firewalls) and their respective services. You can also do some basic (in the Core release) business intelligence and performance / capacity management functions.

There is a huge community of plug-ins, skins and alternative interfaces for Nagios which allow for some pretty impressive expansion of the product and pretty much has everything for your monitoring needs.

Before I get into the meat of the article I should point out that I am not a Linux or Nagios expert (more a dabbler to be honest) – but over the years I have played with Ubuntu in the context of a reverse proxy for OWA and looked at Nagios as a monitoring tool a few times ~ but never really have used them in anger, therefore with that considered there are probably some processes that I will describe in this series that could be done better or more efficiently.

It is probably also worth pointing out, that there are a number of articles on the Internet which explain how to install Nagios core, but there are not many (or none that I could find) that give you an end-to-end scenario of Server installation to Server client and Exchange monitoring – so I thought that I would put one together.

As mentioned I have decided to use Nagios on Ubuntu (as it is the Linux Distro that I am the most familiar with), but I will not be explaining the actual Ubuntu install. What I will say is that I have installed Ubuntu Server into my VMWare workstation environment using the “Easy Setup” function – which automated the entire process, and all I really needed to do was create a new Virtual Machine and point the Ubuntu ISO at it.

Prerequisite Steps

Updating you Ubuntu Installation to the latest version

NOTE: The following steps all assume that you have a working, vanilla version of Ubuntu Server in your environment, if you would like to know how you can set install Ubuntu 11.10 within VMWare Workstation 8 – please see my video overview located here

From the Ubuntu Console type in the following commands (every command should then be followed by pressing <Enter>):

sudo apt-get update

Which will give you some output similar to the following (only there will be much more of it):

Ign http://security.ubuntu.com oneiric-security InRelease
Ign http://us.archive.ubuntu.com oneiric InRelease
Ign http://us.archive.ubuntu.com oneiric-updates InRelease
Ign http://us.archive.ubuntu.com oneiric-backports InRelease
Hit http://security.ubuntu.com oneiric-security Release.gpg
Hit http://security.ubuntu.com oneiric-security Release

Then type the following command;

sudo apt-get dist-upgrade

This will then begin the process of updating your Ubuntu Server components to the latest versions.

Installing OpenSSH

Whereas you do not need to install OpenSSH on your Ubuntu server, it is a very useful tool to have in place later on when you are administering the system and making modifications to various configuration files.

OpenSSH provides an encrypted remote administration environment for telnet and FTP applications (like PuTTY and Filezilla ~ more on these later).

Whereas you can administer your server from the console (or if like me you are working in a virtual environment the VMWare tools) it is far easier to install OpenSSH so you can perform tasks on your local Windows machine (I can already hear many Linux aficionados scoffing at the prospect Smile).

In order to install OpenSSH onto your Ubuntu box use following command on the console:

sudo apt-get install openssh-server

Configuring your Ubuntu Server with a Static IP address and configuring DNS

Naturally your Nagios monitoring server will need a static IP address, rather than one that is assigned from DHCP – therefore the following steps can be used to assign a static IP.

From the Ubuntu console type in the following command:

sudo nano /etc/network/interfaces

This will open up a console based text editor with the interfaces IP configuration (some people may prefer to use VI – but I have to admit I am a wimp and cannot get on with it!).

You will initially be presented something that looks like the following configuration:

auto eth0
iface eth0 inet dhcp

You will need to change the above to reflect the settings within your environment – for example mine looks like this:

auto eth0
iface eth0 inet static
        address 172.31.253.159
        netmask 255.255.255.0
        network 172.31.253.0
        broadcast 172.31.253.255
        gateway 172.31.253.129

When you have finished editing the file in Nano press the CTRL-O key and then <Enter> to save the file, and then press CTRL-X to exit and return to the console.

You should then configure the DNS Servers for your environment – from the console type in the following command:

sudo nano /etc/resolv.conf

This command will present you with a file that looks like the following:

domain telnetport25.com
search telnetport25.com
nameserver 172.31.253.138

You should change all of the values within the configuration file to reflect those within your own environment, when done you will need to press CTRL-O and then <ENTER> and then CTRL-X to exit.

Now that you have configured both a static IP address and your nameserver configurations you will need to restart the networking Daemons for the settings to take effect. This is done by entering in the following command to the console:

sudo /etc/init.d/networking restart

Setting up PuTTy to administer your server

You are now in a position to administer the Ubuntu server with a remote tool such as PuTTy. I say PuTTy as it is still one of the most versatile Terminal tools on the market that is also free.

You can download PuTTy from the following location: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

PuTTY is very easy to use – after you have downloaded it – double click on the executable and from the Session screen provide the IP address of your server and ensure that the SSH radio button is selected – see below:

NagiosCore001

When you are done click on the “Open” button – you might be presented with a Certificate Error screen. This is generated because the OpenSSH server will have generated a self signed SSL certificate which naturally will not be trusted by the local PuTTY client. You will need to accept and trust the certificate.

When you have done that you will be presented with a Terminal window that looks like the following:

NagiosCore002

You can now remotely administer your server from PuTTY.

Installing a Compiler on your Server

Nagios and its associated components is supplied in a pre-compiled form which is compressed and tar-balled (tag.gz) therefore before you can install it you will need to compile it using a compiler. Ubuntu server does not come with a built in compiler, but there are a number in the Linux community which are free to download and use.

For the purposes of this article we will be using “Build-Essential” which can be installed onto your server using the following command line from your PuTTY session:

sudo apt-get install build-essential

Upon executing this command you will be asked to confirm the installation – ensure that you select “Y

Installing the GD Libraries

The Ubuntu (or Debian) GD libraries are in essence binaries that allow for applications to dynamically draw images. These are most likely used by Nagios’ reporting tools.

To install the GD libraries type in the following command:

sudo apt-get install libgd2-xpm-dev

Installing Apache and PHP 5

Apache should really need no introduction with it still being one of the most popular web server platforms on the planet. Apache is naturally required to support the web interface of Nagios, and PHP5 is the platform language which does all of the cool stuff in the user front end.

To install Apache enter in the following command into the PuTTY terminal window:

sudo apt-get install apache2

When Apache has installed enter in the following commands to install PHP5:

sudo apt-get install php5-common php5 libapache2-mod-php5

Installing Nagios Core

Creating the Nagios service user and group for commands

Nagios needs a service user and a group which has the relevant permissions to run commands within the monitoring system. The need to be created before you being the fill Nagios install.

In order to create them type in the following commands into your Terminal window:

sudo useradd -m nagios

sudo passwd nagios – you will be prompted for a password for the Nagios Service user here

sudo groupadd nagcmd

sudo usermod -a -G nagcmd nagios

sudo usermod -a -G nagcmd www-data

Download the Nagios Core and Plug in files

We are now at the stage where we can download the Nagios Core and Plugins source to your Server.

Within the Terminal window type in the following commands:

sudo –s

mkdir downloads

cd downloads

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.3.1.tar.gz (this is the latest stable release)

wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz

tar –zxvf nagios-3.3.1.tar.gz

tar –zxvf nagios-plugins-1.4.15.tar.gz

Installing Nagios Core

Now that you have downloaded the relevant files to your server we can now begin the installation process, from the Terminal Windows type in the following commands (please ensure that you are in the “downloads” folder that you created in the previous step):

cd nagios ./configure --with-command-group=nagcmd


sed -i 's:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g' ./html/Makefile


sed -i 's:for file in includes/rss/extlib/\*;:for file in includes/rss/extlib/\*.\*;:g' ./html/Makefile make all make install make install-init make install-config make install-commandmode make install-webconf

We will now create the administration user for the Nagios Core System (this is the account that will be used to log into the web interface)

mkdir /usr/local/nagios/etc

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

You will then be prompted for a password for the admin user.

Installing the Nagios plugins

The Nagios plugins provide around 50 pre-configured monitoring functions and services, without them your Nagios installation is not going to do very much so it is important that they are compiled and integrated into the environment.

In order to install them from the terminal window, type in the following commands:

Navigate to the downloads folder (if you have been following the sequence this could be cd .. and then cd nagios-plugins-1.4.15).

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

make

make all

make install

Creating a Symbolic Link for the Nagios Service

We now have an almost functional Nagios system, however before we can start the system up, we need to create a symbolic link to the Nagios service so that it can be started with the O/S automatically.

In order to do this type the following command into the Terminal window:

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

Verify permissions and file system

During the configuration of the Nagios environments for this article I have encountered some small problems with file system permissions and a folder not being created by the installation process. Therefore I have added in this step which cleans up the permissions on the Nagios folders and ensures the correct directories are in place.

From the terminal window type in the following commands

chown nagios.nagcmd /usr/local/nagios/var/rw

 

chmod g+rwx /usr/local/nagios/var/rw

 

chmod g+s /usr/local/nagios/var/rw

 

/etc/init.d/nagios restart

Verifying the installation

Just before we start the Nagios server up, as a penultimate step we should now verify the configuration – this is done by executing the following command from the Terminal window:

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

Which should result in the following output:

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
    Checked 8 services.
Checking hosts...
    Checked 1 hosts.
Checking host groups...
    Checked 1 host groups.
Checking service groups...
    Checked 0 service groups.
Checking contacts...
    Checked 1 contacts.
Checking contact groups...
    Checked 1 contact groups.
Checking service escalations...
    Checked 0 service escalations.
Checking service dependencies...
    Checked 0 service dependencies.
Checking host escalations...
    Checked 0 host escalations.
Checking host dependencies...
    Checked 0 host dependencies.
Checking commands...
    Checked 24 commands.
Checking time periods...
    Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check

Starting up Nagios and Accessing the Management Site

We can now start Nagios Core – therefore from the Terminal Window type in the following command:

/etc/init.d/nagios start

When the service has completed starting up – you can open a Web Browser to you the Nagios Core installation via:

http://<addressOFyourServer>/nagios

NagiosCore003

In the next part

In the next part of this series I will go through how you can configure some basic monitoring of some Windows Servers within your infrastructure.

{ 45 comments… read them below or add one }

Charles Derber January 8, 2012 at 12:00 pm

Would be looking forward for the upcoming parts…

I’ve been the knowing(in person & collegues) about this tool for monitoring(especially exchange as am concerned) & also good on other products too…!

Nicely mentioned the steps to start with :)

Reply

Bradley Marks January 9, 2012 at 8:02 am

Brilliant How-To!! I am a MS user who also loves playing around with Ubuntu. This is the best How-to i have found on the web, thank you.

Cant wait for the next part!!

Reply

Bradley Marks January 9, 2012 at 11:38 am

Hi Andy

I have followed your steps to the T, but when I point my browser to the server, it asks for my username and password but then gives me the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.20 (Ubuntu) Server at 10.32.6.106 Port 80

Any idea what could be wrong?

Kind Regards

Reply

Bradley Marks January 9, 2012 at 12:03 pm

Hi Andy, i found the problem. Above where you set the administration user you have a comma where it should be a fullstop:

htpasswd –c /usr/local/nagios/etc/htpasswd,users nagiosadmin

Reply

Andy Grogan January 9, 2012 at 1:17 pm

Nice catch Bradley! – I have corrected the typo.

Reply

Bradley Marks January 10, 2012 at 9:48 am

Hi Andy

After doing this install, i was getting a error under the status information stating – Return code of 127 is out of bounds – plugin may be missing.

This is because the plugins need to be installed, instead of make all, you need to make install.

Kind Regards

Reply

Andy Grogan January 10, 2012 at 5:03 pm

Thanks once again Bradley – I have corrected the missing line (I still think that you need the make all) – I have also given it another proof read against my install notes and I am now pretty sure that nothing it missing. Cheers.

Reply

AJ January 10, 2012 at 5:03 pm

I love the post, but I’ve followed the directions and I’ve even done it several times now… I keep getting 500 Internal Server Error. Any thoughts or ideas on where I may have gone wrong? I even read ahead through the comments and made corrections to my own notes based on what others of written here.

Any help would be greatly appreciated!

Thanks!

Reply

Andy Grogan January 10, 2012 at 5:05 pm

Hiya AJ, can you hit the default Apache page – by going to your server root http://<server address/
Cheers
A

Reply

AJ January 10, 2012 at 5:08 pm

Yeah I can hit that no problem.

Reply

AJ January 10, 2012 at 6:03 pm

Andy helped me out with this. The solution was to run the following again:

sudo -s
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin

/etc/init.d/apache2 restart
/etc/init.d/nagios restart

After that I was able to get in and use Nagios. Thanks a bunch Andy!

Reply

Michael February 24, 2012 at 12:01 pm

when following this guide I have sucessfully managed to get nagios working but the main.php is blank. I can see the side bar on the left and all the .cgi links on the left work ok. but where you would usually get the nagios core and version etc.. this doesnt work its blank.

any suggestions?

Thanks.

Reply

Andy Grogan February 24, 2012 at 12:12 pm

Hiya Michael, from what I understand this is a bug in the current release of Nagios. I have had a look around (as I have the same issue) on the web and none of the solutions have worked – so I have just ignored it for now as it does not effect the functionality of the product.
Cheers
A

Reply

Michael February 24, 2012 at 12:14 pm

thank you for the prompt reply. glad this is a known bug and wasnt me missing a step or doing something wrong.

Reply

Dave N February 29, 2012 at 9:16 am

Morning,

I have just gone through this steps from a blank install of Ubuntu 11.11.

When I hit http://192.168.1.117 I get the IT WORKS page. But when I go to 192.168.1.117/nagios I get the error.

Not Found
The requested URL /nagios was not found on this server.
Apache/2.2.20 (Ubuntu) Server at 192.168.1.117 Port

I followed your guide to the letter and I am lost at what has caused it.

Reply

Dave N February 29, 2012 at 10:51 pm

Doing what Andy said above helped.

sudo -s
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin

/etc/init.d/apache2 restart
/etc/init.d/nagios restart

Reply

Michael March 2, 2012 at 9:01 am

A couple of fixes that I have come across building nagios 3.3.1 on ubuntu 11.10 that might help users out.

•Fix rss error in make (this appears to also fix the home page information page that is blank)
When installing/building nagios after the command “./configure –with-command-group=nagcmd” run these:

sed -i ‘s:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g’ ./html/Makefile
sed -i ‘s:for file in includes/rss/extlib/\*;:for file in includes/rss/extlib/\*.\*;:g’ ./html/Makefile

then continue with “make all”, “make install”, etc…..

•Fix nagios.cmd permission error
chown nagios.nagcmd /usr/local/nagios/var/rw
chmod g+rwx /usr/local/nagios/var/rw
chmod g+s /usr/local/nagios/var/rw
/etc/init.d/nagios restart

Thanks to Andy for such a detailed work instruction.

Reply

Andy Grogan March 3, 2012 at 1:25 pm

I just wanted to say thank you to all of you whom have made comment and suggested alterations to the article. I have now updated the article to reflect them.
I really appreciate the support and time that you have invested to make it a better piece of work.
Cheers
A

Reply

Chris Banford April 4, 2012 at 1:14 pm

Just wanted to say thanks for the incredibly helpful + rare (in geek worlds anyway) how to article. Following your steps faithfully landed me with a working installation with no arcane error messages/issues.

Kudos :-)

-Chris

Reply

Andy Grogan April 4, 2012 at 7:04 pm

Chris, you are more than welcome – glad that it has helped! :-)
Cheers
A

Reply

Paola April 16, 2012 at 11:31 am

Guy this guide is awesome! thanks a lot bro!

Reply

Bob April 17, 2012 at 11:11 am

Hi,

having trouble when trying to complie nagios code
# make all
makefile:52: *** missing separator. Stop.

Your help would be much appreciated.

Reply

Rob May 1, 2012 at 6:50 pm

I followed the above instructions to the “T” and even some of the fixes outlined in the comments but I still cannot get the nagios site. I can hit http://localhost default page that shows it works, but when I try to hit the http://localhost/nagios I get the 500 internal Server error. I looked in /var/www and do not see anything relating to nagios.

I see the /etc/apache2/conf.d/nagios.conf file:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin “/usr/local/nagios/sbin”

# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user

Alias /nagios “/usr/local/nagios/share”

# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user

yet when I retstart apache and nagios i still donot get the nagios website.

What am I missing?

Thanks!

Reply

Mohsin August 16, 2012 at 11:32 am

I am also getting the same error. Did you able to fix the problem?

Reply

Ian May 3, 2012 at 2:30 pm

Great tutorial! I searched a while online to find a recent tutorial and finally found this, I appreciate the details and step by step.

I have just installed 12.04 in VBox and did this. The only reccomendation (from my slightly Linux-newbie standpoint) would be to log in as root from the beginning (sudo -i) otherwise all your makes and other things will not work, and you will have to sudo each, else logging in at that point will change your directory.

Also, maybe I’m blind, but I don’t see any obvious links to the other parts anywhere.

Reply

Ian May 3, 2012 at 7:36 pm

To follow up to my previous comment, you actually do log in as root (sudo -s).

My issue was that I was originally copying and pasting your commands, however the dashes on this website are not recognised by the terminal and that’s where I ran into issues, I never logged into root at that point.

Reply

Kevin May 7, 2012 at 6:36 pm

Thank you for this! I followed everything except I used Ubuntu 12.04 LTS and Nagios 3.4. Some where I needed to restart apache because nagios wasn’t coming up.

Reply

Alex June 13, 2012 at 10:26 pm

Thanks, this is the only manual that is clear. It works very well even on ubuntu 12.04 and nagios 3.4.1!

Like Kevin, only a apache restart and voila!

Alex

Reply

Ryan July 12, 2012 at 5:59 am

This guide worked great for me on 12.04 Desktop in VMware with Nagios 3.4.1. I’m trying to get the latest plugins going now but am getting the following error when running make:

make[2]: *** [check_http.o] Error 1
make[2]: Leaving directory `/downloads/nagios-plugins-1.4.16/plugins’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/downloads/nagios-plugins-1.4.16′
make: *** [all] Error 2

Is it possible that the ./configure command needs to be –with-nagios-group=nagioscmd like in the first install?

Reply

Colin July 23, 2012 at 11:13 am

Excellent guide.

Really dug me out of a hole this morning. Thank you.

Reply

sir_desmond July 24, 2012 at 11:56 am

This guide is gooood!!I followed it all through and for the first time in two weeks i’m excited about nagios.
Now i want to download the plugin check_iftraffic.pl and use it on my nagios but I dont seem to get that right.
Any help?

Reply

Alan Lantz July 26, 2012 at 8:04 am

Excellent !!! The only thing I ran into on Ubuntu 12.04 Server was an error about ssl_version undeclared. I installed libssl-dev and reran the configure/make portions. At the very end I also had to restart apache2 before the website was reachable. All minor. The instructions were spot on.

Reply

Duc Doan August 2, 2012 at 5:26 pm

To Ryan:

apt-get install libssl-dev

Hope this works for you, let me know if not.

Reply

Frazzled Penguin August 4, 2012 at 5:53 pm

I had the same issue as Ryan (on Ubuntu 12.04 x64 running in a Xen virtual), and your solution of installing libssl-dev worked!

Out of all the googling that I did you were the only one that I found that suggested to install libssl-dev. I would not have guessed that as the errors and other support was quite vague…

Frazz.

Reply

marcelo September 3, 2012 at 6:19 pm

gracias por eseta enorme gran ayudaaaaaaaaaaaaaaaa increible !

Reply

SPraju September 15, 2012 at 3:40 pm

Hi I want to install nagios in my Organization. Can u please assist me even monitoring tools also in Linux (Ubuntu OS).

Appreciated for your prompt reply

Raj

Reply

David October 3, 2012 at 9:24 pm

Thanks for this tutorial. I was also getting the ‘Return code of 127 is out of bounds – plugin may be missing’ error using the 1.4.16 plugin package. I downloaded and installed the 1.4.15 package and it fixed the issue. Hopefully this helps if anybody else runs into the same problem.

Reply

Bill October 8, 2012 at 7:47 am

Great post, thank you!
Two notes —
1 – as others have noticed, an apache restart is needed after nagios core is installed so that apache will read the newly added nagios.conf file. this will clear up the 404 on first access of /nagios website
2 – as of this note, the latest version of plugins (1.4.16) fails the make unless ssldev is installed. before running config,
apt-get install libssl-dev
will do the trick. i’m sure the nagios plugins team will fix shortly

Reply

Roger February 6, 2013 at 5:08 pm

Awesome tutorial for us Linux idiots!

I just went through step-by-step. Now, when I try to log into the WebGUI, it tells me “This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.”

I know for sure I am using the correct password. Any help is GREATLY appreciated!

Reply

Roger February 6, 2013 at 5:29 pm

^^^^

Nevermind…like I said…i’m an idiot :)

Reply

Jimmy July 17, 2013 at 2:59 pm

When through the above step by step, got stuck at sudo apt-get install libgd2-xpm-dev had to revert to libgdchart-gd2-xpm (im guessing at the time of me doing this the package wasn’t available or was changed). and also needed to restart the apache2 service at the end as the browser couldn’t see it. But I’m “up and running” onto step 2 now.

GREAT GUIDE!

Reply

alex October 11, 2013 at 5:05 pm

Hi your link for the nagios plugin is not good anymore you should replace it by this one
https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz

Btw thanks for this good tuto

see you

Reply

Fletcher April 9, 2014 at 8:58 pm

Tried this against Ubuntu 13.10 server

I had to edit the Makefile for nagios in order to get “make install-webconf” to work. Changing

HTTPD_CONF=/etc/httpd/conf.d

to

HTTPD_CONF=/etc/apache2/conf-enabled

Also in order to get the CGIs to execute instead of Download (when clicking links on the main nagios landing page), I had to do the following

sudo -s
cd /etc/apache2/mods-enabled
ln -s ../mods-available/cgi.load cgi.load
service apache2 restart

Thanks!!

Reply

zainab May 20, 2014 at 1:29 pm

i have a project in nagios i installed nagios-3.5.0 on ubuntu 13.10 but when i tried the commande of make for the nagios-plugins-1.4.16 this probleme appere
make all-recursive
make[1]: Entering directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16′
Making all in gl
make[2]: Entering directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16/gl’
rm -f configmake.h-t && \
{ echo ‘/* DO NOT EDIT! GENERATED AUTOMATICALLY! */’; \
echo ‘#define PREFIX “/usr/local/nagios”‘; \
echo ‘#define EXEC_PREFIX “/usr/local/nagios”‘; \
echo ‘#define BINDIR “/usr/local/nagios/bin”‘; \
echo ‘#define SBINDIR “/usr/local/nagios/sbin”‘; \
echo ‘#define LIBEXECDIR “/usr/local/nagios/libexec”‘; \
echo ‘#define DATAROOTDIR “/usr/local/nagios/share”‘; \
echo ‘#define DATADIR “/usr/local/nagios/share”‘; \
echo ‘#define SYSCONFDIR “/usr/local/nagios/etc”‘; \
echo ‘#define SHAREDSTATEDIR “/usr/local/nagios/com”‘; \
echo ‘#define LOCALSTATEDIR “/usr/local/nagios/var”‘; \
echo ‘#define INCLUDEDIR “/usr/local/nagios/include”‘; \
echo ‘#define OLDINCLUDEDIR “/usr/include”‘; \
echo ‘#define DOCDIR “/usr/local/nagios/share/doc/nagios-plugins”‘; \
echo ‘#define INFODIR “/usr/local/nagios/share/info”‘; \
echo ‘#define HTMLDIR “/usr/local/nagios/share/doc/nagios-plugins”‘; \
echo ‘#define DVIDIR “/usr/local/nagios/share/doc/nagios-plugins”‘; \
echo ‘#define PDFDIR “/usr/local/nagios/share/doc/nagios-plugins”‘; \
echo ‘#define PSDIR “/usr/local/nagios/share/doc/nagios-plugins”‘; \
echo ‘#define LIBDIR “/usr/local/nagios/lib”‘; \
echo ‘#define LISPDIR “”‘; \
echo ‘#define LOCALEDIR “/usr/local/nagios/share/locale”‘; \
echo ‘#define MANDIR “/usr/local/nagios/share/man”‘; \
echo ‘#define MANEXT “”‘; \
echo ‘#define PKGDATADIR “/usr/local/nagios/share/nagios-plugins”‘; \
echo ‘#define PKGINCLUDEDIR “/usr/local/nagios/include/nagios-plugins”‘; \
echo ‘#define PKGLIBDIR “/usr/local/nagios/lib/nagios-plugins”‘; \
echo ‘#define PKGLIBEXECDIR “/usr/local/nagios/libexec/nagios-plugins”‘; \
} | sed ‘/””/d’ > configmake.h-t && \
if test -f configmake.h && cmp configmake.h-t configmake.h > /dev/null; then \
rm -f configmake.h-t; \
else \
rm -f configmake.h; mv configmake.h-t configmake.h; \
fi
make all-recursive
make[3]: Entering directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16/gl’
make[4]: Entering directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16/gl’
gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT localcharset.o -MD -MP -MF .deps/localcharset.Tpo -c -o localcharset.o localcharset.c
In file included from localcharset.c:26:0:
./stdio.h:456:1: error: ‘gets’ undeclared here (not in a function)
_GL_WARN_ON_USE (gets, “gets is a security hole – use fgets instead”);
^
make[4]: *** [localcharset.o] Error 1
make[4]: Leaving directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16/gl’
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16/gl’
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16/gl’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/Downloads/nagios-plugins-1.4.16′
make: *** [all] Error 2
plzzzzzzzzzzz help me i have just 2 days to solve this probleme and if you can reply me in frensh plzzz

Reply

Hayward CX1200RE 120 Sq.Ft. Filter Cartridge for C1200 StarClear Plus Filters June 26, 2014 at 11:16 pm

Whoa! This blog looks just like my old one! It’s on a completely different topic but it has pretty
much the same layout and design. Superb choice of colors!

Reply

Leave a Comment

*

Previous post:

Next post: