Page 1 of 1

How do i add a host to be monitored by Nagios?

Posted: Fri Feb 21, 2014 12:38 pm
by billperrotta
New to nagios not sure if I can add a host through the webmin or do I have to do it at command line?

I am new to nagios step by step please.

Re: How do i add a host to be monitored by Nagios?

Posted: Fri Feb 21, 2014 1:02 pm
by slansing
You would need access to a Nagios Core, or Nagios XI system to add a new host, you cannot do this from Nagios Fusion.

Re: How do i add a host to be monitored by Nagios?

Posted: Fri Feb 21, 2014 1:53 pm
by billperrotta
Which one is free? the admin who left added hosts and he used this box.
Also how is this done? vi remotehosts.cfg? where is the file located I'm using open suse 12.3 and it isn't in Does anyone know where remotehosts.cfg is in nagios on opensuse 12.3?
these are the files I have in my /etc/nagios directory "cgi.cfg htpasswd.users nagios.cfg nagios.cfg_2014-01-04-12:01 objects resource.cfg"

remotehosts.cfg isn't in this directory.

There has to be a way because the Server is functioning fully monitoring all the host he added. green up and red Down.


Yes it is nagios core 3.5.0

Re: How do i add a host to be monitored by Nagios?

Posted: Fri Feb 21, 2014 2:00 pm
by slansing
Okay, so this is not Fusion, I am going to move this to the General Core Support section... I'd recommend taking a look at this documentation:

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

Take a look at the "How To monitor ___" section.

Re: How do i add a host to be monitored by Nagios?

Posted: Fri Feb 21, 2014 3:55 pm
by billperrotta
I found config files here /etc/nagios/objects


see one example below

define host{
use windows-server
host_name ahgserver2003
alias ahgserver2003
address 10.1.0.10
hostgroups corporate-servers
parents AH-Corporate
}
7>
define service{
use generic-service
host_name ahgserver2003
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
notification_interval 1440
notification_options w,r
notification_period work-holiday
servicegroups drivespace
}
{>
(>define service{
use generic-service
host_name ahgserver2003
service_description D:\ Drive Space
.> check_command check_nt!USEDDISKSPACE!-l D -w 90 -c 95
notification_interval 1440
notification_options w,r
notification_period work-holiday
servicegroups drivespace
}
}>
define service{
use generic-service
host_name ahgserver2003
service_description F:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l F -w 90 -c 95
notification_interval 1440
notification_options w,r
notification_period work-holiday
servicegroups drivespace
}

define service{
use generic-service
host_name ahgserver2003
service_description H:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l H -w 90 -c 95
notification_interval 1440
notification_options w,r
notification_period work-holiday
servicegroups drivespace
}

define service{
use generic-service
host_name ahgserver2003
30,1 Top
do i just vi a file ie "vi nasserver.cfg" and paste in this template. modify parameters for my new host and save? or is there more to it?

Then restart nagios service? What command do I use to do that?

Re: How do i add a host to be monitored by Nagios?

Posted: Mon Feb 24, 2014 11:27 am
by sreinhardt
" service nagios restart" - Should restart nagios and attempt to use the new configs. Also I would note that you should never use webmin to administer a nagios box. It will severely mess up the permissions on files and folders.