Nagios 1.2 Host problem

Hello
I am newbie to Nagios.I have installed nagios1.2 and have it

up and running but not correctly.Well whenever any service is

down i get host as down,which is not correct.Also i have

disabled authentication i.e use_authentication=0 in cgi.cfg

but still while refreshing i get the authenticaton err page

giving me following error

It appears as though you do not have permission to view

information for any of the services you requested…

If you believe this is an error, check the HTTP server

authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration

file.
plz help me out with this

.
Aparna

If it’s complaining about “you are not authorized”, then perhaps enabling authentication would be wise. Now that you have enabled authentication, are you able to login with no trouble. If so, are you able to view the cgi pages? If not, then make sure you have included your login name, as an authorized person. The nagios documents explain all of this in great detail on how to setup apache, setup authentication, etc.

If I have a service check that is “check_ping”, and it fails, then the host check is now performed. usually, and in my case, the host check is “check_host_alive”, which is a ping. So of course, my host check will fail also. I have no way of knowing your service check, or what you have as a host check, so I must believe that nagios is correct, stating your host is down.

Hi
Thanks for your reply
well my check host command (check-host-alive)is check_ping.it shows me
host down even though it is not.I have tried a lot of things but
failed.plz help me out if you can.
Thanks for your help once again

Aparna

run the command by hand, paste it here, and also paste the output. You aren’t giving much info, so this will take forever, unless you give us more to go on.

Hi.
I have installed nagios 1.2.it runs .the problem comes when the service is down it shows me host down.there is check host command in hosts.cfg as check-host-alive .And this is defined in checkcommands.cfg.

it is as follows.

‘check-host-alive’ command definition

define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1

}

so there is problem with check_ping.i tried check_icmp instead of it…but still havng problems

Thanks
Aparna

Hello
I have also tried fping command but still the same problem.Also i cant disable host check coz i will need it.There should be some way when all services are down the host should be shown down at that. time.

Regards
Aparna

Hi.
I have installed nagios 1.2.it runs .the problem comes when the service is down it shows me host down.there is check host command in hosts.cfg as check-host-alive .And this is defined in checkcommands.cfg.

it is as follows.

‘check-host-alive’ command definition

define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1

}

so there is problem with check_ping.i tried check_icmp instead of it…but still havng problems

Thanks
Aparna

[quote=“Aparna”].the problem comes when the service is down it shows me host down.
Aparna[/quote]

That is what is supposed to happen. You have 2 or more threads on this subject, can we stick to just one?

If you have a service defined as “check_ping” and it fails, then of course, the host check will also fail, since it is also going to do a check_ping.

i don’t see why this is hard to understand. if it won’t ping, it wont ping.

Ya u r right about ping.I understand that.what my problem is that whenevr any of the service goes down,it shouldnt show me host down.but i am getting it coz my check host command is check_ping.So i changed it to check_icmp it didnt wrked then i changed it to fping still the same output.I have seen other nagios wrkng and there this problem is not there and also they are using check_ping for their host check command.
Can u help me out with this

Aparna

What is the service check that fails. How do you know the host is not down? What is the output from the service check and the host check? Paste it here.

I have services configured SMTP,HTTP,FTP,POP3.if ne of these fails my host is shown down.my host information is as follows

Host Status: DOWN
Status Information: /bin/ping -n -U -c 5 HOSTADDRESS
Last Status Check: 04-22-2005 23:11:32
Status Data Age: 0d 0h 0m 47s
Last State Change: 04-22-2005 07:51:42
Current State Duration: 0d 15h 20m 37s
Last Host Notification: 04-22-2005 07:51:42
Current Notification Number: 1
Is This Host Flapping? NO
Percent State Change: 0.00%
In Scheduled Downtime? NO
Last Update: 04-22-2005 23:12:07

ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
that is what your cgi.cfg file should look like, unless you have ping somewhere else. Do a
which ping
to find it.

define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
}
define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2
}
That is what your checkcommands.cfg should look like.

check_command check-host-alive
That should be defined for every host in hosts.cfg. Use the template, it makes it easier.

Execute the check_host_alive command by hand and paste the output here. Login as nagios user first.

Hi
I have made tried this also but no lucj.dont know where m i going wrong?
Thanks for your continous help
Aparna

I pasted my configs to see if yours where the same, but I see nothing from your configs. I can’t help, since we aren’t sharing information any longer, by the looks of it.

hello
My configs are same as you pasted.There is no difference,but still i am facing this Prob
newazs thanks a lot for your help
Aparna

"Host Status: DOWN
Status Information: /bin/ping -n -U -c 5 HOSTADDRESS"
Try recompiling and installing the plugins. The output of this “host check” isn’t what we expect to see. It would be nice to see you paste the output of the host check when you run it by hand.

hey thanks
but i got i solution.
I installed the rpm package and it worked fine.
thnks
:slight_smile:
Aparna

rpm packages are good solution.