Add

How to install and configure Nagios on Ubuntu 9.04


Nagios is a good open source tool for monitoring network components and services. It Can be configured to send alerts by e-mail

That given the new version (3) Can be found in repositories, installation is much easier now, using apt-get:

sudo apt-get install nagios3

Checking the installation:

nagios3 sudo-v nagios.cfg

This is how the testing should look like:

Nagios 3.0.6

Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)

Last Modified: 01/12/2008

License: GPL

Reading configuration on ...

Running pre-flight check on configuration on ...

Checking services ...

Checked 7 services.

Checking hosts ...

Checked two hosts.

Checking host groups ...

Checked 5 host groups.

Checking service groups ...

Checked 0 service groups.

Checking contacts ...

Checked two contacts.

Checking contact groups ...

Checked a 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 150 commands.

Checking Time Periods ...

Checked 4 time Periods.

Checking for circular paths between hosts ...

Checking for circular host and service dependencies ...

Checking global event handlers ...

Obsessive compulsive processor commands ... Checking

Checking misc settings ...

Total Warnings: 0

Total Errors: 0

Things look okay - No Serious Problems Were Detected During the pre-flight check

Everything should Be OK. That errors may occur is in most Cases Because of permissions.

Now we have to add the user for Nagios (before that, the you have to get to / etc/nagios3):

cd / etc/nagios3

sudo htpasswd-c htpasswd.users Nagios

Must enter the password for the new user Twice:

New password:

Re-type new password:

Adding password for user Nagios

At this point, Nagios Web interface Can be accessed by:.

http://localhost/nagios3/

or, http://IP/nagios3/

nagios-overview

Now You Can configure Nagios. Configuration file resides in / etc/nagios3/nagios.cfg. The rest of the files Which allow various configurations is found in conf.d. In contacts_nagios2.cfg file the email account you CAN set the alerts will be sent WHERE to:

gedit contacts_nagios2.cfg

define contact {

contact_name alex

alias Nagios Admin

service_notification_period 24 × 7

host_notification_period 24 × 7

service_notification_options w, u, c, r

host_notification_options d, r

service_notification_commands notify-service-by-email

host_notification_commands notify-host-by-email

email alex@domain.com

}

E-mails will be sent to alex@domain.com.

Each Must Be Added to contactgroup contact:

contactgroup define {

contactgroup_name admins

alias Nagios Administrators

members alex

}

Adding the new user to Nagios group:

useradd-m-G Nagios alex

passwd alex

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated Successfully

In the web interface you may Receive the Following message:

It appears as though you do note have permission to view information for Any of the services you Requested ...

In this case you have to edit cgi.cfg:

sudo gedit cgi.cfg

In this file change tissue lines:

authorized_for_system_information = Nagios

authorized_for_configuration_information = Nagios

authorized_for_system_commands = Nagios

authorized_for_all_services = Nagios

authorized_for_all_hosts = Nagios

authorized_for_all_service_commands = Nagios

authorized_for_all_host_commands = Nagios

, Where "Nagios" That is the user HAS installed Nagios.

If you used this tutorial or have Any questions, feel free to leave a comment Below. You Can Also rate this tutorial to let me know how I'm doing. Thanks! :)

nagios-host-detail nagios-service-detail

1 Star2 Stars3 Stars4 Stars5 Stars (19 votes, average: 5.00 out of 5)
Loading ... Loading ...

The Discussion

