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

Informix SNMP log-file usage - consider log files with state backedUpButNeeded as free space #4943

Closed

Conversation

guillermomolina
Copy link
Contributor

@guillermomolina guillermomolina commented Mar 12, 2024

Description

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)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

Using the snmpwalk

Checklist

Community contributors & Centreon team

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (master, maintenance).

@guillermomolina guillermomolina requested a review from a team as a code owner March 12, 2024 08:45
@lucie-dubrunfaut lucie-dubrunfaut added the enhancement Enhance existing label Jun 25, 2024
@lucie-dubrunfaut
Copy link
Contributor

Hello :)

I'm truly sorry for the delay in responding. Could you please provide us with test data in a .snmpwalk for this contribution for automated tests purpose ? (feel free to anonymize field that need it and also you can send it to my mail address also).

@guillermomolina
Copy link
Contributor Author

Hello, here you are.
Thank you
informix-log.snmpwalk.zip

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

I am taking the liberty of closing this PR following its internal takeover and the addition of tests in the following PR: #5352

This enhancement should soon be available in our official release.

Thank you for your contribution 🙏

omercier pushed a commit that referenced this pull request Jan 10, 2025
…free space in log-file-usage mode (#5352) (#4943)

Co-authored-by: gmolina <[email protected]>

Refs: CTOR-1220
@lucie-dubrunfaut
Copy link
Contributor

Released in January 2025

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