- Timestamp:
-
02/09/11 06:52:38 (2 years ago)
- Author:
-
mickem
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v4
|
v5
|
|
| 60 | 60 | |
| 61 | 61 | == Some more Examples (for 0.3.9) == |
| | 62 | |
| | 63 | === Checking file versions === |
| 62 | 64 | [[NSClientCommand(CheckFiles,path=D:\tmp pattern=*.exe "filter=version != 1.0" "syntax=%filename%: %version%" MaxWarn=1)]] |
| 63 | 65 | [[NSClientResult(warning,WARNING:explorer.exe: 6.0.2900.5512, explorer.exe: 1 > warning|'explorer.exe'=1;0;0;)]] |
| 64 | 66 | [[NSClientConfig()]] |
| 65 | 67 | |
| 66 | | Same thing using exact bound syntax: |
| 67 | | |
| | 68 | === Checking file versions using exact bound === |
| 68 | 69 | [[NSClientCommand(CheckFiles,path=D:\tmp pattern=*.exe "filter=version != 1.0" "syntax=%filename%: %version%" warn=gt:1 crit==1)]] |
| 69 | 70 | [[NSClientResult(warning,WARNING:explorer.exe: 6.0.2900.5512, explorer.exe: 1 > warning|'explorer.exe'=1;0;0;)]] |
| 70 | 71 | [[NSClientConfig()]] |
| 71 | 72 | |
| 72 | | Using the line count with limited recursion |
| 73 | | |
| | 73 | === Using the line count with limited recursion === |
| 74 | 74 | [[NSClientCommand(CheckFiles,path=D:\windows pattern=*.txt max-dir-depth=1 "filter=line_count gt 100" "syntax=%filename%: %line_count%" MaxWarn=1)]] |
| 75 | 75 | [[NSClientResult(warning,WARNING:test.txt: 3, test.txt: 1 > warning|'test.txt'=1;0;0;)]] |
| 76 | 76 | [[NSClientConfig()]] |
| 77 | 77 | |
| 78 | | Check file sizes: |
| 79 | | |
| | 78 | === Check file sizes === |
| 80 | 79 | [[NSClientCommand(CheckFiles,path=D:\tmp pattern=*.txt "filter=size gt 20" "syntax=%filename%: %size%" MaxWarn=1)]] |
| 81 | 80 | [[NSClientResult(warning,WARNING:test.txt: 26B, found files: 1 > warning|'found files'=1;0;0;)]] |
|
|