thoughts about a SQL backend, and an issue tracker...

Andreas Ericsson ae at op5.se
Fri Jan 25 00:19:16 CET 2008


Einar Indridason wrote:
> Good day.  I have had some idle thoughts lately about Nagios.  I don't know
> if they make sense, or whether they are have already been rejected.
> 
> 1) Does Nagios have a bug-tracker of some kind, so if a bug is submitted, it
> can be checked if it exists already, and/or has been fixed?  (Bugzilla, or
> Trac, or something like that?)
> 

No, it doesn't. It has this mailing list as its primary "gather-up-patches"
place, where they are reviewed and suchlike by some few folks who have
been doing that sort of thing for a while. When Ethan has some spare moments,
he browses the list and usually picks the final version of all patches
and then bulk-applies them to nagios' cvs repo.

> 2) Would it make sense to have a (another) nagios-daemon, which clients
> would connect to, and ask for info, instead of having to read and parse "
> status.dat" (and other *.dat) files for every client that wants to get some
> infos.  For example:  echo "GET hosts -down" | telnet
> nagios.host.example.com 5665, or echo "GET services -flapping -down" |
> telnet nagios.host.example.com 5665
> (possible issue here would be authentication / authorization)
> 

No, that wouldn't make sense. One would have to
a) Invent a syntax for the queries to use.
b) Handle indexing of important data.
c) Take care of caching common queries.
d) Open up the can of worms that is secure network-authentication.

Several applications do that already, and have been doing it long enough
that they can be considered true and tested. They're called databases.

Nagios has support for writing its status data to databases, which is a
much nicer solution. Should the format of that database not fit you, you
are free to modify the existing code or write completely new one, both
of which will be a lot simpler than re-inventing a database engine with
a query language to match it.

> 3) Would it make sense to switch the data files and/or config files from
> being flat text files, into SQL tables?  (For example, by using the
> embeddable SQLite?)  (If yes, having the possibility of using different SQL
> databases would be a bonus.  SQLite on a ramdisk, for example, versus
> PostGreSQL versus MySQL (versus DB2) (versus Oracle)
> 

Yes. Nagios 2 (and onwards) already has a ready-written module for this,
called ndoutils. Google should provide ample amounts of information
about that particular project.

> 4) Would it make sense to change both services and hosts into "containers"?
> As in:  "Our network has those following containers:  (list of routers,
> switches, hosts, hostgroups)  Some of those containers, have other
> containers:  (The router for building B is a "master" for building B.  It
> also connects some switches in building B with some hosts in building B).
> Some of those sub-containers have other containers:  (the switch in building
> B is connecting some hosts - those hosts have some sub-systems running).
> Some of those sub-systems consists of several services, like:  webserver-1,
> webserver-2, database-1, database-2, firewall accesslist, etc....
> 

No, not really, because one container could reside inside another container,
which in turn resides inside the first one (fully meshed networks). It's
better, and programmatically a lot easier, to consider each host a separate
object rather than inventing meta-objects in which to put them.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list