Adding and removing msexchange Stores to Monitor

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Adding and removing msexchange Stores to Monitor

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Adding and removing msexchange Stores to Monitor

Post by abrist »

Well, lets start by looking at the config. Post the contents of: exchangeserver.cfg in code wraps.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Adding and removing msexchange Stores to Monitor

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Adding and removing msexchange Stores to Monitor

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Adding and removing msexchange Stores to Monitor

Post by billperrotta »

No, I think I have to add additional stores dbs to be monitored, as define service and name the groups?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Adding and removing msexchange Stores to Monitor

Post 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.
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.
Locked