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.
Who is Participating?
Chris WongConnect With a Mentor Commented:
Daniel HelgenbergerCommented:
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
	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:

And, if this is a new deployment, save yourself some cumbersome work with plain text configs and give Nconf a try:
gumball60Author Commented:
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
[root@centos-rhel etc]# ls
cgi.cfg  cgi.cfg~  htpasswd.users  nagios.cfg  nagios.cfg~  nrpe.cfg  objects  resource.cfg  resource.cfg~
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

gumball60Author Commented:
hkchris...I have already installed and configured nagios/nrpe.....see previous responses.....Thanks for your input.
Chris WongCommented:
Please read “Now adding web-node01 in nagios server so that we could monitor the server's services.” section...
Daniel HelgenbergerCommented:
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:

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.