22
Dec/09
3

NDOUtils: Nagios Data Out

There are a lot of cases and ways the NEB modules can be used for. For example there is a very popular Nagios Data Out (NDO) database abstraction layer. The NDOutils have been developed and are distributed by the Nagios Core Team.

The NDOutils can be separated into two components. The ndomod is the NEB module which is loaded into the Nagios process. It forwards the information to listening daemons using tcp or unix sockets. The second component is a listening daemon. The most popular daemon is ndo2db. It retrieves the information from ndomod and pushes it to a relational database. At the moment there is only support for MySQL. From the first release it was planned to add support for PostgreSQL but this is currently not in focus of the developement team.

NDO as base for Nagios Addons

Having all the Nagios information in a relational database it is an easy task to connect 3rd party tools to the NDO database to read the stored information. NagVis was the first public addon which used the NDO database as status information store just 2 days after the first release of the NDO. Some weeks ago the NDO MySQL backend for NagVis replaced the HTML-CGI based backend as default backend. Without doubt this history was a big cause for the rapid spread of the NDO.

Since then several other addons began to use the NDO as data source.

Disadvantages / Problems

The biggest problem using the NDO is that the data progressing may block the Nagios core. This can lead to performance problems when using the ndomod with ndo2db. There are several detail issues in the NDOUtils it selfs. On one hand the housekeeping jobs, which are needed to cleanup old information, eat a lot of time. While cleaning up the tables the locks do also lock down the insertions and updates which then block the Nagios core. On the other hand the insertions and updates may take a lot of time due to unlucky keys and/or a lot of data which need to be handled in the Database.

Another problem which is not directly related to the NDOUtils may be inappropriate configured databases which have never been tweaked to handle such an amount of information.

Things look good that the most anoying problems will be solved. Last but not least cause of the IDOUtils…

From NDOUtils to IDOUtils

Due to the fork of Nagios called Icinga the IDOUtils have been created. The IDOUtils are based on the NDOUtils but include a lot of fixes and improvements. The IDOUtils do also support other databases than MySQL like Oracle. This has been realized using libdbi. The developers work hard to fix the biggest problems in the IDOUtils. The stable and useful changes are being backported to the NDOUtils.

ndomod and ndo2db are not alone

The NDOUtils include two other tools which can be useful when working with the NDO:

  • The file2sock utility reads data from a standard file and dumps it to a unix or tcp socket. This is useful if the ndomod NEB module writes to a standard file to be sent to the ndo2db daemon later.
  • The log2ndo utility is used for importing historical log archives created by Nagios to the ndo2db daemon.
Filed under: Nagios
Comments (0) Trackbacks (3)