Page 1 of 1

Adding and removing msexchange Stores to Monitor

Posted: Fri Apr 04, 2014 4:21 pm
by billperrotta
Thinking since I was monitoring 4 msexchange stores. In order to add more I need to edit certain parameters in my exchangeserver.cfg file.
Not sure how difficult this will be, haven't vied the file to take a look yet.
I inherited this install most of the parameters I'm using are based on the prior configuration.

first,third,fourth appear in web browser.

Re: Adding and removing msexchange Stores to Monitor

Posted: Mon Apr 07, 2014 10:25 am
by abrist
Well, lets start by looking at the config. Post the contents of: exchangeserver.cfg in code wraps.

Re: Adding and removing msexchange Stores to Monitor

Posted: Wed Apr 09, 2014 1:17 pm
by billperrotta

Code: Select all

define host{
	use			windows-server
	host_name		mail-ahgserver
	alias			mail-ahgserver
	address			10.1.0.11
	hostgroups		corporate-servers,exchange-servers
	parents 		AH-Corporate
}

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

define service{
	use			generic-service
	host_name		mail-ahgserver
	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		mail-ahgserver
	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		mail-ahgserver
	service_description	G:\ Drive Space
	check_command		check_nt!USEDDISKSPACE!-l G -w 90 -c 95
	notification_interval 	1440
	notification_options 	w,r
	notification_period 	work-holiday
	servicegroups 		drivespace
}

define service{
	use 			generic-service
	host_name 		mail-ahgserver
	service_description 	First Storage Group
	check_command 		check_nrpe!test_db!1
	notification_interval 	30
	notification_options 	c,r
	servicegroups 		maildb
}

define service{
	use 			generic-service
	host_name 		mail-ahgserver
	service_description 	Third Storage Group
	check_command 		check_nrpe!test_db!3
	notification_interval 	30
	notification_options 	c,r
	servicegroups 		maildb
}

define service{
	use 			generic-service
	host_name 		mail-ahgserver
	service_description 	Fourth Storage Group
	check_command 		check_nrpe!test_db!4
	notification_interval 	30
	notification_options 	c,r
	servicegroups 		maildb
}

define service{
	use 			generic-service
	host_name 		mail-ahgserver
	service_description 	Fifth Storage Group
	check_command 		check_nrpe!test_db!5
	notification_interval 	0
	servicegroups 		maildb
}
Mod Note: When we say to use code wraps we mean to put the [ code ] part before your code, and the [ /code ] part after (without the spaces). Please see the change I made to your post for example.

Re: Adding and removing msexchange Stores to Monitor

Posted: Thu Apr 10, 2014 10:09 am
by lmiltchev
If you are adding a similar host, you can define it in the exchangeserver.cfg:

Code: Select all

define host{
   use         windows-server
   host_name      new-server
   alias         whatever
   address         x.x.x.x
   hostgroups      corporate-servers,exchange-servers
   parents       AH-Corporate
}
Then, you can modify the service definitions by adding the new-server:

Code: Select all

define service{
   use         generic-service
   host_name      mail-ahgserver,new-server
   service_description   C:\ Drive Space
   check_command      check_nt!USEDDISKSPACE!-l C -w 90 -c 90
   notification_interval    1440
   notification_options    w,r
   notification_period    work-holiday
   servicegroups       drivespace
}
Check your configuration:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
and restart nagios:

Code: Select all

service nagios restart
Is this what you are trying to achieve or I am missing the point?

Re: Adding and removing msexchange Stores to Monitor

Posted: Fri Apr 11, 2014 10:57 am
by billperrotta
No, I think I have to add additional stores dbs to be monitored, as define service and name the groups?

Re: Adding and removing msexchange Stores to Monitor

Posted: Fri Apr 11, 2014 2:20 pm
by sreinhardt
It would be helpful if you could post the nsc.ini or nsclient.ini from the windows server. However your base config in nagios for the db checks look like:

Code: Select all

define service{
   use          generic-service
   host_name       mail-ahgserver
   service_description    Fifth Storage Group
   check_command       check_nrpe!test_db!5
   notification_interval    0
   servicegroups       maildb
}
Most likely we just need to change the check command to "check_command check_nrpe!test_db!6" or another number for whatever database you need to check. However I have no way to know what 1-5 currently represent in your systems.