Monitor & Collector in One, can it be done?

Request new features for NConf

Monitor & Collector in One, can it be done?

Postby WizRd » Fri Jul 02, 2010 07:14

Background
Site 1: Monitor Server
Site 2: Collector Server
Site 3: Collector Server
Site 4: Collector Server
Site 5: Collector Server

Sites 2 - 5 all have local checks which the configuration does perfectly. After the tarball is distributed between all the sites each site looks at its own hostname and performs all the required checks and feeds them back to Site 1 via nsca. - Works perfectly!

Problem
Site 1 contains approximately 80 hosts that need to be monitored and we are unable to purchase another Collector Server for Site 1. I have setup Site 1 as a collector and created a dummy Monitor server in Nconf as was suggested in another forum post, which I can no longer find. This has successfully enabled active checks for all Site 1 hosts being checked.

Site 1 nagios instance references global / Dummy_Monitor config directories. - The dummy monitor configs are the problem.
Sites 2 - 5 nagios instance reference global / own host name config directories. - These are working perfectly and as expected.

For the hosts at Site 1 I have created a Host & Server Template that enables Active Checks and Disables Passive checks and applied this to both the Host and Services associated with the hosts at site 1. When looking at Nagios at Site 1 it shows all services as having their check command as service_is_stale instead of the configured check command. I retrieved this information from the configuration files in Dummy_Monitor directory and services.cfg file.

I know this can be done manually in the configuration files as this is how I have done it in the past, can this be achieved in NConf that a Monitor server is capable of performing active checks for both Hosts and Services or do I need to use the static_config directory for all hosts at Site 1 and allow NConf to generate the rest of the configuration files?
WizRd
starter
starter
 
Posts: 2
Joined: Thu Apr 08, 2010 06:23

Re: Monitor & Collector in One, can it be done?

Postby agargiulo » Fri Jul 02, 2010 09:51

Hi.

NConf does not forsee a Nagios instance to be both a "Monitor" and a "Collector" at the same time. However, there are ways you can achieve this within the tool. First of all let me highlight the differences between the collector config files and the monitor config files. These are the main options that defer:

Collector
Code: Select all
active_checks_enabled                 1
passive_checks_enabled                0
notifications_enabled                 0
check_freshness                       0
check_command                         [is set]

Monitor
Code: Select all
active_checks_enabled                 0
passive_checks_enabled                1
notifications_enabled                 1
check_freshness                       1
check_command                         service_is_stale
parents                               [is set]


There are several ways of enabling active checking on a Monitor server. The easiest way would be to edit the Monitor server in NConf and set the "active checking" flag to 1. This is a global setting for all hosts and services on a Monitor and will get rid of the "service_is_stale" commands in your Monitor config. Next you'll probably want to disable active checking again for a part of your servers. This is best done with templates.

A different aproach would be to keep the standard settings of you Monitor and to selectively replace the "check_command" in the generated config with a shell script etc.

Hope this helps.
User avatar
agargiulo
NConf developer
NConf developer
 
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland

Re: Monitor & Collector in One, can it be done?

Postby WizRd » Thu Jul 08, 2010 07:52

Hi Agargiulo,

Thanks for the reply, it is a shame that it needs to be done this way. We have resorted to manual configuration for the hosts / services that we need the monitor to actively check and are using the static_cfg section.

I can only hope that you may "allow" this in future releases as I doubt I would be the only one trying to achieve this.

Thanks for your help and support!
WizRd
starter
starter
 
Posts: 2
Joined: Thu Apr 08, 2010 06:23

Re: Monitor & Collector in One, can it be done?

Postby agargiulo » Thu Jul 08, 2010 12:02

I agree. I will add your input to the list of features to be implemented in one of the next releases. It will not be part of release 1.3, because that release is already full. The feature might come in a later release, but does not have very high priority.
User avatar
agargiulo
NConf developer
NConf developer
 
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland

Re: Monitor & Collector in One, can it be done?

Postby jekader » Fri Mar 30, 2012 08:11

Sorry for bringing up this old thread, but I wanted to ask if there are any updates or thoughts on this topic.

I'm migrating an icinga setup to nconf. It has a central monitor+collector and several more distributed collectors.
What would you advise me to do:
1)run two separate icinga instances on the central server
2)somehow modify nconf to generate a monitor+collector config
3)write a script that merges the monitor and collector configs for the central server
4)bring up the monitor on a separate host
5)etc?
jekader
beginner
beginner
 
Posts: 10
Joined: Fri Mar 30, 2012 07:59

Re: Monitor & Collector in One, can it be done?

Postby scrat » Fri Mar 30, 2012 12:17

Hi,

First of all, it is possible to configure a host as monitor and collector with NConf, but I don't recommend this setup:
See viewtopic.php?f=14&t=450&p=1574#p1574

It's easier to have 1 monitor und multiple collectors.
Create a new virtual machine for your collector and use a dedicated monitor.

If you don't have an virtual environment, you can also use 2 icinga instances on one host.


Regards,
Rene
User avatar
scrat
NConf enthusiast
NConf enthusiast
 
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria

Re: Monitor & Collector in One, can it be done?

Postby jekader » Thu Apr 05, 2012 14:01

Thanks for the advice!

I'm now bringing up a new VM to be a monitor and afterwards will "demote" the current monitor+collector to just a collector.
jekader
beginner
beginner
 
Posts: 10
Joined: Fri Mar 30, 2012 07:59


Return to Feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron