At the time of this writing the latest version of Nagios is 3.3.1. I am running Ubuntu 10.04 and have used apt-get update; apt-get install nagios3 to end up with version 3.2.0.

I know there are a lot of instructions out there for manually compiling and installing the latest version of Nagios, but is there a way that I can have use apt-get to do it - perhaps editing the /etc/apt/sources.list file or something like that?


It's been a little while since I asked this question, now I'm using Ubuntu 12.04 instead of 10.04 but I'm disappointed to report that an older version of Nagios (3.2.3) is loaded on the system instead of the current release (3.4.1) if you use the apt-get install method.

I've opened a bounty hoping for more information. Please see the notes below in the bounty block.

  • 1
    This is the Debian way: old software is better than new software. If you want up to date install from source or create your own PPA. Jul 26, 2012 at 7:13
  • 1
    packages.ubuntu.com/… lists 3.4 in quantal. the build requirements don't see onerous. You could just backport it. As normal, if you want to see these packages as available on your system add the appropriate deb/deb-src lines to your sources,list (with an appropriate preference stanza to stop your system from upgrading), update, and then look at apt-cache policy nagios3, Then run apt-get source nagios3 for the version you want, and do the usual backporting procedure. Jul 27, 2012 at 0:39

6 Answers 6


3.3 is not currently in Ubuntu it seems. The most recent version is still 3.2. One thing you can do is package it yourself. This is (probably) not difficult. Here is an outline of how you could go about it.

  1. Download 3.3 sources from the Nagios site or wherever.

  2. Download Ubuntu sources for 3.2 or whatever version you have available

     apt-get source nagios3
  3. Copy the debian directory from the unpacked sources directory of the Ubuntu
    nagios3 sources.

  4. Modify debian/rules and debian/control and possibly other files as necessary.

  5. Install build dependencies

    apt-get build-dep nagios3
  6. Compile the package. I use

    debuild binary

    which uses the package devscripts.If patches have been applied to the original
    source, you will need to refresh them against the new source. If there are
    patches, and they don't apply to the new source, you'll see errors here.

  • Hey @Faheem Mitha, Thanks for the answer, and your recent comment. What should I google for when trying to learn how to "Modify debian/rules and debian/control and possibly other files as necessary." ?
    – cwd
    Jul 27, 2012 at 17:33
  • 1
    @cwd: If you get the 3.4 version from quantal, you don't need to modify anything much. Just install the build dependencies and build the package. I'd get the quantal version sources as a first step. In any case, the usual starting point for information on Debian packaging is Debian New Maintainers' Guide Jul 27, 2012 at 18:13

Usually, large software projects have a PPA which contains updated packages. Unfortunately, Nagios Inc. do not seem to update their PPA with the most recent packages. If they did, you would just be able to add this repository with add-apt-repository and it would update automatically with other software updates.


Two immediate possibilities come to mind:

  1. Debian has nagios3 3.4.1-2 in sid. You could download the debianised sources and rebuild for ubuntu. Either install with 'dpkg -i' or create your own local repository (or make a ppa on launchpad). You'll have to repeat this every time you want to update.

  2. Icinga is a fork of Nagios intended to work around problems related to the tensions between the for-profit nature of Nagios Inc and the open source nature of the software. It may be worth evaluating as an alternative to Nagios.

    There is also Shinken, a nagios-compatible redesign/rewrite of the core ideas behind Nagios. I only just discovered this but it looks very good, I'm going to have to spend some time to evaluate it properly.

Apt Pinning

The simplest way to configure apt to install nagios packages from quantal but everything else from precise is to

  • add the quantal repo to /etc/apt/sources.list or to a file in /etc/apt/sources.list.d/

  • edit /etc/apt/apt.conf or add a file in /etc/apt/apt.conf.d/ that has:
    APT::Default-Release "precise";

  • add a file called nagios to /etc/apt/preferences.d/ containing:

Package: nagios*
Pin: release quantal
Pin-Priority: 1000
  • Always check what an upgrade is going to do by running apt-get or aptitude with -d or --download-only first. The -V option to show version details is also useful here.

    This is especially important when the example I've given hasn't actually been tested with ubuntu release names, merely adapted from what I do with Debian for testing/sid/experimental packages (I mostly use debian rather than ubuntu)....in principle, it should work. in practice, it may require a little tweaking to get just right.

See the man page for apt_preferences for more details.

  • I just noticed that Faheem M pointed out nagios 3.4 is in quantal - it's probably better to either install the packages directly from there (add the quantal repos to sources.list and use apt preferences to make sure only nagios3 and related packages get updated from quantal) or get the ubuntu sources from quantal and rebuild for precise.
    – cas
    Jul 29, 2012 at 2:01
  • Thanks @Craig Sanders - can you give an example of how to use apt preferences to make sure only nagios3 and related packages get updated from quantal ?
    – cwd
    Jul 29, 2012 at 3:06

Nagios3 is not the same as Nagios Core. Ubuntu maintains the Nagios3 package and it's a modified version of Nagios Core, with virtually no documentation to speak of. As far as the private Nagios PPA, that is not the place to acquire Nagios, only the NRPE agent that is specifically for Ubuntu. For the latest official version of Nagios Core, go to www.nagios.org and we (Nagios Entperises) recommend always installing from source for Nagios, that way the Nagios Core documentation will be consistent with your install.

  • 1
    "Our software is so special it deserves to be separate from the rest of the system's software management tools"
    – cas
    Jul 29, 2012 at 1:54

After doing a bit of research on how to get the latest Nagios 3.4.1 download for you, I found this code that might help you:

sudo –s

mkdir downloads

cd downloads

wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.4.1/nagios-3.4.1.tar.gz/download

tar –zxvf nagios-3.4.1.tar.gz

I understand you were wanting to use apt-get to get it, as that is probably the easiest way to get it. But as ysangkok said: "Unfortunately, Nagios Inc. do not seem to update their PPA with the most recent packages."

Please let me know hoe you get on.


  • Why a downvote? I know, for myself, if I need a file on my OS, I will do anything to get it installed. Please explain to me why this was downvoted? I don't understand.
    – Kevdog777
    Jul 26, 2012 at 9:50
  • 2
    I did not downvote you but it does seem that you haven't answered the questions posed for the bounty nor the original question. I appreciate the link so I will give you an upvote, but your answer would be more useful, say, if you published the exact commands needed to produce @Faheem Mitha's solution of creating a package. I'm a little unclear on how to do his Modify debian/rules and debian/control and possibly other files as necessary. step...
    – cwd
    Jul 26, 2012 at 14:51
  • Thanks @cwd, but honestly, I wasn't necessarily going for the bounty, just giving my answer, as I thought (well I'm working on Ubunutu) I might try to help out. Sorry I missed the question, I thought I understood it. I hope you have it sorted out soon mate.
    – Kevdog777
    Jul 26, 2012 at 15:50

Normally official repositories do not have last versions of any software. Community need to test each version of each software and they do it gradually. For instance, in Ubuntu 12.04 Boost libraries are available in version 1.48 and there are 1.49 and 1.50 in official stable release. It is common not to find latest versions in official repositories.

You can always try to find an alternative PPA repository that contains your desired software version, but I have not found any for 3.4 version.

Furthermore you can install any software from original place or even compile it yourself from sources. It is a little bit more complicated, but it should be possible.

  • On the other hand, the version in the PPA is now 2+ years and 3 point revisions out of date.
    – Magellan
    Sep 10, 2013 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .