Skip to content

Commit

Permalink
fix zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Dec 10, 2024
1 parent c667c29 commit a0e7a96
Show file tree
Hide file tree
Showing 23 changed files with 128 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ sub new {
'port:s' => { name => 'port', default => 443 },
'timeout:s' => { name => 'timeout' },
# These options are here to defined conditions about which status the plugin will return regarding HTTP response code
'unknown-status:s' => { name => 'unknown_status', default => '%{http_code} < 200 or %\{http_code\} >= 300' },
'unknown-status:s' => { name => 'unknown_status', default => '%\{http_code\} < 200 or %\{http_code\} >= 300' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '' }
});
Expand Down Expand Up @@ -584,8 +584,8 @@ sub set_counters {
# All properties below (before et) are related to the catalog_status_ng catalog function imported at the top of our mode
type => 2,
# These properties allow you to define default thresholds for each status but not mandatory.
warning_default => '%{health} =~ /yellow/',
critical_default => '%{health} =~ /red/',
warning_default => '%\{health\} =~ /yellow/',
critical_default => '%\{health\} =~ /red/',
# To simplify, manage things related to how get value in the counter, what to display and specific threshold
# check because of the type of the data (string)
set => {
Expand Down Expand Up @@ -1006,12 +1006,12 @@ behind the scenes.
Execute this command to see how it evolved since the last execution. We modify the command with some
additional parameters:
- `--warning-health='%{health} eq "care"'` to avoid getting a WARNING, put any value that will not match yellow. Providing it
- `--warning-health='%\{health\} eq "care"'` to avoid getting a WARNING, put any value that will not match yellow. Providing it
as a parameter will automatically override the hardcoded default code value
- `--verbose` will display the long output and the details for each `type => 1` counters
```bash
perl centreon_plugins.pl --plugin=apps::myawesomeapp::api::plugin --mode=app-metrics --hostname=run.mocky.io --warning-health='%{health} eq "care"' --verbose
perl centreon_plugins.pl --plugin=apps::myawesomeapp::api::plugin --mode=app-metrics --hostname=run.mocky.io --warning-health='%\{health\} eq "care"' --verbose
```
Here is the expected output:
Expand Down Expand Up @@ -1066,7 +1066,7 @@ Check my-awesome-app metrics exposed through its API
Warning and critical threshold for application health string.
Defaults values are: --warning-health='%{health} eq "yellow"' --critical-health='%{health} eq "red"'
Defaults values are: --warning-health='%\{health\} eq "yellow"' --critical-health='%\{health\} eq "red"'
=item B<--warning/critical-select>
Expand Down Expand Up @@ -1106,8 +1106,8 @@ Mode:
--warning/critical-health
Warning and critical threshold for application health string.
Defaults are: --warning-health='%{health} eq "yellow"' &
--critical-health='%{health} eq "red"'
Defaults are: --warning-health='%\{health\} eq "yellow"' &
--critical-health='%\{health\} eq "red"'
--warning/critical-select
Warning and critical threshold for select queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ is able to monitor a resource using a command like this one (replace the sample
--proto='https' \
--filter-name='' \
--warning-status='' \
--critical-status='%{status} !~ /online/i' \
--critical-status='%\{status\} !~ /online/i' \
--warning-usage='' \
--critical-usage='' \
--warning-usage-free='' \
Expand Down Expand Up @@ -445,8 +445,8 @@ All available options for each service template are listed below:
|:--------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| --filter-alert-name | Filter alerts by name (can be a regexp). |
| --filter-alert-type | Filter alerts by type (can be a regexp). |
| --warning-status | Define the conditions to match for the status to be WARNING (default: '%{severity} =~ /warning/') You can use the following variables: %\{severity\}, %\{status\}, %\{type\}, %\{name\}, %\{since\} |
| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{severity} =~ /critical/'). You can use the following variables: %\{severity\}, %\{status\}, %\{type\}, %\{name\}, %\{since\} |
| --warning-status | Define the conditions to match for the status to be WARNING (default: '%\{severity\} =~ /warning/') You can use the following variables: %\{severity\}, %\{status\}, %\{type\}, %\{name\}, %\{since\} |
| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%\{severity\} =~ /critical/'). You can use the following variables: %\{severity\}, %\{status\}, %\{type\}, %\{name\}, %\{since\} |
| --memory | Only check new alerts. |

</TabItem>
Expand All @@ -460,8 +460,8 @@ All available options for each service template are listed below:
| --filter-client-name | Filter jobs by client name (can be a regexp). |
| --filter-client-group | Filter jobs by client groups (can be a regexp). |
| --timeframe | Set timeframe in seconds (E.g '3600' to check last 60 minutes). |
| --warning-status | Define the conditions to match for the status to be WARNING (default: '%{status} =~ /abnormal/i') You can use the following variables: %\{display\}, %\{status\}, %\{type\} |
| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} =~ /errors\|failed/i'). You can use the following variables: %\{display\}, %\{status\}, %\{type\} |
| --warning-status | Define the conditions to match for the status to be WARNING (default: '%\{status\} =~ /abnormal/i') You can use the following variables: %\{display\}, %\{status\}, %\{type\} |
| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%\{status\} =~ /errors\|failed/i'). You can use the following variables: %\{display\}, %\{status\}, %\{type\} |
| --warning-long | Set warning threshold for long jobs. You can use the following variables: %\{display\}, %\{status\}, %\{elapsed\}, %\{type\} |
| --critical-long | Set critical threshold for long jobs. You can use the following variables: %\{display\}, %\{status\}, %\{elapsed\}, %\{type\} |
| --warning-* --critical-* | Thresholds. Can be: 'jobs-total'. |
Expand All @@ -487,7 +487,7 @@ All available options for each service template are listed below:
| --filter-name | Filter storage pools by name (can be a regexp). |
| --unknown-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %\{status\}, %\{display\} |
| --warning-status | Define the conditions to match for the status to be WARNING. You can use the following variables: %\{status\}, %\{display\} |
| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} !~ /online/i'). You can use the following variables: %\{status\}, %\{display\} |
| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%\{status\} !~ /online/i'). You can use the following variables: %\{status\}, %\{display\} |
| --warning-* --critical-* | Thresholds. Can be: 'usage' (B), 'usage-free' (B), 'usage-prct' (%). |

</TabItem>
Expand Down
Loading

0 comments on commit a0e7a96

Please sign in to comment.