On Fri, 15 Jun 2012, Andreas Gossweiler wrote: > I would like to setup Icinga in a configuration as < single > server / multiple instances >. I managed to setup the separation > of the configuration files for the icinga daemon. There is a > daemon per instance running and I see in the appropriate icinga.log > files, that the various checks are fired and delivering there results.
I fought with this for some time in my old Nagios configuration where I had several instances running, each with a database connection and each with the "classic web" interface. Here's how I did it: The executables for core can be shared amongst as many instances as desired provided that the following are true: 1) Each instance MUST have its own configuration tree, 2) the main core configuration file MUST be called out on the Nagios/Icinga process invocation line, 3) the NODutils/IDOutils configuration file (specified either in the broker call or the module file) MUST be different for each instance and MUST call out the unique instance name, and 4) the locations of the log, command, retention, and status files MUST be in different locations for each (e.g. the "var" hierarchy). The CGI executables are more problematic in that they have the name of the "cgi.cfg" file compiled in, and there's no way to pass it in via an invocation line. This means: 1) building new CGI executables for each instance with the --prefix= properly specified for each, 2) different webserver configurations for each instance that point to the proper CGI executables and the proper icinga/nagios.log and command files. > I have two problems: > > 1.) I do not see any entries in the database (in > the table icinga_instances I only have one entry - the > default instance ...) See above. The line in idoutils.cfg that starts with "instance_name=" MUST have a different tag following the "=" sign; if they all say "default" then the instances WILL step on one another. Recall that EACH instance MUST have its own idoutils.cfg file that differs from ALL the other instances. > 2.) How do I have to setup the icinga-web interface, > that based on the login, the appropriate instance will > be shown (I would like separate customers ...). This one is outside my scope of experience; however, in "classic web" one can specify different credential files depending on whatever instance one wants to connect to. In my case, all the "active" instances (those with active checks enabled) report to a single "global" passive instance via obsessing and passive checks; this might be a stepping-off point for a "superadmin". > Is there a detailed step by step howto to do so? To my knowledge, no; when I did a multiple-instance single-server design it seemed like I was cutting new ground. My experience with the project is summarised above. > Icinga 1.7 with ido on mysql / CentOS6.2 The basic concepts are not OS-specific nor, in all probability, database-specific. The prototyping in my case was done on Solaris with the production system on CentOS. Cheers! +------------------------------------------------+---------------------+ | Carl Richard Friend (UNIX Sysadmin) | West Boylston | | Minicomputer Collector / Enthusiast | Massachusetts, USA | | mailto:crfri...@rcn.com +---------------------+ | http://users.rcn.com/crfriend/museum | ICBM: 42:22N 71:47W | +------------------------------------------------+---------------------+ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ icinga-users mailing list icinga-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/icinga-users