Another bug. This time in importing contacts

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:

Another bug. This time in importing contacts

Post by eloyd »

More bugs in imports. This time, it's contacts. Similar to https://support.nagios.com/forum/viewto ... 16&t=55551, the following import stanza:

Code: Select all

define contact {
        contact_name            spacecadet
        use                     Auth Contact
        alias                   User spacecadet
        email                   [email protected]
}
Imports and writes back out to this:

Code: Select all

define contact {
    contact_name                     spacecadet
    alias                            User spacecadet
    email                            [email protected]
    use
}
I'm guessing it's the spaces in the "use" (or maybe it's the spaces in the thing the user points to). Maybe all keywords for the import class can be exempted instead of me finding them one at a time? :-)
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: Another bug. This time in importing contacts

Post by scottwilkerson »

this is a different issue, and I will say operator error, if I may...

What you are experiencing is what will happen if the contact template "Auth Contact" hasn't already been imported before you try to import the contact
To prevent errors or misconfigurations, you should import your configurations in an useful order. We recommend importing in the following order:

Commands -> Time Periods -> Contact Templates -> Contacts -> Contact Groups -> Host Templates -> Hosts -> Host Groups -> Service Templates -> Services -> Service Groups
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: Another bug. This time in importing contacts

Post by eloyd »

Yah, I know the import sequence. I've been doing some fine-toothed combing through the import files (which are from a Nagios-fork based product that rhymes with daemon and in the worst shape I've ever seen).

I literally just came here to write "I figured it out. Turns out the 'Auth Contact' wasn't properly defined with a register 0 statement and was being exported as a contact, not a contact template, so it wasn't put in the templates file to begin with."

Thanks again Scott. I'm pretty sure it's upstream (from me) user error. :)
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: Another bug. This time in importing contacts

Post by scottwilkerson »

eloyd wrote:Yah, I know the import sequence. I've been doing some fine-toothed combing through the import files (which are from a Nagios-fork based product that rhymes with daemon and in the worst shape I've ever seen).

I literally just came here to write "I figured it out. Turns out the 'Auth Contact' wasn't properly defined with a register 0 statement and was being exported as a contact, not a contact template, so it wasn't put in the templates file to begin with."

Thanks again Scott. I'm pretty sure it's upstream (from me) user error. :)
Sounds good!

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