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.
How do i add a host to be monitored by Nagios?
-
- Posts: 115
- Joined: Fri Feb 21, 2014 11:44 am
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: How do i add a host to be monitored by Nagios?
You would need access to a Nagios Core, or Nagios XI system to add a new host, you cannot do this from Nagios Fusion.
-
- Posts: 115
- Joined: Fri Feb 21, 2014 11:44 am
Re: How do i add a host to be monitored by Nagios?
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
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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: How do i add a host to be monitored by Nagios?
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.
http://nagios.sourceforge.net/docs/3_0/toc.html
Take a look at the "How To monitor ___" section.
-
- Posts: 115
- Joined: Fri Feb 21, 2014 11:44 am
Re: How do i add a host to be monitored by Nagios?
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?
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?
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: How do i add a host to be monitored by Nagios?
" 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.