[Check_mk (english)] Can we use Regular Expressions to Define Tags?

Victor Carpetto victor at owlbydesign.com
Sat Aug 6 20:18:55 CEST 2011


When I have some time I'll post how to do this.  Using powershell makes it very easy to extract the names from AD.  It's the python / sed part that is more complex.


-----Original Message-----
From: Florian Heigl [mailto:fh at mathias-kettner.de] 
Sent: Saturday, August 06, 2011 2:14 PM
To: Victor Carpetto; checkmk-en at lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Can we use Regular Expressions to Define Tags?

On 08/06/2011 05:04 PM, Victor Carpetto wrote:
> Is it possible to use a RegEx pattern to apply tags to all hosts native to check_mk?  [...] looking to auto-mate the import of hosts into check_mk.

Very shortest answer:
You can do (almost?) anything that python can do.
Take care to indicate helper variables using _prefix.

for example you could open an exported file, append the tags that apply to all systems in that file, and use this to generate another python list.
and then you += (append) this to your all_hosts list.

obviously, if you know someone who knows windows ldap/AD *and* python well, then you have no reason for any 3rd party AD export software to do this :>

Whatever solution you come up with, please check if you can take the time to make some public documentation about it - this will help many people who aren't aware *how* much they can do in the cmk config files.

[ And if it doesn't work out, let us know :) ]

Good luck!

Mathias Kettner GmbH  |  \/  | |/ /   M A T H I A S   K E T T N E R
Florian Heigl         | |\/| | ' /
Steinstr. 44          | |  | | . \        Linux Beratung & Schulung
81667 München         |_|  |_|_|\_\       http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail:  fh at mathias-kettner.de

More information about the checkmk-en mailing list