[Nagios-db-devel] abstraction and mysql support added to ui
Status: Beta
Brought to you by:
bench23
From: Matthew K. <mk...@ma...> - 2005-01-17 02:25:37
|
Well as there hasn't been any other activity since I mentioned doing this, I've just gone and checked it all in. If I've messed something up I have copies to revert the changes. So basically this breaks database calls and logic into 2 separate files - one of which is loaded at runtime based on the values in config.php. Instead of referencing the db directly the gui just calls a generic function and handles displaying the results. It's explained in a bit more detail in ui/docs/DESIGN. One fun thing about the way the neb module is implemented is that nagios can load both the mysql and postgres modules up at the same time and you can switch the gui between the two on the fly just by editing a line in config.php :) I've also started a todo in ui/docs/TODO with a few issues I've come across. The most immediate one being fixing some of the queries/stored procs that create the availability reports for both databases. Currently a few of the start and end time criteria combinations don't work (bounded start, bounded end time is the most obvious) on both databases. In testing everything is working. There are a few inconsistencies between the displays of nagios default cgis, postgres and mysql that I plan on ironing out. Oh and I had to make a single change to the postgres schema and restart stored proc to change the 'option' column to just 'opt' as mysql has it as a reserved word and postgres didn't like the quoting I had to use. And please feel free to point out any mistakes in what I've done, I'm not a professional php programmer, just a system admin :) -- Matthew Kent <mk...@ma...> http://magoazul.com |