Opened 4 years ago
Closed 4 years ago
#281 closed enhancement (fixed)
CheckFile provide OK when file does not exist
| Reported by: | eric@… | Owned by: | MickeM |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.3.7 |
| Component: | Core Module | Version: | 0.4.0-nightly |
| Severity: | Feature Requests | Keywords: | |
| Cc: |
Description
We have a directory where we have to make sure files do not grow larger than 7K. Their is a process that constantly picks up files and processes them and an indicator that their is an issue with process is when the file is larger than 7K and has no been picked up.
Feature needed is that sometimes the file does not exist yet. Can we make this check say it is OK if file does not exist or is less than a certain size if it does exist.
Change History (2)
comment:1 Changed 4 years ago by anonymous
comment:2 Changed 4 years ago by mickem
- Milestone changed from 0.4.0 to 0.3.7
- Resolution set to fixed
- Status changed from new to closed
This can be done with CheckFile2 like so:
- d:\tmp has a file with 25 bytes
- d:\empty has no files
CheckFile2 path=D:\tmp pattern=*.txt filter+size=gt:20 "syntax=%filename%: %size%" MaxWarn=1 WARNING:test.txt: 26B, found files: 1 > warning|'found files'=1;0;0; CheckFile2 path=D:\tmp\empty pattern=*.tx filter+size=gt:20 "syntax=%filename%: %size%" MaxWarn=1 OK:CheckFile ok|'found files'=0;0;0; CheckFile2 path=D:\tmp pattern=*.txt filter+size=gt:30 "syntax=%filename%: %size%" MaxWarn=1 OK:CheckFile ok|'found files'=0;0;0; CheckFile2 path=D:\tmp\empty pattern=*.tx filter+size=gt:30 "syntax=%filename%: %size%" MaxWarn=1 OK:CheckFile ok|'found files'=0;0;0;
MickeM
Note: See
TracTickets for help on using
tickets.









I think the existing Checkfile should do it already.
CheckFile MaxWarn=1 MaxCrit=5 file=c:\temp\*.* filter-size=>7k
But CheckFile shows Warning if no files found. I think, it's a bug?