From collectd Wiki
(Difference between revisions)
Jump to: navigation, search
(add invert keyword for travallers to find)
Line 18: Line 18:
<Match "regex">
<Match "regex">
Host "^[^\\.]*$"
Host "^[^\\.]*$"
Invert false
Target "stop"
Target "stop"

Latest revision as of 13:40, 8 March 2018

RegEx match
Type: match
Status: supported
First version: 4.6
Copyright: 2008 Sebastian Harl
2008 Florian octo Forster
License: GPLv2
Manpage: collectd.conf(5)
List of Matches


[edit] Description

The RegEx match uses regular expressions to match values using their identifier. The identifier consists of the five parts that are used to identify each value list: Host, plugin, plugin instance, type, and type instance. You can configure one regular expression for each part – the RegEx match matches if all regular expressions match.

[edit] Synopsis

LoadPlugin "match_regex"
<Chain "PreCache">
  <Rule "ignore_non_fqdn">
    <Match "regex">
      Host "^[^\\.]*$"
      Invert false
    Target "stop"

The above example matches all values, where the host field does not contain at least one dot, and ignore them. This can be useful on server instances to filter out values from hosts that do not report their name as fully qualified domain name (FQDN).

[edit] Dependencies

  • none

[edit] History

The RegEx match has been available since Version 4.6.

Personal tools