<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Components</title> <meta name="generator" content="DocBook XSL Stylesheets V1.75.1"> <meta name="keywords" content="Supervision, NDOUtils, Nagios, Linux"> <link rel="home" href="index.html" title="NDOUtils Documentation"> <link rel="up" href="ch02.html" title="Chapter 2. Design en detail"> <link rel="prev" href="ch02.html" title="Chapter 2. Design en detail"> <link rel="next" href="ch03.html" title="Chapter 3. Examples"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <CENTER><IMG src="../images/logofullsize.png" border="0" alt="Nagios" title="Nagios"></CENTER> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr><th colspan="3" align="center">Components</th></tr> <tr> <td width="20%" align="left"> <a accesskey="p" href="ch02.html">Prev</a> </td> <th width="60%" align="center">Chapter 2. Design en detail</th> <td width="20%" align="right"> <a accesskey="n" href="ch03.html">Next</a> </td> </tr> </table> <hr> </div> <div class="section" title="Components"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="components"></a>Components</h2></div></div></div> <div class="section" title="Overview"> <div class="titlepage"><div><div><h3 class="title"> <a name="id37006017"></a>Overview</h3></div></div></div> <p>There are four main components that make up the NDO utilities:</p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> <p>NDOMOD Event Broker Module</p> </li> <li class="listitem"> <p>LOG2NDO Utility</p> </li> <li class="listitem"> <p>FILE2SOCK Utility</p> </li> <li class="listitem"> <p>NDO2DB Daemon</p> </li> </ol></div> <p>Each component is described in more detail on the following pages.</p> </div> <div class="section" title="NDOMOD"> <div class="titlepage"><div><div><h3 class="title"> <a name="id37006064"></a>NDOMOD</h3></div></div></div> <p>The NDO utilities includes a Nagios event broker module (NDOMOD.O) that exports data from the Nagios daemon.</p> <p>Assuming that Nagios has been compiled with the event broker enabled (this is the default), you can configure Nagios to load the NDOMOD module during runtime. Once the module has been loaded by the Nagios daemon, it can access all of the data and logic present in the running Nagios process.</p> <div class="figure"> <a name="id37006080"></a><p class="title"><b>Figure 2.1. Loaded NDOMOD Event broker Module</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/fig5.png" alt="Loaded NDOMOD Event broker Module"></div> </div> </div> <br class="figure-break"> <p>The NDOMOD module has been designed to export configuration data, as well as information about various runtime events that occur in the monitoring process, from the Nagios daemon. The module can send this data to a standard file, a Unix domain socket, or a TCP socket.</p> <div class="figure"> <a name="id37006110"></a><p class="title"><b>Figure 2.2. NDOMOD Capabilities</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/fig6.png" alt="NDOMOD Capabilities"></div> </div> </div> <br class="figure-break"> <p>The NDOMOD module writes data in a format that the NDO2DB daemon (described later) can understand.</p> <p>If the NDOMOD module is writing its output to a file, you can configure it to periodically rotate and/or process the output file using a predefined Nagios command. This can be useful if you want to transfer the output file to another physical machine (using SSH, etc. ) and send its contents to the NDO2DB daemon using the FILE2SOCK utility (described later).</p> <p>If the NDOMOD module is writing it output to a TCP or Unix domain socket, it has some resistance to connection dropouts. The module will attempt to cache its output until it can (re)connect to the socket for writing. This is helpful if the process that creates and listens on the socket needs to be restarted, etc.</p> </div> <div class="section" title="LOG2NDO"> <div class="titlepage"><div><div><h3 class="title"> <a name="id37006146"></a>LOG2NDO</h3></div></div></div> <p>The LOG2NDO utility has been designed to allow you to import historical Nagios and NetSaint log files into a database via the NDO2DB daemon (<a class="link" href="components.html#ndo2db-description" title="NDO2DB">described later</a>). The utility works by sending historical log file data to a standard file, a Unix domain socket, or a TCP socket in a format the NDO2DB daemon understands. The NDO2DB daemon can then be used to process that output and store the historical logfile information in a database.</p> <div class="figure"> <a name="id37006165"></a><p class="title"><b>Figure 2.3. LOG2NDO Utility</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/fig7.png" alt="LOG2NDO Utility"></div> </div> </div> <br class="figure-break"> </div> <div class="section" title="FILE2SOCK"> <div class="titlepage"><div><div><h3 class="title"> <a name="id37006177"></a>FILE2SOCK</h3></div></div></div> <p>The FILE2SOCK utility is quite simple. Its reads input from a standard file (or STDIN) and writes all of that data to either a Unix domain socket or TCP socket. The data that is read is not processed in any way before it is sent to the socket.</p> <div class="figure"> <a name="id37006195"></a><p class="title"><b>Figure 2.4. FILE2SOCK Utility</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/fig8.png" alt="FILE2SOCK Utility"></div> </div> </div> <br class="figure-break"> <p>This utility is useful if you are directing the output of the NDOMOD event broker module and/or LOG2NDO utility to a standard file. Once these components finish writing their output to a file, you can use the FILE2SOCK utility to send the contents of the file to the NDO2DB daemon's TCP or Unix domain socket.</p> </div> <div class="section" title="NDO2DB"> <div class="titlepage"><div><div><h3 class="title"> <a name="ndo2db-description"></a>NDO2DB</h3></div></div></div> <p>The NDO2DB utility is designed to take the data output from the NDOMOD and LOG2NDO components and store it in a MySQL or PostgreSQL database.</p> <p>When it starts, the NDO2DB daemon creates either a TCP or Unix domain socket and waits for clients to connect. NDO2DB can run either as a standalone, multi-process daemon or under INETD (if using a TCP socket).</p> <div class="figure"> <a name="id37006241"></a><p class="title"><b>Figure 2.5. NDO2DB Daemon</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/fig9.png" alt="NDO2DB Daemon"></div> </div> </div> <br class="figure-break"> <p>Multiple clients can connect to the NDO2DB daemon's socket and transmit data simultaneously. A seperate NDO2DB process is spawned to handle each new client that connects. Data is read from each client and stored in a user-specified database for later retrieval and processing.</p> <div class="figure"> <a name="id37006253"></a><p class="title"><b>Figure 2.6. NDO2DB with multiple Clients</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/fig10.png" alt="NDO2DB with multiple Clients"></div> </div> </div> <br class="figure-break"> <p>The NDO2DB daemon currently supports only MySQL databases, but future support for PostgreSQL databases is planned.</p> </div> </div> <div class="navfooter"> <hr> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"> <a accesskey="p" href="ch02.html">Prev</a> </td> <td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td> <td width="40%" align="right"> <a accesskey="n" href="ch03.html">Next</a> </td> </tr> <tr> <td width="40%" align="left" valign="top">Chapter 2. Design en detail </td> <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td> <td width="40%" align="right" valign="top"> Chapter 3. Examples</td> </tr> </table> </div> <P class="copyright">© 2009 Nagios Development Team, http://www.nagios.org</P> </body> </html>