Ticket #371 (closed defect: fixed)
MinCritCount and MinWarnCount appear to have a default value of 0
| Reported by: | auadfh | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.3.9 |
| Component: | CheckSystem | Version: | 0.3.7 |
| Severity: | Bugs | Keywords: | |
| Cc: |
Description
In bug #370 I mentioned that I was trying to detect an excess but not an absence of processes and queried some syntax.
Here are some exerpts from a test configuration:
[External Alias] NameOfCheck=CheckProcState MaxCritCount=2 NameOfProcess.exe=started [NSCA Commands] NameOfCheck=NameOfCheck
These are actually from separate files (I have NSC.ini, common.ini and custom.ini, with the NSC.ini and common.ini on all systems I manage being the same, and containing some frequently used checks.. and the custom.ini file being specific to each machine and containing that machine's name from Nagios's perspective as well as checks specific to it which may be pulled from 'template' commands listed in 'External Alias' section. This way when I install NSClient++ on a machine, there only needs to be minimal changes to each config, and I can update the common bits easily.
Anyway - it would appear that with the above check, "NameOfCheck", it still sends an error state if there are no instances running, but according to CheckProcState it shouldn't as I've not specified a minimum warning or critical level as per the example.
Example output from -test...
d \NSCAThread.cpp(191) Executing (from NSCA): FeedManager d NSClient++.cpp(1073) Injecting: NameOfCheck: d NSClient++.cpp(1073) Injecting: CheckProcState: MaxCritCount=2, NameOfProcess.exe=started ,,, d NSClient++.cpp(1109) Injected Result: CRITICAL 'CRITICAL: NameOfProcess.exe: stopped (critical)' d NSClient++.cpp(1110) Injected Performance Result: ''
Therefore it would appear that MinCritLevel (and potentially MinWarnLevel) has an erroneous default value of 0 rather than undefined/unchecked.








about to be fixed now: http://www.nsclient.org/nscp/ticket/452
-> closed