Another newbie question...

Marcel Mitsuto Fucatu Sugano msugano at uolinc.com
Tue Sep 19 22:50:09 CEST 2006


Hello there...

On Tue, 2006-09-19 at 15:33 -0400, Neil B. Cohen wrote:
> I seem to have gotten Nagios configured and running on a single Linux
> host. Now I want to try monitoring a second host on the same network
> (I'm experimenting with a couple of machines at home) and I'm having
> some problems. I've been looking through the documentation, but either
> I'm looking in the wrong place or at the wrong docs.

Fair enough...

> I have a number of questions - scattered through the rest of this
> message. Any help or pointers would be appreciated...
> 
> 
> On the primary monitoring machine (referred to as 'localhost' or
> 'host1'), I added host definitions that include the 'remote' machine
> (referred to as 'host2' in the rest of this message). So my file
> hosts.cfg includes this:
> 
> define host{
>         use                     generic-host            ; Name of host
> template to use
>         host_name               localhost
>         alias                   localhost
>         address                 127.0.0.1
>         check_command           check-host-alive
>         max_check_attempts      10
>         check_period            24x7
>         notification_interval   120
>         notification_period     24x7
>         notification_options    d,r
>         contact_groups  admins
>         }
> 
> define host{
>         use                     generic-host            ; Name of host
> template to use
>         host_name               host2.aikisoft.com
>         alias                   host2
>         address                 192.168.130.111
>         max_check_attempts      10
>         check_period            24x7
>         notification_interval   120
>         notification_period     24x7
>         notification_options    d,r
>         contact_groups  admins
>         }
> 
> Question #1:
>    In the host definition for 'host2', should I include the
> check-host-alive command like I have in host 1? Why, or why not - I'm
> not sure I understand exactly what I'm defining here....

The check-host-alive command, defined in localhost's object definitions,
is the command that Nagios will issue if any service check returns with
any non-OK state. Then, if nagios is running and not complained about
missing definitions, you don't need to set a host-check-command.

> I set up an NSCA daemon process on host 1 to receive status information
> from host 2. However, I'm not sure how to configure host2 itself. I have
> Nagios installed there, and I have a basic configuration. I can start
> nagios running, but I don't see how to get the NSCA client to run the
> various tests and forward results to host 1.

Here is where i think you are misunderstanding. As NSCA is able to
expect service check results from another Nagios server, we used to use
the NSCA daemon in a distributed monitoring environment. So if you are
monitoring host2, you don't actually need to run Nagios there, althought
you might, but it isn't the "elegant" way to do it. You should think
about running NRPE, or any client that will serve as the host2
information server for Nagios to connect to and gather all the info you
need. Take a look at the check-by-ssh plugin also.

> 
> Question #2:
>    Does Nagios need to be running on host 2 or just the NSCA client?

Neither. Nagios shoulg run only on the host1, and it will poll the nrpe
daemon to run local plugins, or connect to a daemon like netsaint_statd,
or running local plugins by connecting through ssh, or whatever. Only if
there are security constraints of active polling you should then think
about passive monitoring. That also does not need Nagios to be running
on all monitored hosts.

> Question #3:
>    Is there documentation on NSCA? I found some minimal things, but not
> enough for me to figure out what is really going on.

Like i've said, NSCA is used to setup a distributed monitorign
environment.

> The way my system is running, host1 thinks it has 2 hosts to monitor,
> and it is using PING to decide that both are alive - that's the good
> news. But I would like to also report on CPU utilization, disk space etc
> from host 2, and that's where I seem to be stuck.

To monitor other resources, you should use NRPE or check-by-ssh, or any
other daemon available to be polled by nagios plugins and gather info
that is relevant to you.

> Sorry if this is long and confusing - I'm definitely confused :)

With time and patience you should get through all the way of
understanding all concepts. But you should really read the docs over and
over.

> Thanks in advance for any pointers you can give me. If I need to provide
> other config info, I'll be happy to do that.

Hope that helps.

> nbc

Marcel.


AVISO: A informação contida neste e-mail, bem como em qualquer de seus anexos, é CONFIDENCIAL e destinada ao uso exclusivo do(s) destinatário(s) acima referido(s), podendo conter informações sigilosas e/ou legalmente protegidas. Caso você não seja o destinatário desta mensagem, informamos que qualquer divulgação, distribuição ou cópia deste e-mail e/ou de qualquer de seus anexos é absolutamente proibida. Solicitamos que o remetente seja comunicado imediatamente, respondendo esta mensagem, e que o original desta mensagem e de seus anexos, bem como toda e qualquer cópia e/ou impressão realizada a partir destes, sejam permanentemente apagados e/ou destruídos. Informações adicionais sobre nossa empresa podem ser obtidas no site http://sobre.uol.com.br/.

NOTICE: The information contained in this e-mail and any attachments thereto is CONFIDENTIAL and is intended only for use by the recipient named herein and may contain legally privileged and/or secret information. If you are not the e-mail´s intended recipient, you are hereby notified that any dissemination, distribution or copy of this e-mail, and/or any attachments thereto, is strictly prohibited. Please immediately notify the sender replying to the above mentioned e-mail address, and permanently delete and/or destroy the original and any copy of this e-mail and/or its attachments, as well as any printout thereof. Additional information about our company may be obtained through the site http://www.uol.com.br/ir/.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list