Page 1 of 1

Help needed in creating configuration files.

Posted: Thu Aug 30, 2012 10:32 am
by ankitsahai
I have installed Nagios-3.4.1 and nagios-plugins-1.4 on RHEL5-32bit.

Now I want to monitor public services like httpd or sshd of a remote server using nagios.

What changes I have to made and where, kindly help in creating configuration files.

As per my understanding after reading the online documentation for" Monitoring Publicly Available Services",
I have created /usr/local/nagios/etc/servers (a new directory) directory and created commands.cfg, remotepc.cfg and templates.cfg files in that directory for the remote host.

I am attaching the various config. files on the post as well.

As a fresher in NAGIOS, I need your guidance and support.

Re: Help needed in creating configuration files.

Posted: Thu Aug 30, 2012 5:26 pm
by jsmurphy
Which documentation did you read? You are waaaaaay off the mark.

The commands.cfg, resources.cfg and templates.cfg rarely need to be duplicated and definitely not for this purpose. There's a detailed guide to doing ssh and http monitoring in the Nagios core documentation, assuming that wasn't the guide you already read: http://nagios.sourceforge.net/docs/nagi ... vices.html

Re: Help needed in creating configuration files.

Posted: Fri Aug 31, 2012 9:28 am
by ankitsahai
Thanks for the link.

I am able to configure nagios to monitor ftp and ssh services of a remote linux machine.

Configuration verification also completed successfully using command:

"/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg"

Now I am able to see my hostname and the two sevices in the webpage http://localhost/nagios.

But in the Status Information, it shows : "Return code of 127 is out of bopunds - plugin may be missing".

Please suggest.

Re: Help needed in creating configuration files.

Posted: Fri Aug 31, 2012 9:51 am
by ankitsahai
When I ran "make" command while Compiling and installing the nagios plugins, I received some error. I think due to this only I am getting problem while viewing the service status as I mentioned in my last post.

PFA file having output and error of the same.

Re: Help needed in creating configuration files.

Posted: Fri Aug 31, 2012 11:22 am
by slansing
Did you attempt to install and configure the Nagios Pluigins package before trying to use Nagios?

As outlined in one of the Nagios quickstart guides:

http://nagios.sourceforge.net/docs/3_0/ ... edora.html

Re: Help needed in creating configuration files.

Posted: Fri Aug 31, 2012 10:18 pm
by ankitsahai
Earlier I ignored the error I got while installing nagios-plugins due to which now I am getting the error 127-plugins not installed.

I checked and found that libexec directory is empty.

I have attached the error that I am getting while compiling and installing nagios-plugins in my previous post, it's related to openssl.

Please suggest the workaround for this.

Re: Help needed in creating configuration files.

Posted: Sun Sep 02, 2012 1:56 am
by ankitsahai
Hurray, the bug is fixed and I started monitoring my local machine using NAGIOS.. :D :D :D

Installing openssl-devel in RHEL-5 has fixed the issue for me ERROR : Return Code of 127 is out of bounds - plugins may be missing)

Thanks to all for their inputs.

Re: Help needed in creating configuration files.

Posted: Tue Sep 04, 2012 1:13 pm
by slansing
Good to hear, thanks for posting back with how it was resolved.