Threshold and range standards

Most checks are based on some definite range of threshold values. For example, generate critical alert if the CPU load is more than 80 percent, warning alert if it is between 60 and 80 percent. These values are not restricted to percentages, they can be virtually any numbers depending on our check's logic and requirements.

Most check plugins follow a convention in taking threshold ranges as command-line arguments. This convention may not be followed by all plugins, but most of the standard ones do. This is a recommended way of taking threshold ranges so that it is easy to understand the usage of the plugin by other potential users. The ranges are generally in following format:

[@]start:end

Things to keep in mind about various usages and corresponding interpretations of the following:

  • Range is indicated by a start value and an end value, and is inclusive of both.
  • Only start means end is infinity; only end means start is zero (note that the latter does not need a colon (:)).
  • Alert is raised if value is outside the range. If @ is used, alert is raised if value is inside the range.

Let's look at some examples of ranges:

Range example

Generate alert if value is

10:20

<10 or >20 (outside range {10..20})

10:

<10 (outside range {10..inf})

10

>10 (outside range {0..10})

@10:20

>=10 and <=20 (inside range {10..20})

These threshold values/ranges are usually used for generating warning and critical alerts. The -w command-line switch is used to specify a threshold value/range for the warning alert, and the -c switch is used to specify the threshold value/range for the critical alert. This, again, is a convention, many plugins may not follow.

And some command-line examples are given in the following table:

Command line

Interpretation

check_sample -w10 -c20

Critical if >20, warning if >10

check_sample -w10: -c20

Critical if >20, warning if <10

check_sample -w20:30 -c10:40

Critical if <10 or >40, warning if <20 or >30

This is just a convention for using the plugins. Many plugins don't follow it, and it does not apply to plugins that don't need threshold ranges.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.123.34