[SOLVED] Unable to view remote hosts details in Nagios Browser Page
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 2 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Also, the below commands on remote-host (192.168.1.201) are running properly.
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_users
USERS OK - 1 users currently logged in |users=1;5;10;0
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_sda
DISK OK - free space: / 5290 MB (62% inode=94%);| /=3169MB;7136;8028;0;8920
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_total_procs
PROCS OK: 79 processes
[root@ser ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_zombie_procs
PROCS OK: 0 processes with STATE = Z
Now, my problem starts here. Though, as per manuals I have correct entries in my remotehost.cfg, still I am unable to view it in my browser at http://192.168.1.200/nagios/. Please see attached snapshot.
[root@ser ~]# cat /usr/local/nagios/etc/objects/remotehost.cfg
alias Remote Host
service_description Root Partition
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.
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 :-
Error: Service check command 'check_nrpe' specified in service '/dev/sda1 Free Space' for host 'ser.box3.com' not defined anywhere!
Error: Service check command 'check_nrpe' specified in service 'Checking HTTP' for host 'ser.box3.com' not defined anywhere!
Checked 10 services.
I further digged into it and found that I had a misplaced path of commands.cfg, this was not included in the How-To which I was referring.
It was /usr/local/nagios/etc/commands.cfg
instead of /usr/local/nagios/etc/objects/commands.cfg
I am happy man now. 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
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.