Menu

Tree [9667ce] master /
 History

HTTPS access


File Date Author Commit
 apps 2010-09-24 Andreas Ericsson Andreas Ericsson [436f6e] Add the merlin-apps package and revamp the spec...
 compat 2010-12-30 Andreas Ericsson Andreas Ericsson [37a061] Add compat/memrchr.c, as required by Solaris
 logs 2010-09-03 Andreas Ericsson Andreas Ericsson [fc1db8] Add logutils.[ch] and test-lparse
 op5build 2009-06-09 Peter Ostlin Peter Ostlin [f3aa56] Initial creation of epm build files
 sql 2011-01-20 Stephan Beal Stephan Beal [f89925] Initial checkin of merlin's Oracle SQL schema
 xdoc 2012-04-19 Andreas Ericsson Andreas Ericsson [f4f3ad] Add xdoc docs
 .gitignore 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 .mailmap 2012-03-26 Andreas Ericsson Andreas Ericsson [8209ec] Add .mailmap file to merge different authors
 COPYING 2009-04-22 Andreas Ericsson Andreas Ericsson [4265e1] Add licensing document COPYING
 HOWTO 2010-10-14 Andreas Ericsson Andreas Ericsson [dce950] HOWTO added
 Makefile 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 MerlinPDO.inc.php 2011-01-20 Stephan Beal Stephan Beal [d8d67f] Port object_importer to PDO
 README 2009-04-22 Andreas Ericsson Andreas Ericsson [62bea6] Make install procedure a bit nicer
 SPECS 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 TECHNICAL 2010-10-14 Andreas Ericsson Andreas Ericsson [9407bd] Add TECHNICAL, a brief overview of Merlin's int...
 auth.c 2010-09-03 Andreas Ericsson Andreas Ericsson [a293b3] Add the 'auth' api
 auth.h 2010-09-03 Andreas Ericsson Andreas Ericsson [a293b3] Add the 'auth' api
 binlog.c 2009-06-15 Andreas Ericsson Andreas Ericsson [a0b54f] Add sequential binary logging API
 binlog.h 2009-06-15 Andreas Ericsson Andreas Ericsson [a0b54f] Add sequential binary logging API
 bltest.c 2009-06-15 Andreas Ericsson Andreas Ericsson [a0b54f] Add sequential binary logging API
 cfgfile.c 2009-07-09 Andreas Ericsson Andreas Ericsson [34afe0] Update config API to match that of reports-module
 cfgfile.h 2009-07-09 Andreas Ericsson Andreas Ericsson [34afe0] Update config API to match that of reports-module
 check_latency.c 2010-05-09 Andreas Ericsson Andreas Ericsson [8d9f3c] Add check_latency
 codec.c 2010-10-17 Andreas Ericsson Andreas Ericsson [aef023] Rename 'data.c' -> 'codec.c'
 colors.h 2010-04-06 Andreas Ericsson Andreas Ericsson [bd5721] Merge branch 'master' into next
 compat.h 2010-12-10 Andreas Ericsson Andreas Ericsson [d35837] Add compat.h with runtime detection of endianness
 daemon.c 2008-08-25 Andreas Ericsson Andreas Ericsson [f8a38b] Renamed mrd.c to daemon.c
 daemon.h 2009-06-25 Andreas Ericsson Andreas Ericsson [ff4e50] Send events from pollers to nocs
 daemonize.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 daemonize.h 2009-04-22 Andreas Ericsson Andreas Ericsson [fda545] Revamp daemonize interface
 db_updater.c 2009-02-19 Andreas Ericsson Andreas Ericsson [1b1651] Add a db update handler to the Merlin daemon
 db_wrap.c 2010-12-07 Stephan Beal Stephan Beal [ea2320] Initial db abstraction bits (far from complete).
 db_wrap.h 2010-12-07 Stephan Beal Stephan Beal [ea2320] Initial db abstraction bits (far from complete).
 db_wrap_dbi.c 2010-12-07 Stephan Beal Stephan Beal [ea2320] Initial db abstraction bits (far from complete).
 db_wrap_dbi.h 2010-12-07 Stephan Beal Stephan Beal [ea2320] Initial db abstraction bits (far from complete).
 db_wrap_ocilib.c 2010-12-15 Stephan Beal Stephan Beal [292c48] added missing db_wrap_ocilib.c.
 doxy.conf 2012-04-19 Andreas Ericsson Andreas Ericsson [f4f3ad] Add xdoc docs
 example.conf 2009-03-17 Andreas Ericsson Andreas Ericsson [cd8269] Add example configuration file
 gen-version.sh 2009-06-29 Andreas Ericsson Andreas Ericsson [1f9936] Log version once initialization is completed
 hookinfo.h 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 hooks.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 import.c 2010-09-03 Andreas Ericsson Andreas Ericsson [1a89fa] Add the import and showlog applications
 import.php 2009-04-28 Andreas Ericsson Andreas Ericsson [956ad0] Add object config import script
 init.sh 2009-04-23 Andreas Ericsson Andreas Ericsson [fd016c] Add init-script
 install-merlin.sh 2009-04-22 Andreas Ericsson Andreas Ericsson [62bea6] Make install procedure a bit nicer
 io.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 io.h 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 ipc.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 ipc.h 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 kad.conf 2011-10-26 Andreas Ericsson Andreas Ericsson [09b385] Ship op5kad configuration file for merlin daemon
 logging.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 logutils.c 2010-09-03 Andreas Ericsson Andreas Ericsson [fc1db8] Add logutils.[ch] and test-lparse
 logutils.h 2010-09-03 Andreas Ericsson Andreas Ericsson [fc1db8] Add logutils.[ch] and test-lparse
 lparse.c 2010-09-03 Andreas Ericsson Andreas Ericsson [fcc47d] Add the lparse api to merlin
 lparse.h 2010-09-03 Andreas Ericsson Andreas Ericsson [fcc47d] Add the lparse api to merlin
 merlin.logrotate 2009-09-01 Johannes Dagemark Johannes Dagemark [b0703a] added logrotate file for merlind and melin_mod ...
 merlin.spec.in 2009-03-17 Andreas Ericsson Andreas Ericsson [263e93] First stab at a specfile for the merlin project
 merlin_logo.svg 2009-07-24 My Appelgren My Appelgren [553e7d] added the merlin logo to the merlin repo
 misc.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 module.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 module.h 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 mrln_logging.h 2012-08-21 Robin Sonefors Robin Sonefors [9562f3] Use system installed nagios headers
 net.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 net.h 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 noc_check.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 node.c 2010-05-12 Andreas Ericsson Andreas Ericsson [d49328] Rename protocol.[ch] to node.[ch]
 node.h 2010-05-12 Andreas Ericsson Andreas Ericsson [d49328] Rename protocol.[ch] to node.[ch]
 nrpe-merlin.cfg 2011-10-26 Andreas Ericsson Andreas Ericsson [9278e4] specfile: Add nrpe-merlin.cfg
 object_importer.inc.php 2009-05-11 Andreas Ericsson Andreas Ericsson [c72907] import: Split import.php into a command-line sc...
 oci8topdo.php 2011-02-08 Robin Sonefors Robin Sonefors [4aa1d4] Make object importer work with columns > 4000 c...
 ocimp.c 2011-03-18 Andreas Ericsson Andreas Ericsson [2e31e3] Add ocimp
 ocimp.h 2011-03-18 Andreas Ericsson Andreas Ericsson [2e31e3] Add ocimp
 oconf.c 2010-09-29 Andreas Ericsson Andreas Ericsson [f737dd] Introduce C-oconf
 pgroup.c 2013-02-25 Andreas Ericsson Andreas Ericsson [bf0d9e] module: Byebye control.c. Hello pgroup.c
 pgroup.h 2013-02-25 Andreas Ericsson Andreas Ericsson [bf0d9e] module: Byebye control.c. Hello pgroup.c
 poller_check.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 push_logs.sh 2008-06-12 Andreas Ericsson Andreas Ericsson [3b965f] push_logs.sh: A poor mans log sync
 queries.c 2012-10-22 Andreas Ericsson Andreas Ericsson [3a2061] module: Add the @merlin query handler address
 rename.c 2011-09-20 Robin Sonefors Robin Sonefors [9ce715] Log renames, add new renaming tool
 sha1.c 2010-09-28 Andreas Ericsson Andreas Ericsson [ad95ab] Add sha1 routines for calculating config file c...
 sha1.h 2010-09-28 Andreas Ericsson Andreas Ericsson [ad95ab] Add sha1 routines for calculating config file c...
 shared.c 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 shared.h 2006-03-27 Andreas Ericsson Andreas Ericsson [df7d01] Basic functionality and protocol stability
 showlog.c 2010-09-03 Andreas Ericsson Andreas Ericsson [1a89fa] Add the import and showlog applications
 slist.c 2010-05-31 Andreas Ericsson Andreas Ericsson [65037f] Add the slist api
 slist.h 2010-05-31 Andreas Ericsson Andreas Ericsson [65037f] Add the slist api
 sltest.c 2010-06-01 Andreas Ericsson Andreas Ericsson [cc7211] Add sltest.c, a test-program for the slist api
 sort-merge_logs.sh 2010-04-06 Andreas Ericsson Andreas Ericsson [bd5721] Merge branch 'master' into next
 sql.c 2009-02-19 Andreas Ericsson Andreas Ericsson [1b1651] Add a db update handler to the Merlin daemon
 sql.h 2009-02-19 Andreas Ericsson Andreas Ericsson [1b1651] Add a db update handler to the Merlin daemon
 state.c 2010-09-02 Andreas Ericsson Andreas Ericsson [ff8fb2] Break out non-sql dependant state machinery to ...
 state.h 2010-09-02 Andreas Ericsson Andreas Ericsson [ff8fb2] Break out non-sql dependant state machinery to ...
 status.c 2009-06-10 Andreas Ericsson Andreas Ericsson [2386c0] Introduce 'status.c'
 status.h 2009-06-11 Andreas Ericsson Andreas Ericsson [074848] Add status.h
 test-dbwrap.c 2010-12-07 Stephan Beal Stephan Beal [ea2320] Initial db abstraction bits (far from complete).
 test-lparse.c 2010-09-03 Andreas Ericsson Andreas Ericsson [fc1db8] Add logutils.[ch] and test-lparse
 test_utils.c 2009-02-25 Andreas Ericsson Andreas Ericsson [786019] Add blktest, a program to test blockifying/debl...
 test_utils.h 2010-04-06 Andreas Ericsson Andreas Ericsson [bd5721] Merge branch 'master' into next

