Help needed in creating configuration files.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ankitsahai
Posts: 5
Joined: Wed Aug 29, 2012 9:01 am

Help needed in creating configuration files.

Post 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.
Attachments
nagios_config_files.zip
Nagios config and error files
(14.76 KiB) Downloaded 82 times
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Help needed in creating configuration files.

Post 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
ankitsahai
Posts: 5
Joined: Wed Aug 29, 2012 9:01 am

Re: Help needed in creating configuration files.

Post 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.
ankitsahai
Posts: 5
Joined: Wed Aug 29, 2012 9:01 am

Re: Help needed in creating configuration files.

Post 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.
Attachments
error-make-nagiosplugins.txt
(5.88 KiB) Downloaded 222 times
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Help needed in creating configuration files.

Post 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
ankitsahai
Posts: 5
Joined: Wed Aug 29, 2012 9:01 am

Re: Help needed in creating configuration files.

Post 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.
ankitsahai
Posts: 5
Joined: Wed Aug 29, 2012 9:01 am

Re: Help needed in creating configuration files.

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Help needed in creating configuration files.

Post by slansing »

Good to hear, thanks for posting back with how it was resolved.
Locked