[Check_mk (english)] can you seperate main.mk?

Mathias Kettner mk at mathias-kettner.de
Sat Oct 24 11:38:33 CEST 2009


Hi Michael,
> I’ve only just started to play around with check_mk and I have to say I 
> am impressed by the ease of setting it up and the power of it. but I 
> wanted to ask one question

The answer is simple: just as Nagios, check_mk reads in all files
in a subdirectory of that where main.mk lies. Usually this is
conf.d/. All files in there named in *.mk are read in *after*
main.mk.

Details are discussed here:

http://mathias-kettner.de/checkmk_configfiles.html

After a change to files there, you need to regenerate
the Nagios config files and (of course) restart Nagios.
This is done by a simple 'check_mk -R'.

Greetings,

Mathias


> 
>  
> 
> Is it possible to get the main.mk file to reference other files that 
> hold config data?
> 
>  
> 
> The reason I ask is we are currently using nagios to monitor virtual 
> servers that are spun up and destroyed on a fairly regular basis, so for 
> each server  that is provisioned  we write a separate nagios config file 
> and drop it into /usr/local/nagios/etc/objects. This config file 
> includes all data for that image (host, hostgroup, contact and service 
> checks), this means we can create the configs programaticly on a 
> provision and restart nagios for it to be read in and when the virtual 
> server is no longer needed the config file is just deleted from the file 
> structure and nagios restarted.
> 
>  
> 
> What I would like to do is a similar process for check_mk so we would 
> have a config per server that includes the hostname and ip address as 
> well as any specific host_group, parent info etc and somehow have 
> main.mk read this data in when it’s called
> 
>  
> 
> So is this possible?
> 
>  
> 
> Cheers
> 
>  
> 
> Mike
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> checkmk-en mailing list
> checkmk-en at lists.mathias-kettner.de
> http://mathias-kettner.de/mailman/listinfo/checkmk-en


-- 
                        __  __ _  __
Mathias Kettner       |  \/  | |/ /   M A T H I A S   K E T T N E R
Preysingstr. 74       | |\/| | ' /
81667 München         | |  | | . \        Linux Beratung & Schulung
089 / 444 09 662      |_|  |_|_|\_\       http://mathias-kettner.de



More information about the checkmk-en mailing list