Link to home
Start Free TrialLog in
Avatar of gumball60
gumball60Flag for United States of America

asked on

REd Hat 6.4 Nagios/NRPE Adding remote hosts/clients

How do you add host/clients to Nagios 3.5 on Red Hat 6.4 to monitor.  I have already installed Nagios w/NRPE?  I will be monitoring Linux, Windows, and other various network devices. Please provide example of which file to edit.
Avatar of Member_2_6582184
Member_2_6582184
Flag of Germany image

You need to edit the config files of nagios. There you need to define a host first. This is a basic host:
define host{
	host_name			sample-host
	alias				sample host
	address				192.168.1.20
	parents				switch-core
	check_command			check-host-alive
	check_interval			5
	retry_interval			1
	max_check_attempts		5
	check_period			24x7
	process_perf_data		0
	contact_groups			admins
	notification_interval		30
	notification_period		24x7
	notification_options		d,u,r
	}

Open in new window


Then you would need to add services and check commands for this host.
I think it is outside of this post to get into that details.

Please read Nagios Object Definitions:
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html

And, if this is a new deployment, save yourself some cumbersome work with plain text configs and give Nconf a try:
http://www.nconf.org
Avatar of gumball60

ASKER

Which config file should I edit and where...nagios.cfg, cgi.cfg, etc?
i.e. I will try monitoring a file server first...

[root@centos-rhel etc]# pwd
/usr/local/nagios/etc
[root@centos-rhel etc]# ls
cgi.cfg  cgi.cfg~  htpasswd.users  nagios.cfg  nagios.cfg~  nrpe.cfg  objects  resource.cfg  resource.cfg~
ASKER CERTIFIED SOLUTION
Avatar of Chris Wong
Chris Wong
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hkchris...I have already installed and configured nagios/nrpe.....see previous responses.....Thanks for your input.
Please read “Now adding web-node01 in nagios server so that we could monitor the server's services.” section...
The config files you can use are listed in your /etc/nagios/nagios.cfg
If you haven't touched this, there will be a host.cfg, services.cfg, checkcommands.cfg in objects:
http://nagios.sourceforge.net/docs/3_0/configmain.html

Also, it seems you have installed nagios from the source. Though possible, I would always recommend installing nagios from rpms/repos - since you get updates this way and all the config files will be at the default place for RHEL/centos.

You can find nagios in the epel as well as rpmforge repos. The rpmforge will have newer versions while the epel is considered better because it is run by RH.