Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTOR-1220 : Plugin(database::informix::snmp) - Mode(log-file-usage) : consider log files with state backedUpButNeeded as free space #5352

Conversation

sfarouq-ext
Copy link
Contributor

@sfarouq-ext sfarouq-ext commented Dec 16, 2024

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

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

See tests

Checklist

  • I have rebased my development branch on the base branch (develop).
  • I have implemented automated tests related to my commits.
    • Data used for automated tests are anonymized.
  • After having created the PR, I will make sure that all the tests provided in this PR have run and passed.

@lucie-dubrunfaut lucie-dubrunfaut changed the title Ctor 1220 plugin database informix snmp mode log file usage consider log files with state backed up but needed as free space CTOR-1220 : Plugin(database::informix::snmp) - Mode(log-file-usage) : consider log files with state backedUpButNeeded as free space Jan 7, 2025
@omercier omercier merged commit 54c92ee into develop Jan 10, 2025
27 checks passed
@omercier omercier deleted the CTOR-1220-plugin-database-informix-snmp-mode-log-file-usage-consider-log-files-with-state-backed-up-but-needed-as-free-space branch January 10, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants