[op5-users] Ninja backend and architecture

Andreas Ericsson ae at op5.se
Mon Mar 30 08:56:08 CEST 2009


Matthias Flacke wrote:
> Hi,
> 
> just want to congratulate you for this effort to give the stucked
> 'Ride of the dark horse' some new impulse... ;)
> 
> Some questions:
> - in your announcement you spoke about 'Support for several
> databases'. Does that mean, that you use something different for
> backend than NDO?
> 

Yes, we're using the Merlin module, which was originally designed
as an event transport module/daemon pair, much like NDOUtils. We
found that the NDO database scheme made it scale very poorly, so
we had to design our own. The idea is to make Nagios scale to
tens of thousands (or hundreds of thousands) hosts, which becomes
rather simple since the Merlin module allows events to be sent not
only from the Nagios daemon on the same host, but also over the
network. The protocol is open, so other applications can use it
to transfer data to a merlin daemon as well.

Since the merlin daemon uses libdbi to talk to the database, we
can currently speak to mysql and postgresql databases. Work (on
libdbi) to get it working with oracle, Sybase, MSSQL and MSQL
are under way, and once that's completed, we'll have support for
those databases too, more or less for free. It's up to the user
to install the proper libdbi driver packages though.

> - Can you give some more information about the architecture below
> that GUI part? How does it interact with the wellknown Nagios
> interfaces?
> 

This'll be hard without some means of drawing stuff, but here's
what happens when an event is triggered inside Nagios:
* Nagios calls the eventbroker module part of Merlin.
* merlinmod creates a merlin packet from the event and
  - transfers it to the merlin module if the connection is live
 or
  - writes it to a backlog file for later feeding to the unix
    domain socket connecting the module to the daemon
* The daemon inspects the incoming packet and inserts it into
  the database (if appropriate) and, optionally, transfers the
  event to other merlin daemons, which handle it in pretty much
  the same way.

> - Is it perhaps planned to add some kind of an API to structure the
> interaction between GUI and backend?
> 

Yes. We have to do that since a new status map will also be included
in the GUI, and the people writing the status map are contracted and
shouldn't have to worry about database layout and things like that.
We're aware of possible changes that may need to be done to the db
layout later, and we want a stable API that everyone can use to pull
stuff out of the database. Per Åsberg knows more about that, as I've
only been working on the datafeeding part. I expect to work quite a
bit on the API once the Merlin stuff is about 90% complete though.

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

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.


More information about the op5-users mailing list