Page 1 of 1

Setting Default Settings for Unconfigured Objects

Posted: Fri Nov 30, 2018 1:05 pm
by blariv
Hi,

I just started utilizing the "auto-configure" feature in the unconfigured objects area. I had set the parameters I want the hosts/services set to in both the xiwizard_passive_host and xiwizard_passive_service in the UI. I also hardcoded these settings in the passiveobject.inc.php and passivecheck.inc.php files.

Original forum post that used to work.
https://support.nagios.com/forum/viewto ... hp#p221543

Neither setting is taking once the server are auto imported for either linux or windows servers.

Not sure what I am missing.

I have attached the passiveobject.inc.php snippet.

Nagios XI version: 5.5.7
XI installed from: source
XI UUID: c32d835d-6ff5-46be-9267-9f927af5ef8a
Release info: nagiosxi.na.hasbro.com 3.10.0-957.el7.x86_64 x86_64
Red Hat Enterprise Linux Server release 7.6 (Maipo)

Re: Setting Default Settings for Unconfigured Objects

Posted: Fri Nov 30, 2018 2:36 pm
by scottwilkerson
The automated adding doesn't use the wizard, it actually is happening around line 289 in

Code: Select all

/usr/local/nagiosxi/scripts/parse_core_eventlog.php
NOTE: this file is overwritten every upgrade and not recommended to be modified

That said, you should be able to add the notification_interval and check_freshness directives you have in there to a template and specify the template you want to use for auto/added unconfigured objects on the Auto Configure Settings Tab and then Advanced sub tab

Re: Setting Default Settings for Unconfigured Objects

Posted: Mon Dec 03, 2018 9:06 am
by blariv
that did it, great service as usual.

one last question. is it possible to add a default check command to that file as well. I would like the check-host-alive set at import.

just looking for the syntax.

"check_command" => "check-host-alive!!!!!!!!",

Re: Setting Default Settings for Unconfigured Objects

Posted: Mon Dec 03, 2018 2:26 pm
by scottwilkerson
blariv wrote:that did it, great service as usual.

one last question. is it possible to add a default check command to that file as well. I would like the check-host-alive set at import.

just looking for the syntax.

Code: Select all

"check_command" => "check-host-alive!!!!!!!!",
that looks correct if added to the host section

Re: Setting Default Settings for Unconfigured Objects

Posted: Mon Dec 03, 2018 2:48 pm
by blariv
that did it. thanks and lock it.

Re: Setting Default Settings for Unconfigured Objects

Posted: Mon Dec 03, 2018 2:53 pm
by benjaminsmith
that did it. thanks and lock it.
Closing. Thank you for using the Nagios Support Forum.