Import hosts from xls file into Nagios database


#1

I am using Nagios 2.0 with a MySQL database and Fruity. We recieve .xls spreadsheets from departments that need to add hosts. Currently we are manually adding new hosts one by one and their configurations to Nagios via Fruity. This process can be very time consuming when you get over 100 new hosts a week. I dont have the MySQL skills to directly import into the database. Is their a tool or plugin that will import from an .xls file into Nagios?


#2

I really really doubt it.

I haven’t used fruity, but all of your hosts should be sitting in regular ol’ text files in your nagios config directory. The database is likely just for the Fruity frontend and its features, because nagios 2.x does not read its configs from a database nor can it be configured to.

You could try exporting your XLS files to CSV’s (so that the info is text readable by anything, not just excel) then writing a script which parses the csv and appends the information to your hosts.cfg file. Know anybody who can script? Perl would probably be the easiest to do this.