hi,
It's getting the 71% from the perf data 'E: free %'=71%;10;5;0;100, - it anticipates hitting 70.38 in 0.0 days, and is
rounding up (worse case scenario).
If you want to set a specific value for the warning you can check out the
--critical-uses-custom
--warning-uses-custom
--custom-value=CUSTOM_VALUE
options, see below:
Code: Select all
[root@gs-cent8-23-82 libexec]# ./check_capacity_planning.py -h
Usage: check_capacity_planning.py: alert based on the time until a perfdata value is expected to become CRITICAL.
usage: check_capacity_planning.py -H <host-name> -d <perdata-name>[,<perfdata-name>...] --use-warning|--use-critical|--min <min>|--max <max> [options...]
Options:
-h, --help show this help message and exit
-H HOST_NAME, --host-name=HOST_NAME
The name of the host which you're monitoring
(incompatible with hostgroup/servicegroup)
-S SERVICE_DESCRIPTION, --service-description=SERVICE_DESCRIPTION
The name of the service which you're monitoring
(requires host-name, incompatible with
hostgroup/servicegroup)
-t TIMEOUT, --timeout=TIMEOUT
Set the timeout duration in seconds. Defaults to never
timing out.
-w WARNING, --warning=WARNING
How far in advance of the predicted threshold to start
returning WARNING. Valid units are d, w, m, y (for
days, weeks, months, and years respectively). If left
empty, plugin does not alert WARNING.
-c CRITICAL, --critical=CRITICAL
How far in advance of the predicted threshold to start
returning CRITICAL. Valid units are d, w, m, y (for
days, weeks, months, and years respectively). If left
empty, plugin does not alert CRITICAL.
-m METHOD, --method=METHOD
The extrapolation method used for prediction. Should
be one of 'holt-winters', 'linear', 'quadratic',
'cubic' (only the first character is checked).
Defaults to holt-winters
-d DATA_SOURCE, --data-source=DATA_SOURCE
The perfdata name for which you are planning
-l LOOKAHEAD, --lookahead=LOOKAHEAD
How far in advance to look ahead when calculating
predicted values. Defaults to 8w (8 weeks).
-v, --verbose Print more verbose error messages.
-V, --version Print the version number and exit.
--debug Prints additional text in place of service output.
--warning-uses-critical
If this flag is set, this plugin will alert WARNING
based on the forecast against the performance data's
CRITICAL value
--warning-uses-custom
If this is set to a number, this plugin will alert
WARNING based on the forecast against a custom
value.Requires that --custom-value is set.
--warning-is-minimal If this flag is set, this plugin will alert based on
when forecasted data goes below the desired value.
--critical-uses-warning
If this flag is set, this plugin will alert CRITICAL
based on the forecast against the performance data's
WARNING value
--critical-uses-custom
If this is set to a number, this plugin will alert
CRITICAL based on the forecast against a custom
value.Requires that --custom-value is set.
--critical-is-minimal
If this flag is set, this plugin will alert based on
when forecasted data goes below the desired value.
--custom-value=CUSTOM_VALUE
The value to use with --warning-uses-custom,
--critical-uses-custom.
[root@gs-cent8-23-82 libexec]#
Thanks