Read Me

Requirements
------------
Merlin requires Nagios 4, and needs the libnagios-devel package
for building, as well as for running.

For running merlin with its default configuration, you'll need
to have libdbi-dbd-mysql and all of its dependencies (generally
libdbi-drivers, libdbi and mysql-libs) installed.

You will ofcourse also need an sql database supported by libdbi
(refer to the libdbi documentation for further information about
supported databases), as well as a Nagios installation that the
merlin module can plug in to. The import script is currently
limited to MySQL only, so that's currently the only database
supported.

For the import script to work, you need to have php-cli and
php-mysql installed. They may be named differently in your
distribution, but I'm sure you get the idea.

The install script requires administration privileges to create
its installation directories and copy files there, as well as
sql administration privileges in order to create the database
that merlin will populate for you.

GNU sed 4.0.9 or better is required for the install script to
be able to modify your nagios configuration files.


Compilation
-----------
Merlin doesn't support autoconf (and I'm reluctant to take
patches that makes it do so). You'll need to have libdbi-devel
installed. If it's not in a default location, please amend the
CPPFLAGS manually while running make, like so:

     make CPPFLAGS="-I/usr/local/include"


Installation
------------
There is an install-script provided here which will attempt to
make all the necessary modifications to your nagios.cfg file
as well as installing merlin on your system. Please run

  sh install-merlin.sh --dest-dir=/path/to/merlin \
           --nagios-cfg=/path/to/nagios.cfg \
		   --db-type=mysql --db-user=merlin --db-pass=merlin \
		   --db-name=merlin

