Page 1 of 1

Bug in the Nagios XI Import config tool

Posted: Thu Sep 12, 2019 8:11 am
by eloyd
There appears to be a bug in the Nagios XI Import config tool. So far, I've only investigated timeperiods, but I suspect it applies across the board.

Given the following timeperiod import file:

Code: Select all

define timeperiod {
        timeperiod_name Dev Dispatcher
        alias Dev Dispatcher on dev-webprod off during the summer
        september 1 - june 30 00:00-24:00
}
Note that there is a space in the timeperiod_name: "Dev Dispatcher." If I import this file, I get an import that has no name and messed up time periods:
broken.png
If I replace the space with an underscore, it works fine, except now the name is not correct with all the things that are expecting to use it.
correct.png
I'm pretty sure the space in the name causes the parser to fail to parse the name properly, which is an "off by one" type error for the rest of the import. We need this to work for a large number of imports of all types. This is on XI 5.6.6 fully freshened with all updates.

Re: Bug in the Nagios XI Import config tool

Posted: Thu Sep 12, 2019 9:11 am
by scottwilkerson
Found bug, unzip and place the attached in

Code: Select all

/usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php
import.class.zip

Re: Bug in the Nagios XI Import config tool

Posted: Thu Sep 12, 2019 9:15 am
by eloyd
Thanks, Scott. Testing now.

Re: Bug in the Nagios XI Import config tool

Posted: Thu Sep 12, 2019 9:23 am
by eloyd
Thanks. Look like that solved the import bug. Now I just need to figure out why one timeperiod that gets imported, but excludes another imported time period doesn't pass muster on the verify stage.

While possibly related, it's not the same problem. You can go ahead and lock this. I'll open another issue if there is one.

Re: Bug in the Nagios XI Import config tool

Posted: Thu Sep 12, 2019 9:31 am
by scottwilkerson
eloyd wrote:Thanks. Look like that solved the import bug. Now I just need to figure out why one timeperiod that gets imported, but excludes another imported time period doesn't pass muster on the verify stage.

While possibly related, it's not the same problem. You can go ahead and lock this. I'll open another issue if there is one.
Great!

Locking