=encoding UTF-8 =head1 NAME collectd-threshold - Documentation of collectd's I =head1 SYNOPSIS LoadPlugin "threshold" WarningMin 0.00 WarningMax 1000.00 FailureMin 0.00 FailureMax 1200.00 Invert false Instance "bar" =head1 DESCRIPTION Starting with version C<4.3.0> I has support for B. By that we mean that the values are not only stored or sent somewhere, but that they are judged and, if a problem is recognized, acted upon. The only action the I takes itself is to generate and dispatch a I. Other plugins can register to receive notifications and perform appropriate further actions. Since systems and what you expect them to do differ a lot, you can configure I for your values freely. This gives you a lot of flexibility but also a lot of responsibility. Every time a value is out of range, a notification is dispatched. This means that the idle percentage of your CPU needs to be less then the configured threshold only once for a notification to be generated. There's no such thing as a moving average or similar - at least not now. Also, all values that match a threshold are considered to be relevant or "interesting". As a consequence collectd will issue a notification if they are not received for B iterations. The B configuration option is explained in section L. If, for example, B is set to "2" (the default) and some hosts sends its CPU statistics to the server every 60 seconds, a notification will be dispatched after about 120 seconds. It may take a little longer because the timeout is checked only once each B on the server. When a value comes within range again or is received after it was missing, an "OKAY-notification" is dispatched. =head1 CONFIGURATION Here is a configuration example to get you started. Read below for more information. LoadPlugin "threshold" WarningMin 0.00 WarningMax 1000.00 FailureMin 0.00 FailureMax 1200.00 Invert false Instance "bar" Instance "eth0" FailureMax 10000000 DataSource "rx" Instance "idle" FailureMin 10 Instance "cached" WarningMin 100000000 DataSource "midterm" FailureMax 4 Hits 3 Hysteresis 3 There are basically two types of configuration statements: The C, C, and C blocks select the value for which a threshold should be configured. The C and C blocks may be specified further using the C option. You can combine the block by nesting the blocks, though they must be nested in the above order, i.e. C may contain either C and C blocks, C may only contain C blocks and C may not contain other blocks. If multiple blocks apply to the same value the most specific block is used. The other statements specify the threshold to configure. They B be included in a C block. Currently the following statements are recognized: =over 4 =item B I =item B I Sets the upper bound of acceptable values. If unset defaults to positive infinity. If a value is greater than B a B notification will be created. If the value is greater than B but less than (or equal to) B a B notification will be created. =item B I =item B I Sets the lower bound of acceptable values. If unset defaults to negative infinity. If a value is less than B a B notification will be created. If the value is less than B but greater than (or equal to) B a B notification will be created. =item B I Some data sets have more than one "data source". Interesting examples are the C data set, which has received (C) and sent (C) bytes and the C data set, which holds C and C operations. The system load data set, C, even has three data sources: C, C, and C. Normally, all data sources are checked against a configured threshold. If this is undesirable, or if you want to specify different limits for each data source, you can use the B option to have a threshold apply only to one data source. =item B B|B If set to B the range of acceptable values is inverted, i.e. values between B and B (B and B) are not okay. Defaults to B. =item B B|B Sets how often notifications are generated. If set to B one notification will be generated for each value that is out of the acceptable range. If set to B (the default) then a notification is only generated if a value is out of range but the previous value was okay. This applies to missing values, too: If set to B a notification about a missing value is generated once every B seconds. If set to B only one such notification is generated until the value appears again. =item B B|B Sets how OKAY notifications act. If set to B one notification will be generated for each value that is in the acceptable range. If set to B (the default) then a notification is only generated if a value is in range but the previous value was not. =item B B|B If set to B, the minimum and maximum values given are interpreted as percentage value, relative to the other data sources. This is helpful for example for the "df" type, where you may want to issue a warning when less than 5E% of the total space is available. Defaults to B. =item B I Sets the number of occurrences which the threshold must be raised before to dispatch any notification or, in other words, the number of Bs that the threshold must be match before dispatch any notification. =item B I Sets the hysteresis value for threshold. The hysteresis is a method to prevent flapping between states, until a new received value for a previously matched threshold down below the threshold condition (B, B or everything else) minus the hysteresis value, the failure (respectively warning) state will be keep. =item B B|B If set to B (the default), a notification with severity C will be created when a matching value list is no longer updated and purged from the internal cache. When this happens depends on the I of the value list and the global B setting. See the B and B settings in L for details. If set to B, this event will be ignored. =back =head1 SEE ALSO L, L =head1 AUTHOR Florian Forster EoctoEatEcollectd.orgE