Page 1 of 1

Nagios XI Monitoring wizards step 4 defaults

Posted: Thu Nov 13, 2014 6:29 pm
by emartine
Where can I modify the default values that monitoring wizards put in place for step 4?

I believe it is this file

/usr/local/nagiosxi/html/config/monitoringwizard.php

but I am not really sure where it gets the values from.

The defaults are 5, 1 and 5 and I want to do 3 1 3

Step 4 from the NRPE and Windows wizards shows:
Under normal circumstances...
Monitor the host and service(s) every________minutes.
When a potential problem is first detected...
Re-check the host and service(s) every________minutes up to________times before generating an alert.

Re: Nagios XI Monitoring wizards step 4 defaults

Posted: Fri Nov 14, 2014 10:34 am
by tmcdonald
That's a SourceGuardian-protected file so I won't be able to provide a direct fix for this right now, but the values are hard-coded into it. I will write up a feature request about putting those in a config file and referencing them like that.

EDIT: I spoke with the developers about this and apparently there have been a few requests put in for this in the past. For various red-tape reasons it probably won't be implemented right away, but it is definitely something we are aware of.

Re: Nagios XI Monitoring wizards step 4 defaults

Posted: Fri Nov 14, 2014 8:47 pm
by Box293
As an alternative solution you can hard code these into each specific wizard.

You edit the specific PHP file and it is in this section:

case CONFIGWIZARD_MODE_GETOBJECTS:

For host objects you would add the intervals you want:

Code: Select all

if (!host_exists($hostname)) {
	$objs[] = array(
		'type' 					=> OBJECTTYPE_HOST, 		/* This defines the object is a host */
		'use' 					=> 'xiwizard_generic_host',	/* This is how you use a host template */
		'host_name'				=> $hostname,				/* The hostname */
		'address' 				=> $address,				/* The address of the host */
		'check_interval' 		=> '3',						/* The check_interval */
		'retry_interval' 		=> '1',						/* The retry_interval */
		'max_check_attempts' 	=> '3',						/* The max_check_attempts */
		'_xiwizard' 			=> $wizard_name,			/* This adds a free variable to the host object */
		);
	}
You would also need to do the same for each service the wizard creates.

NOTE: When editing wizards these changes will be lost after an upgrade if the wizard is updated.

Does this make sense?

Re: Nagios XI Monitoring wizards step 4 defaults

Posted: Mon Nov 17, 2014 5:26 pm
by emartine
Excellent. Thank you for this. This would be a great feature to add malleability to. I need to ensure that all of the admins are on the same page when it comes to standardizing the check times,frequency,notification and this is definitely a step in that direction.