Couldn't find remote host in Nagios Master

Dear All,

I installed Nagios 3.x in CentOS5.3 and can login web console with no problem.

I also insalled NSClient++ into a W2k3 server and can be detected in Master monitoring.

However, the Linux monitoring is still unavailable fin the linux guest while I tried reboot serveral times…I suppose maybe something wrong in my configure file, so would like to have posting here to see if soembody could help me…

Master IP: 192.168.1.16
Guest IP: 192.168.1.25

now, check_nrpe can return the version on both Matster and Guest
[nagios-server]#/usr/local/nagios/libexec/check_nrpe -H 192.168.1.16
NRPE v2.12

and I dont’ have changes on /usr/local/nagios/etc/nrpe.cfg (Guest)

In the Master, I cp /usr/local/nagios/etc/objects/localhost.cfg /usr/local/nagios/etc/objects/remotehost.cfg
and vi /usr/local/nagios/etc/objects/remotehost.cfg

but not know how the master still can’t detect the Guest linux in the monioring. emm…
can somebody give me a hand?

define host{ use linux-server host_name test06 alias Remote Host 06 address 192.168.1.25 } define hostgroup{ hostgroup_name linux-servers alias Linux Servers members localhost } define service{ use local-service host_name localhost service_description PING check_command check_ping!100.0,20%!500.0,60% } define service{ use generic-service host_name test06 service_description Root Partition check_command check_nrpe!check_disk } define service{ use generic-service host_name testx06 service_description Current Users check_command check_nrpe!check_users }

Hi Wolfteeth,

When you say “cannot detect”, do you mean that you can’t detect the host, but can detect services from 192.168.1.25?
Based on what you’ve provided, your check_nrpe works for both guest and master.

–Fab

Dear,
can’t detect means in the Nagios web consoel it couldnot find the linux remot host, only have a LOCALHOST machine…
as used check_nrpe, I suspect NRPE is working.

so, not sure or can guide a quick list for configuring the Nagios master + guest?
e.g.

  1. change /usr/local/etc/nagios.cfg and add remotehost.cfg
  2. change remotehost.cfg with adding host, service.
  3. etc…

Hi,
You config file seems fine.
Did you restart your nagios after you performed all the changes?
Remember to use /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
And then, restart your nagios daemon.
Unless you have an error, you should be able to see your remote host

–Fab

[quote=“fabbie”]Hi,
You config file seems fine.
Did you restart your nagios after you performed all the changes?
Remember to use /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
And then, restart your nagios daemon.
Unless you have an error, you should be able to see your remote host

–Fab[/quote]

I changed my remotehost file to below and nagios -v with no problem (No warning and no errors)…but I refreshed serverl times again but still could not find the linux host… (windows host can be found)

my nagios configure file is:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/192_168_1_25.cfg #(I used ip file to define the linux host)
cfg_file=/usr/local/nagios/etc/objects/windows.cfg

you would see there’s no hosts.cfg defined and no services.cfg. I think combined host and service into one file should be also works.

my 192_168_1_25.cfg is:

[code]################ host #################
define host{
host_name test06
alias test06
address 192.168.1.25
check_command check-host-alive
max_check_attempts 5
check_period 24x7
contact_groups admins
}

################ services ################

define service{
host_name test06
service_description check-host-alive
check_command check-host-alive
max_check_attempts 10
normal_check_interval 3
retry_check_interval 2
check_period 24x7
notification_period 24x7
contact_groups admins
}[/code]

then#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
with no errors.
but still no host found…

Hi Wolfteeth,
I noticed in your latest 192_168_1_25.cfg file, you’re not using any template.

[quote=“fabbie”]Hi Wolfteeth,
I noticed in your latest 192_168_1_25.cfg file, you’re not using any template.[/quote]

why template requires? I have point out what host name and what service are requried in the 192_168_1_25.cfg file.
or in above case, what template must be declared?