CTOR-1220 : Plugin(database::informix::snmp) - Mode(log-file-usage) : consider log files with state backedUpButNeeded as free space #5352
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Centreon team (internal PR) : CTOR-1220
Description
COMMUNITY CONTRIBUTION : #4943
The informix snmp plugin log file usage adds up all the used space in log files.
Only free or newly created log files are 0% used. When log file is backed up, it's available to be used again, but it only gets cleared before it is converted to current. So in a running environment, log file used space appear to be 99% used all the time, which is misleading.
If you were going to create an alarm on low log file free space, you wouldn't take into account backed up log files because they can be considered as free space.
This patch takes into account the log file state before adding it as used space. If it is backed up, it considers it as free space, and doesn't add it to used space.
Type of change
How this pull request can be tested ?
See tests
Checklist