load nagios.log data into existing or new database

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

load nagios.log data into existing or new database

Post by kendallchenoweth »

Can you recommend a method to bulk upload some large number of nagios core log files into a new or existing mysql database in order to allow for reporting on nagios events? We converting our Nagios Core to Nagios XI, but want to retrieve the Nagios Core history. Thanks in advance
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: load nagios.log data into existing or new database

Post by abrist »

You could look at using log2ndo to convert the log files and them save them in the db (this assumes that you are using ndoutils). Do note that is will not be very useful unless your objects are named *exactly* the same, otherwise most of the log content will just take up space in the db and will not be able to be queried from the nagios interface.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

Re: load nagios.log data into existing or new database

Post by kendallchenoweth »

But we could still query the database directly? Could I use this tool to populate a new individual database used as a historical reporting database since some objects will have different names in the XI upgrade/refactoring from the Core environment. Then I could maintain a clean environment going forward in the Nagios XI environment...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: load nagios.log data into existing or new database

Post by abrist »

kendallchenoweth wrote:But we could still query the database directly?
Yep, you would need to write the sql queries, and would not be able to visualize the data in the frontend, but it should work.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

Re: load nagios.log data into existing or new database

Post by kendallchenoweth »

Thanks. You can consider this question closed.
Locked