What Host name based tagger is done for

You can define a tagger that will use the Host name to automatically add host templates to detected objects. The common tagger named regexp-tags can load new ip range rules with modules.

How to define a new Regexp rule

For each Regexp rule, you will need to define a new module and add it in the regexp-tags tagger configuration.

You can copy the sample module /etc/shinken/modules/sync-regexp-tag.cfg into a new file name and edit it:

 

define module{
  module_name       sync-regexp-tag-windows
  module_type       sync-regexp-tag
  matched_prop      host_name
  matched_regexp    .*srvwin.*
  method            append
  property          use
  value             windows
}

The properties are:

 

Then you must edit the ip-tags tagger definition to link your new module in the file /etc/shinken/taggers/regexp-tags.cfg:

 

define tagger {
  tagger_name    regexp-tags
  order          1
  modules        sync-regexp-tag,sync-regexp-tag-windows
  description     This tagger will tag host based on the host_name
}

 

Then you must restart your shinken-synchronizer daemon.