Unable to view remote hosts details in Nagios Browser Page
1 Attachment(s)
Dear All,
I am new to Nagios and I have configured Nagios Server and Client on my RHEL 5.4 machines using these links and help html files in tar balls. http://www.thegeekstuff.com/2008/05/...configuration/ http://www.thegeekstuff.com/2008/06/...ing-nagios-30/ I have this scenario. Nagios Server - 192.168.1.200 Nagios Client - 192.168.1.201 (This is the remote-host I am trying to monitor) I firmly believe I have at least configured it right as this command on Nagios Server does not show any errors. /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Code:
[root@ser ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Also, my addone nrpe daemon is working correctly as I am able to run the below command succesfully. Code:
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.201 Code:
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_users Code:
[root@ser ~]# cat /usr/local/nagios/etc/objects/remotehost.cfg |
I always love to see people starting to use Nagios. With all the available plugins and addons, there isn't much you can't do with it. I should probably try using NRPE sometime as I've always done most of my checks using the Check By SSH plugin.
Anyway, on to your problem. I always like to try the simple things first, so with that in mind, have you added a cfg_file=/etc/nagios/objects/remotehost.cfg entry to /etc/nagios/nagios.cfg? Or if you're going to be dumping most of your config files into the /etc/nagios/objects directory you could just add a line like cfg_dir=/etc/nagios/objects to nagios.cfg. Without one of these entries, Nagios won't know it's supposed to process your remotehost.cfg file and will just ignore it. Just something to check. If you already have that in place, we can try something else. EDIT: The directories I mentioned above will probably be /usr/local/nagios/etc for you instead of just /etc, so hopefully that won't create too much confusion. |
1 Attachment(s)
Quote:
Quote:
This was the problem. I have added this line cfg_file=/usr/local/nagios/etc/objects/remotehost.cfg to /usr/local/nagios/etc/nagios.cfg I am now can see my remote host (192.168.1.201 ser.box3.com). Please see attached pic. :) But, the problem is that I cannot see other details or checks I have done for this remotehost except the critical alerts like server is UP or DOWN. Actually, I have tested it by creating the below service /usr/local/nagios/etc/objects/remotehost.cfg on Nagios Server (192.168.1.200) Code:
define service{ Code:
command[check_sda1]=/usr/local/nagios/libexec/check_disk -w 97% -c 98% -p /dev/sda1 Code:
[root@ser ~]# hostname Any ideas brother ? |
Mission Accomplished
Hi Kforbus,
I am glad to tell you that finally I have made it working, though it took me few hours. :) Well, the problem was with my commands.cfg. I just reconfigured it and tried running /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg This was giving me the below errors :- Code:
Error: Service check command 'check_nrpe' specified in service '/dev/sda1 Free Space' for host 'ser.box3.com' not defined anywhere! It was /usr/local/nagios/etc/commands.cfg instead of /usr/local/nagios/etc/objects/commands.cfg I am happy man now.:D Many thanks for your time and help. Now, I will further dig more options of it, Will trouble you again if I will get stuck somewhere :) |
And now I also understood what check_by_ssh plugin you were talking about. :)
It works somewhat like this. Code:
[root@ser ~]# /usr/local/nagios/libexec/check_procs -w 2:6 -c 2:1024 -C mingetty |
Hey, I'm glad you got your problem figured out. And yes, it was the check_by_ssh plugin I was referring to in my earlier comment. I like it because it is pretty easy to setup on the remote machines -- just add a nagios user, create public/private keys, and add whatever plugins you want to run. In retrospect, setting up NRPE is probably just as easy if not easier, but everybody has their own way of doing things. Well, good luck to you and I hope you enjoy Nagios.
|
I also find check_by_ssh pretty easy :)
|
All times are GMT -5. The time now is 06:09 AM. |