Note that the install-merlin.sh script requires write access to
whatever directory you choose as --dest-dir, as well as access
to write to your nagios.cfg file.
Also note that the install script can only handle setting up
mysql databases at the moment. Patches welcome to make it also
handle postgresql and whatever else you feel there is a need for.
If a different database type is selected, the install script will
still work, but it will not create the database for you.

Configuration
-------------
Configuring merlin is pretty straight-forward. Check the example.conf
file that accompanies this release and you'll see most of the common
examples available.

The syntax is fairly standard, being made up of a key without
spaces and a value containing arbitrary characters (although no
semi-colons). A configuration statement is terminated either by a
newline or a semi-colon. A configuration statement starting with a
hash-character (#) is considered a comment. Thus,

  key = value; # comment

makes "key" the key, "value" the value, terminated by the semi-colon,
and "# comment" all of the comment.
Leading and trailing whitespace is ignored.

The thing it doesn't really cover very well is how to configure masters,
peers and pollers, which is described more in-depth here.

In order to set up a loadbalanced system (ie, 2 or more peers), all
you need to do is add a section similar to the following to your
merlin configuration files on your merlin-empowered Nagios systems.
Let's pretend we have "nagios1" and "nagios2" in the network and
you wish for them to be set up in loadbalanced/redundancy mode.
nagios1 has 192.168.1.1 as IP. nagios2 has 192.168.1.2. Both use
port 15551 (the default).

On nagios1, add the following section to your merlin.conf file:
  --------------
  peer nagios2 {
    address = 192.168.1.2;
    port = 15551; # optional, since 15551 is the default
  }
  --------------

On nagios2, add the following section to your merlin.conf file:
  --------------
  peer nagios1 {
    address = 192.168.1.1;
    port = 15551; # optional, since 15551 is the default
  }
  --------------

Assuming nagios2 is a poller-node instead, responsible for checking
hosts in germany, you need to create a hostgroup in Nagios containing
all the hosts in germany that you want nagios2 to check for you. Let's
assume you call that hostgroup "germany-hosts". Then you need to add
following sections to your merlin.conf files.

On nagios1 (the "master" server), add the following section:
  --------------
  poller nagios2 {
    address = 192.168.1.2;
	port = 15551;
	hostgroup = germany-hosts; # name of the hostgroup containing all
	                           # the hosts you want this poller to check
  }
  --------------

On nagios2 (the slave server), add the following section:
  --------------
  master nagios1 {
    address = 192.168.1.1;
	port = 15551;
  }
  --------------

Note that these configuration sections need to be in the base section
of the configuration file. They must *not* be inside the daemon section.
This is because the master server will disable checks for all its pollers
once those pollers connect, and therefore it needs to read the list of
available nodes at configuration time.

A merlin node can have up to 65534 neighbours (assuming your system
lets a single program have that many file-descriptors open). A neighbour
is, in merlin terminology, a node that merlin connects to directly, so
you can build arbitrarily large networks by just specifying multiple
tiers of pollers.

A single merlin node can have pollers, peers and master nodes in its own
neighbourhood. As such, a single merlin node can, at the same time be
a peer (to its peers), a master (to its pollers) and a poller (to its
masters). One section has to be added to the merlin.conf file for each
of the hosts in its neighbourhood. The section must contain the
address of the neighbour, the port the neighbour is listening to
(unless it's the default port 15551) and, if the neighbour is a poller,
the section *must* contain a hostgroup statement declaring which
hostgroup the poller is responsible for checking.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.