Skip to content

Commit dfedcb2

Browse files
committed
Improved filter parameter docs
1 parent bd9582a commit dfedcb2

File tree

13 files changed

+596
-491
lines changed

13 files changed

+596
-491
lines changed

docs/docs/reference/check/CheckExternalScripts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ parent=default
386386
* alias_sched_task
387387
* alias_service
388388
* alias_service_ex
389+
* alias_top_memory_users
390+
* alias_top_memory_users_ex
389391
* alias_up
390392
* alias_volumes
391393
* alias_volumes_loose

docs/docs/reference/check/CheckHelpers.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -468,26 +468,23 @@ Run a check and filter performance data.
468468

469469
`filter_perf` while badly named can be used to prost process performance data.
470470

471-
A good example is sorting performance data or limiting the number of performance data items shown.
471+
It can be useful for sorting performance data or limiting the number of performance data items shown.
472472

473-
474-
In its most basic form you can run `filter_perf command=COMMAND arguments REGULAR ARGUMENTS` in your case:
473+
In its most basic form you can run `filter_perf command=COMMAND arguments REGULAR ARGUMENTS` for example `check_process`:
475474
```
476475
filter_perf command=check_process arguments "filter=exe not in ('sqlservr.exe')" "warn=working_set > 3G" "crit=working_set > 5G"
477476
L cli WARNING: WARNING: clion64.exe=started
478477
L cli Performance data: ' ws_size'=0GB;3;5 ' ws_size'=0GB;3;5 ' ws_size'=0GB;3;5 ' ...
479478
```
480479

481-
This will not do an anything by it self but now you have the option for instance to sort the performance data by adding `sort=normal`:
480+
This will not do an anything by itself but we can for instance dort performance data entries by adding `sort=normal`:
482481
```
483482
filter_perf sort=normal command=check_process arguments "filter=exe not in ('sqlservr.exe')" "warn=working_set > 3G" "crit=working_set > 5G"
484483
L cli WARNING: WARNING: clion64.exe=started
485484
L cli Performance data: 'clion64.exe ws_size'=3.30851GB;3;5 'Rider.Backend.exe ws_size'=1.80017GB;3;5 'clangd.exe ws_size'=1.4822GB;3;5 'devenv.exe ws_size'=1.14938GB;3;5 ...
486485
```
487486