see what everyone is Saying

  • Firefox Addon: Nagios July 13th, 2009 at 2:38 p.m. # 1

    [...] Use this addon, Nagios obviously need to be installed. No [...]

  • Adrian July 30th, 2009 at 11:06 # 2

    Very good tutorial. There are plenty of tutorials for installing Nagios on the net, but with your tutorial and I've managed to put up Nagios.
    Thanks!

  • admin July 30th, 2009 at 12:35 # 3

    @ Adrian: I'm glad you helped. The autors try to post more tutorials about different.

  • Raul Molnar August 5th, 2009 at 11:23 # 4

    mee too :)

  • BFC August 17th, 2009 at 1:15 # 5

    I sincerely doubt that will go about ceva.dar ... to my amazement .. tutorial is a very well explained and ptr unaware ...
    I'm one of them and I want to thank you.
    if you can come up with a little help and meaning mysql management settings and possibly on how to "work" with him broswer + some php admin would already be all you can say about webhosting.
    Many thanks again

  • admin August 18th, 2009 at 11:03 # 6

    @ BFC
    I'm glad the tutorial helped you - know that all tutorials / methods presented here are tested, so as to not have much work. :)
    Of course I want to make many more tutorials, possibly to complete something for the existing, but have very little time for me to take care of it.
    I do not understand what you mean when you say "help in the sense mysql and php admin" - an installation guide for this?
    Thanks for comment and you wait here. :)

  • Armanca October 1st, 2009 at 9:43 p.m. # 7

    Seems to Be a clean tutorial. I'll Give it a try!

  • admin October 1st, 2009 at 9:46 p.m. # 8

    @ Armanca: Please try it and let me know if you encounter Any problems.

  • Dewa November 11th, 2009 at 5:38 # 9

    thank you very much .. this article really helps me a lot ..

  • SEWilco May 13th, 2010 at 7:29 p.m. # 10

    Would Be nice to know WHERE the check_command definitions for all the plugins Resid. Does not include check_http commands.cfg Ubuntu's, so it apparent what's note Can be used as check_http! Foo

  • Rajnish Kumar August 5th, 2010 at 7:36 # 11

    Hi,
    I want to add multiple Windows server to monitor for Nagios, please help how it's Possible.
    i am not understand how I Will Able to add multiple windows machine in windows.cfg file, When I am changing host_name alias name and THEN do not start Nagios services and getting error please check configuration file.
    Please Help me.
    Thanks
    Rajnish

  • Ali November 7th, 2010 at 4:41 p.m. # 12

    awesome!

  • tcpdump November 15th, 2010 at 3:06 p.m. # 13

    Hello,

    Also I faced the error "It appears as though you do note have permission to view information for Any
    of the services you Requested ... "

    Solution for me WAS service_description changing.
    I was using "NSClient + + - Version" .... After changing to "NSClient - Version" the error disappeared.

    Could this help Someone else maybe.

    Regards, tcpdump

  • admin December 8th, 2010 at 4:54 p.m. # 14

    Thank you all for your comments. As I was busy latelly, I haven't answer to your posts. I hope you understand this.

    Cheers,
    Alex

  • Mauricio Gonçalves November 11th, 2011 at 5:59 p.m. # 15

    Boa tarde,

    I add novo amigo nao consigo user Podere ajudar me?
    They pride nao é que a commando Valido

    e quando nao tento acessar via web acess.

    obrigado.

  • admin November 11th, 2011 at 7:56 p.m. # 16

    Amigo,

    Please formulated your question in english if you really need help!

    Cheers!

  • Gilgit Baltistan March 8th, 2012 at 2:34 p.m. # 17

    good work here

Respond

get in on the action.

* Required

Rumanian flagItalian flagEnglish flagGerman flagFrench flagSpanish flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagSwedish flagNorwegian flagSerbian flagSlovenian flagUkrainian flagTurkish flagHungarian flag
By N2H

Random Posts Recent Comments

  • Gilgit Baltistan Says:

    good work here ...

  • Cromartie Haynes Says:

    I found the tutorial to Be concise and very helpful. I will be sure to recommend it to others. Than ...

  • admin Says:

    Amigo, Please formulated your question in english if you really need help! Cheers! ...

  • Mauricio Gonçalves Says:

    Boa tarde, I nao consigo Amigo add user novo Podere ajudar me? They pride nao é que a commando ...

  • Aniket Says:

    thanks ..................

  • Eitan Says:

    Thanks for sharing. This article is the most practicable for bind! Cheers, Eitan ...

  • Flossy Says:

    Zubao0 That's really thinking out of the box. Thanks! ...

  • Michael Esch Says:

    I used this tutorial to install Komodo Edit 6 on Ubuntu 10.10, I rate your tutorial 5/5 I hope that ...

  • admin Says:

    @ Dan I run applications created in Visual Basic and fox in the wine, so I would not be ...

  • dan Says:

    I want to tell me if a prg to count as Visual Basic running under Ubuntu with wine inscribed wonder ...

Tag Cloud