Saturday, June 16, 2012

Install Nagios 3 on Ubuntu Server 12.04 with a Script

Nagios is a popular Open Source Computer System and Network Monitoring software application. With this tool, you can monitor your entire IT infrastructure, spot problems before they occur, know immediately when problem arise, and more. Here are two new scripts that you can use for easy Nagios installation on Ubuntu Server 12.04.  

  1. Copy and Paste the script below into a Text Editor  e.g  Kate
  2. Save it in the Home folder as
  3. Open Terminal
  4. Type sudo su, then press Enter
  5. Type you password, then press Enter
  6. Type  chmod  +x, then press Enter
  7. Type ./, then press Enter. The installation begins
  8. You should just enter the password for user of Nagios

Nagios Script:

If you end up in the terminal you see warning:0 and error:0. Congratulation! you'll be ready to start  your network monitor.
  • Open your browser, in the address bar type "localhost / nagios /", and then press Enter
  • Type Nagios username: nagiosadmin
  • Type Nagios username password: "this is what you defined when you entered some password in the script"


  1. hi
    the posts made by you on nagios works like charm.
    i made most use of these posts. can you make a post on how to monitor linux host using nagios

    1. Ok, I'll post "how to monitor Linux host using Nagios" in the next weeks.
      Thank you for you comment.

  2. thanks for the reply. will wait for the post. we use ubuntu on our servers.

  3. Hi, thanks a lot for the post.
    Now, i have 1 problem...
    What can I do if
    --2013-04-10 15:18:41-- (try: 6)
    Connecting to (||:80...

    that's happend, again and again...
    Please, if ypu can help me, I really appreciate it
    Thanks again.


    1. Hi Fabrizio,
      I configured nagios plugins and nrpe plugin. Also i can monitor publically available services on the test machine.

      What i understood from here is you are trying to download the nagios plugin file. i downloaded the nagios plugin and nrpe through browser and configured them.
      This will work as i did the same.


    2. Thanks Nagarjun, do you have the link for download nagios and plugins?

      Fabrizio A.

    3. Hi Fabrizio,
      I made ​​a test of the links that are in the script for Nagios and Nagios Plugins download, they work perfectly. I think you should run this script with administrator privileges.

      Thank you,

  4. Thanks to all!
    It's works :D

    The best and Sincerily Regards
    Fabrizio A.

  5. HI ,
    Its not working localhost/nagios / .

    1. What error you receive when trying to open the browser localhost/nagios/?

  6. HI,
    Not Found
    The requested URL was not found on this server.

    AOLserver/4.5.1 on http://localhost/

  7. I made ​​a test after Nagios installation for "http://localhost/nagios", this links work perfectly in a browser of Ubuntu Server 12.04

  8. No sir same things , once below see i sending terminal error

    sudo make install-webconf
    /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
    /usr/bin/install: cannot create regular file `/etc/httpd/conf.d/nagios.conf': No such file or directory
    make: *** [install-webconf] Error 1

    1. ok, create the folders manually
      Open terminal as "root user"
      ~$ sudo mkdir /etc/httpd "Press Enter Key"
      ~$ sudo mkdir /etc/httpd/conf.d "Press Enter Key"
      ~$ sudo mkdir /etc/httpd/conf.d/nagios.conf "Press Enter Key"
      ~$ sudo make install-webconf "Press Enter Key"

  9. dear sir ,
    i have installed nagios using quick guide. installed successfully and also added my windows server in /usr/local/nagios/etc/objects to monitor services. after i finished and open web page of my nagios i get an error

    C:\ Drive Space

    CRITICAL 08-09-2013 12:51:25 1d 19h 32m 5s 3/3 (Return code of 127 is out of bounds - plugin may be missing

    i am using ubuntu 12.04 lts desktop ver.

  10. Go to the below link,

    After do the steps, restart Nagios and try again.