Page 1 of 1

[wizard] How to change forced values in Wizard

Posted: Mon Apr 01, 2019 9:00 am
by sigmainformatique
Hi Xi Team,

I ve made two custom wizards for my company : one for linux servers, one for windows servers. They work like a charm.

But I have an issue : in Windows/Linux Server Wizards, step 3 is mandatory.
nagios xi wizard.jpg



I don't want it as my normal check/retry /max attempts/ come from specific Nagios templates in my company. These templates are well inherited in config generated. But "forced values" are taking first.
The timeperiod is forced too : xi_timeperiod_24x7 => I don't want it.
nagios xi wizard2.jpg
As a workaround : I force my max_check_attempt in wizard as in this example :

Code: Select all

"use"                 => $service_template,
                         "check_command"       => "check_nrpe_win_service_auto!$args!!!!!!!",
                         "_xiwizard"           => $wizard_name,
                         'max_check_attempts' => 3,
But it iso not 100% good because my objects should inherit this value. How to completely remove generation of this static configuration? (check period and check parameters).

Regardss

Re: [wizard] How to change forced values in Wizard

Posted: Mon Apr 01, 2019 12:00 pm
by npolovenko
Hello, @sigmainformatique. As far as setting the check interval, max check attempts and retry interval, you can do that with a template. This tutorial will explain how to use templates.
https://www.nagios.com/videos/2017/07/n ... templates/

Setting a custom timeperiod is more complicated. Here you have two options. Either add a custom line to the use statement like you did before:
"use" => $service_template,
"check_command" => "check_nrpe_win_service_auto!$args!!!!!!!",
"_xiwizard" => $wizard_name,
"check_period" => "some_interval_name"
Or let the the wizard use the 24x7 timeperiod but set a custom timeperiod per each contact in Notification Preferences.
image (6).png