Opened 5 years ago
Closed 16 months ago
#160 closed enhancement (fixed)
Extend capabilities of syntax argument.
| Reported by: | Matthew | Owned by: | mickem |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.4.0 |
| Component: | CheckSystem | Version: | 0.3.1 |
| Severity: | Feature Requests | Keywords: | |
| Cc: |
Description
With reference to Help request #124 and with particular regard to the CheckFile command.
The CheckFile command returns the name of each file matched. If the length of all names exceeds 1024 (or 4000 odd now I guess) bytes the message can not be sent. Not only does this necessitates the use of the truncate argument but the end messages on the Nagios GUI tend to be pretty opaque. This gets worse if you use the syntax argument as the expression used as the syntax is repeated for each matched file. I would like to suggest the following to improve this:
- Additional variables: %MinWarn% or %MaxWarn%, %MinCrit% or %MaxCrit% and %Result% as returned in the performance data.
- Additional variable: %Matches% (ie. in CheckFile all matched files.)
- Additional variable: %Status% (ie. OK Warning Critical)
- The syntax argument have the ability to only be evaluated once - maybe a new argument (eg. syntax_unique) easiest way to do this.
eg.
for Directory c:\tmp containing files 1.xml 2.xml 3.xml
CheckFile file=c:\tmp\*.xml syntax_unique="%Status%: %Result% files match" MaxWarn=3 MaxCrit=4 filter-size=>0
should return something like
Warning: 3 files match|''=3;3;4;
While:
CheckFile file=c:\tmp\*.xml syntax_unique="%Result%: These files found: %Matches%" MaxWarn=3 MaxCrit=4 filter-size=>0
Should return something like:
Warning: These files found: 1.xml 2.xml 3.xml
Change History (1)
comment:1 Changed 16 months ago by mickem
- Resolution set to fixed
- Status changed from new to closed









Syntax fixed in 0.3.9 lenghts fixed in 0.4.0