Fwd: Multiple host in hosts.cfg

spdesai at gnvfc.net spdesai at gnvfc.net
Wed Nov 22 04:44:07 CET 2006


GOOD EXPLANATION FROM YR SIDE.

SO IF I WANT TO ADD MORE HOSTS THEN I NEED TO ADD IN ONLY HOSTS.CFG FILE NOT 
IN ANY OTHER FILE(LIKE SERVICE/HOSTGROUPS ETC)AS OTHER FILES ARE LOOK HOSTS 
DETAILS FROM HOSTGROUP NAME.

RIGHT ?

PL. CONFIRM ..

THANKS FOR YR SUPPORT

THANKS AND REGARDS,
SUHAG DESAI



Quoting Thomas Slutyer <nagios at kilala.nl>:

> On 21 Nov, 2006, at 16:58, spdesai at gnvfc.net wrote:
> 
> > Sorry for wrongly posting youe message to IAN.
> 
> No problem. I saw your e-mail the first time, since you CCed it to the 
> ML.
> 
> > I have tried and gone through the link given by u but i m not 
> > successfully done this thing. Let me explain u in details.  Suppose i 
> > want to monitor SMTP,PING,POP,Harddisk usage,Memory,TELNET,FTP for the 
> > host 192.168.10.1,192.168.10.2,192.168.10.3----192.168.10.50.
> >
> > So give me the configuration example for hosts.cfg, hostgroups.cfg, 
> > service.cfg and whatever file needed to be configured.
> 
> I know what you want and I know what you were originally looking for. 
> As I explained yesterday there is no shortcut in defining Nagios hosts.
> 
> I will not type up everything (since that wouldn't leave any chance for 
> you to learn), but I will show you a few examples that apply to what I 
> told Ian yesterday.
> 
> In this case, hosts 1 and 2 run SMTP and POP, while 3 runs as an FTP 
> server.
> 
> define host{
> 	use			host-template
> 	host_name	foobar1
> 	alias			foobar1
> 	address		192.168.10.1
> 	hostgroups	HG-all,HG-mail
> 	}
> 
> define host{
> 	use			host-template
> 	host_name	foobar2
> 	alias			foobar2
> 	address		192.168.10.2
> 	hostgroups	HG-all,HG-mail
> 	}
> 
> define host{
> 	use			host-template
> 	host_name	foobar3
> 	alias			foobar3
> 	address		192.168.10.3
> 	hostgroups	HG-all,HG-ftp
> 	}
> 
> define hostgroup{
> 	hostgroup_name	HG-all
> 	alias				All systems
> 	}
> 
> define hostgroup{
> 	hostgroup_name	HG-mail
> 	alias				All UNIX systems
> 	}
> 
> define hostgroup{
> 	hostgroup_name	HG-ftp
> 	alias				All UNIX systems
> 	}
> 
> define service{
> 	use					service-template
> 	hostgroup_name		HG-mail
> 	service_description		SMTP
> 	check_command		$WHATEVER$
> 	}
> 
> define service{
> 	use					service-template
> 	hostgroup_name		HG-mail
> 	service_description		POP
> 	check_command		$WHATEVER$
> 	}
> 
> define service{
> 	use					service-template
> 	hostgroup_name		HG-ftp
> 	service_description		FTP
> 	check_command		$WHATEVER$
> 	}
> 
> define service{
> 	use					service-template
> 	hostgroup_name		HG-all
> 	service_description		TELNET
> 	check_command		$WHATEVER$
> 	}
> 
> define service{
> 	use					service-template
> 	hostgroup_name		HG-all
> 	service_description		PING
> 	check_command		$WHATEVER$
> 	}
> 
> This way, you are grouping various service checks by linking them to 
> groups of hosts.
> 
> So, yes. If you add new hosts to your monitoring environment you will 
> need to manually add these on an individual basis. But instead of 
> manually adding all the required service descriptions as well, you will 
> be automatically assigning these to the hosts in question by 
> "subscribing" to the relevant host groups.
> 
> > I have enable SNMP for SNMP based query on all the machine.
> That's fine. You could use SNMP to monitor your hard disk and memory 
> usage in two ways: by reading the SNMP objects for the specific volume, 
> or by running check_disk locally by tying it to a custom SNMP object of 
> your choosing. You may also run check_disk passively through NSCA or 
> actively through NRPE. Make your pick :)
> 
> Cheers!
> 
> 
> Thomas
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list