Page 1 of 3

Bulk import users

Posted: Wed Nov 26, 2014 9:53 am
by jkinning
I am coming from Nagios core and have attempted several times to import my users from the 3.0.6 core Nagios to Nagios XI. I keep getting this message which tells me nothing.
Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Template '' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 3376)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

The 3376 line is the end of the file. :D

So, if I have a few users already configured for the Nagios XI can I bulk import users? I am using AD so the user password is really irrelevant and would just make them all users.

On a different note, is there any plans to provide better AD integration? So you could have an AD group and those users are allowed to login as a user and a different AD group for admin level access? Most of my users would just need to acknowledge their alerts but would also want to look at the dashboard.

Having 522 contacts and 303 contact groups how did others migrate from core to XI successfully? I've been trying to change over from Core to XI for about a month and a half. Granted I have other items and task that come up as I wear several hats but this process shouldn't be that complicated but then again I am not an expert with Nagios so my lack of knowledge is probably to blame. Really just trying to migrate over from Nagios Core and then change my hosts to use the NCPA agent, currently Windows servers are using a WMI proxy and Nix systems using SSH, and start moving forward. This isn't as simple as it sounded on paper. ;)

Re: Bulk import users

Posted: Wed Nov 26, 2014 1:58 pm
by tmcdonald
If you want to PM me your contacts.cfg file I can look it over and see if anything seems out of place.

One thing to note is that you are mixing up the terms "contacts" and "users". Contacts are used for notifications only. You give them an email address and then assign them to a service. Users are a Nagios XI concept and are used for logging in to the XI interface. You cannot import users from Core to XI because users do not exist in Core. It gets even more confusing considering when you create a user you can automatically have a contact created for them, but not the other way around.

Do you truly have 522 people that would need access to the XI interface? Or just that many people would need to receive alerts? If they do not need to log on, I would strongly recommend against making an XI user for each person and just stick to contacts.

As for the AD stuff I would need to defer to a developer on that. I'll see if one can chime in.

Edit: File received and placed in shared folder. Answers to questions above:
No, I don't have that many people that would need access to the XI interface if there is a way they can acknowledge the notification alert with a user ID.

This contacts.cfg doesn't even list out all the users and directories that I imported but it shows in my XI CMM interface. XI appears to be a different animal than just core but again I may be making this more difficult than it actually is.

Re: Bulk import users

Posted: Wed Nov 26, 2014 2:37 pm
by sreinhardt
On the AD note, much, very much is planned for 2015. It cannot be backported due to other changes, but yes much better integration is coming shortly!

Re: Bulk import users

Posted: Wed Nov 26, 2014 3:40 pm
by jkinning
File has been PM'd

Re: Bulk import users

Posted: Mon Dec 01, 2014 11:43 am
by tmcdonald
I have a feeling the line 3376 is not in that file since it only has ~250 lines. Can you just PM your profile instead? That way we can take a close look at all the configs.

Update: Files received and placed in shared drive.

Re: Bulk import users

Posted: Tue Dec 02, 2014 3:08 pm
by jkinning
PM sent with requested files

Re: Bulk import users

Posted: Tue Dec 02, 2014 3:33 pm
by jkinning
tmcdonald wrote:If you want to PM me your contacts.cfg file I can look it over and see if anything seems out of place.

One thing to note is that you are mixing up the terms "contacts" and "users". Contacts are used for notifications only. You give them an email address and then assign them to a service. Users are a Nagios XI concept and are used for logging in to the XI interface. You cannot import users from Core to XI because users do not exist in Core. It gets even more confusing considering when you create a user you can automatically have a contact created for them, but not the other way around.

Do you truly have 522 people that would need access to the XI interface? Or just that many people would need to receive alerts? If they do not need to log on, I would strongly recommend against making an XI user for each person and just stick to contacts.

As for the AD stuff I would need to defer to a developer on that. I'll see if one can chime in.

Edit: File received and placed in shared folder. Answers to questions above:
No, I don't have that many people that would need access to the XI interface if there is a way they can acknowledge the notification alert with a user ID.

This contacts.cfg doesn't even list out all the users and directories that I imported but it shows in my XI CMM interface. XI appears to be a different animal than just core but again I may be making this more difficult than it actually is.

I also never received a firm confirmation on the question regarding can contacts acknowledge alerts when they get notified? If they get notified that a system or service went critical and can acknowledge that alert then no I wouldn't need that many people logging into the XI interface.

Re: Bulk import users

Posted: Tue Dec 02, 2014 4:46 pm
by sreinhardt
Yes contacts definitely can ack alerts, just like in core! You actually have the full core interface under /nagios if you really wanted to use it, but XI should provide all the same support. As with core, if they are defined as a host contact, they should be able to ACK both host and services, and service level contacts can ack services only.

Re: Bulk import users

Posted: Mon Dec 08, 2014 1:31 pm
by tmcdonald
Your configs look fine as they are. Can you zip up the ones you are trying to import and send those over? There might be a blank "use" parameter in one of them that is throwing things off. In fact that might make sense since they would be combined into one big file which may well have 3376+ lines.

Re: Bulk import users

Posted: Mon Dec 08, 2014 2:02 pm
by tmcdonald
Couldn't find any missing "use" lines in the imported contacts. I suppose it is worth asking: How are you importing these? We have a doc that goes over the import process, and if you aren't pre-processing the config files there could be some issues like this one.

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

If you are just trying to import them directly that might explain it.