488-
As you can see we now have the biggest process at the top.
489-
490-
Now this still return a million entries so you can add `limit=5` to only return the first 5 values:
487+
And further can also limit the number of results shown by adding `limit=5` like so:
491488
```
492489
filter_perf sort=normal limit=5 command=check_process arguments "filter=exe not in ('sqlservr.exe')" "warn=working_set > 3G" "crit=working_set > 5G"
493490
L cli WARNING: WARNING: clion64.exe=started
@@ -681,29 +678,34 @@ This is the syntax for the base names of the performance data.
681678
#### Filter keywords
682679

683680

684-
| Option | Description |
685-
|---------------|--------------------------------------------------------------------------------------------------------------|
686-
| count | Number of items matching the filter. Common option for all checks. |
687-
| crit | Major version number |
688-
| crit_count | Number of items matched the critical criteria. Common option for all checks. |
689-
| crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
690-
| detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
691-
| key | Major version number |
692-
| list | A list of all items which matched the filter. Common option for all checks. |
693-
| max | Major version number |
694-
| message | Major version number |
695-
| min | Major version number |
696-
| ok_count | Number of items matched the ok criteria. Common option for all checks. |
697-
| ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
698-
| problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
699-
| problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
700-
| status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
701-
| total | Total number of items. Common option for all checks. |
702-
| unit | Major version number |
703-
| value | Major version number |
704-
| warn | Major version number |
705-
| warn_count | Number of items matched the warning criteria. Common option for all checks. |
706-
| warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
681+
| Option | Description |
682+
|---------|----------------------|
683+
| crit | Major version number |
684+
| key | Major version number |
685+
| max | Major version number |
686+
| message | Major version number |
687+
| min | Major version number |
688+
| unit | Major version number |
689+
| value | Major version number |
690+
| warn | Major version number |
691+
692+
**Common options for all checks:**
693+
694+
| Option | Description |
695+
|---------------|--------------------------------------------------------------------------------|
696+
| count | Number of items matching the filter. |
697+
| crit_count | Number of items matched the critical criteria. |
698+
| crit_list | A list of all items which matched the critical criteria. |
699+
| detail_list | A special list with critical, then warning and finally ok. |
700+
| list | A list of all items which matched the filter. |
701+
| ok_count | Number of items matched the ok criteria. |
702+
| ok_list | A list of all items which matched the ok criteria. |
703+
| problem_count | Number of items matched either warning or critical criteria. |
704+
| problem_list | A list of all items which matched either the critical or the warning criteria. |
705+
| status | The returned status (OK/WARN/CRIT/UNKNOWN). |
706+
| total | Total number of items. |
707+
| warn_count | Number of items matched the warning criteria. |
708+
| warn_list | A list of all items which matched the warning criteria. |
707709

708710

709711
### xform_perf

docs/docs/reference/check/CheckLogFile.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -198,34 +198,39 @@ In other words if one file contains an error the entire check will result in err
198198
#### Filter keywords
199199

200200

201-
| Option | Description |
202-
|---------------|--------------------------------------------------------------------------------------------------------------|
203-
| column() | Fetch the value from the given column number. |
204-
| column1 | The value in the first column |
205-
| column2 | The value in the second column |
206-
| column3 | The value in the third column |
207-
| column4 | The value in the 4:th column |
208-
| column5 | The value in the 5:th column |
209-
| column6 | The value in the 6:th column |
210-
| column7 | The value in the 7:th column |
211-
| column8 | The value in the 8:th column |
212-
| column9 | The value in the 9:th column |
213-
| count | Number of items matching the filter. Common option for all checks. |
214-
| crit_count | Number of items matched the critical criteria. Common option for all checks. |
215-
| crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
216-
| detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
217-
| file | The name of the file |
218-
| filename | The name of the file |
219-
| line | Match the content of an entire line |
220-
| list | A list of all items which matched the filter. Common option for all checks. |
221-
| ok_count | Number of items matched the ok criteria. Common option for all checks. |
222-
| ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
223-
| problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
224-
| problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
225-
| status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
226-
| total | Total number of items. Common option for all checks. |
227-
| warn_count | Number of items matched the warning criteria. Common option for all checks. |
228-
| warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
201+
| Option | Description |
202+
|----------|-----------------------------------------------|
203+
| column() | Fetch the value from the given column number. |
204+
| column1 | The value in the first column |
205+
| column2 | The value in the second column |
206+
| column3 | The value in the third column |
207+
| column4 | The value in the 4:th column |
208+
| column5 | The value in the 5:th column |
209+
| column6 | The value in the 6:th column |
210+
| column7 | The value in the 7:th column |
211+
| column8 | The value in the 8:th column |
212+
| column9 | The value in the 9:th column |
213+
| file | The name of the file |
214+
| filename | The name of the file |
215+
| line | Match the content of an entire line |
216+
217+
**Common options for all checks:**
218+
219+
| Option | Description |
220+
|---------------|--------------------------------------------------------------------------------|
221+
| count | Number of items matching the filter. |
222+
| crit_count | Number of items matched the critical criteria. |
223+
| crit_list | A list of all items which matched the critical criteria. |
224+
| detail_list | A special list with critical, then warning and finally ok. |
225+
| list | A list of all items which matched the filter. |
226+
| ok_count | Number of items matched the ok criteria. |
227+
| ok_list | A list of all items which matched the ok criteria. |
228+
| problem_count | Number of items matched either warning or critical criteria. |
229+
| problem_list | A list of all items which matched either the critical or the warning criteria. |
230+
| status | The returned status (OK/WARN/CRIT/UNKNOWN). |
231+
| total | Total number of items. |
232+
| warn_count | Number of items matched the warning criteria. |
233+
| warn_list | A list of all items which matched the warning criteria. |
229234

230235

231236

docs/docs/reference/check/CheckNSCP.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -195,27 +195,32 @@ This is the syntax for the base names of the performance data.
195195
#### Filter keywords
196196

197197

198-
| Option | Description |
199-
|---------------|--------------------------------------------------------------------------------------------------------------|
200-
| build | The build (the 3 in 0.1.2.3) not available in release versions after 0.6.0 |
201-
| count | Number of items matching the filter. Common option for all checks. |
202-
| crit_count | Number of items matched the critical criteria. Common option for all checks. |
203-
| crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
204-
| date | The NSClient++ Build date |
205-
| detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
206-
| list | A list of all items which matched the filter. Common option for all checks. |
207-
| major | The major (the 1 in 0.1.2.3) |
208-
| minor | The minor (the 2 in 0.1.2.3) |
209-
| ok_count | Number of items matched the ok criteria. Common option for all checks. |
210-
| ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
211-
| problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
212-
| problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
213-
| release | The release (the 0 in 0.1.2.3) |
214-
| status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
215-
| total | Total number of items. Common option for all checks. |
216-
| version | The NSClient++ Version as a string |
217-
| warn_count | Number of items matched the warning criteria. Common option for all checks. |
218-
| warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
198+
| Option | Description |
199+
|---------|----------------------------------------------------------------------------|
200+
| build | The build (the 3 in 0.1.2.3) not available in release versions after 0.6.0 |
201+
| date | The NSClient++ Build date |
202+
| major | The major (the 1 in 0.1.2.3) |
203+
| minor | The minor (the 2 in 0.1.2.3) |
204+
| release | The release (the 0 in 0.1.2.3) |
205+
| version | The NSClient++ Version as a string |
206+
207+
**Common options for all checks:**
208+
209+
| Option | Description |
210+
|---------------|--------------------------------------------------------------------------------|
211+
| count | Number of items matching the filter. |
212+
| crit_count | Number of items matched the critical criteria. |
213+
| crit_list | A list of all items which matched the critical criteria. |
214+
| detail_list | A special list with critical, then warning and finally ok. |
215+
| list | A list of all items which matched the filter. |
216+
| ok_count | Number of items matched the ok criteria. |
217+
| ok_list | A list of all items which matched the ok criteria. |
218+
| problem_count | Number of items matched either warning or critical criteria. |
219+
| problem_list | A list of all items which matched either the critical or the warning criteria. |
220+
| status | The returned status (OK/WARN/CRIT/UNKNOWN). |
221+
| total | Total number of items. |
222+
| warn_count | Number of items matched the warning criteria. |
223+
| warn_list | A list of all items which matched the warning criteria. |
219224

220225

221226

0 commit comments

Comments
 (0)