Nagios XI Monitoring wizards step 4 defaults

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Nagios XI Monitoring wizards step 4 defaults

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios XI Monitoring wizards step 4 defaults

Post 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.
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI Monitoring wizards step 4 defaults

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Monitoring wizards step 4 defaults

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