I think there's an[other] import bug

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

I think there's an[other] import bug

Post by eloyd »

So, possibly related to (but different from) https://support.nagios.com/forum/viewto ... 16&t=55547, I now have this:

If I import the following timeperiods.cfg file:

Code: Select all

define timeperiod {
 timeperiod_name 3am-4am daily
 alias 3am to 4am every day
 day 1 - -1 03:00-04:00
}

define timeperiod {
 timeperiod_name 4am-3am daily
 alias 4am to 3am every day (all times except 3am-4am)
 day 1 - -1 00:00-24:00
 exclude 3am-4am daily
}
The import goes fine. Note that all tabs have been replaced with spaces and all multiple spaces replaced with single spaces. Again, the import works.

The verify, however, fails with:

Code: Select all

Error: Excluded time period '3am-4am         daily' specified in timeperiod '4am-3am daily' is not defined anywhere!
Note here that the excluded period has a really weird spacing. In the created /usr/local/nagios/etc/timeperiods.cfg file, here's what's there:

Code: Select all

define timeperiod {
    timeperiod_name         3am-4am daily
    alias                   3am to 4am every day
    day 1 - -1              03:00-04:00
}

define timeperiod {
    timeperiod_name         4am-3am daily
    alias                   4am to 3am every day (all times except 3am-4am)
    day 1 - -1              00:00-24:00
    exclude 3am-4am         daily
}
Note that what looks like space between "3am-4am" and "daily" in the exclude is actually multiple spaces.

So I'm back to "I think there's an[other] import bug."
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: I think there's an[other] import bug

Post by eloyd »

As a follow-up, if I manually remove the extra spaces that got added to the "exclude" line, it passes the verify. However, I'd really rather not have to do this with every import. :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I think there's an[other] import bug

Post by scottwilkerson »

another fix, same file

Code: Select all

/usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php
import.class.zip
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: I think there's an[other] import bug

Post by eloyd »

Thanks. Will test in a few minutes.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I think there's an[other] import bug

Post by scottwilkerson »

sounds good
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: I think there's an[other] import bug

Post by eloyd »

Yay! Our 300 time periods just imported without issue!

Thanks again, Scott. I'll let you know when I find the next import bug. :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I think there's an[other] import bug

Post by scottwilkerson »

eloyd wrote:Thanks again, Scott. I'll let you know when I find the next import bug.
Sounds good!!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked