Skip to content

Commit

Permalink
17587 FIX informix_dbspaces: fix calculation of free and used space size
Browse files Browse the repository at this point in the history
Prior to this werk, the free and used space size was incorrectly calculated as the chunk pagesize was taken
instead of the dbspace default pagesize. This werk fixes this issue by querying the correct pagesize value. To
benefit from this change, the mk_informix plugin should be reinstalled with this new change. The check plugin
itself remains unmodified.

SUP-22249

Change-Id: Iece8cff4ba2b014185c492fd98fd845faa22bdb7
  • Loading branch information
anthonyh209 committed Feb 12, 2025
1 parent 86cbbd3 commit bcc194a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .werks/17587.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[//]: # (werk v2)
# informix_dbspaces: fix calculation of free and used space size

key | value
---------- | ---
date | 2025-02-12T12:02:10+00:00
version | 2.5.0b1
class | fix
edition | cre
component | checks
level | 1
compatible | yes

Prior to this werk, the free and used space size was incorrectly calculated as the chunk pagesize was taken
instead of the dbspace default pagesize. This werk fixes this issue by querying the correct pagesize value. To
benefit from this change, the mk_informix plugin should be reinstalled with this new change. The check plugin
itself remains unmodified.
3 changes: 2 additions & 1 deletion agents/plugins/mk_informix
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ informix_tabextents() {
}

informix_dbspaces() {
# the default dbspace pagesize must be taken to calculate the used and free space
echo "<<<informix_dbspaces>>>"
echo "[[[$INFORMIXSERVER/$SERVERNUM]]]"
sql "select
Expand All @@ -179,7 +180,7 @@ informix_dbspaces() {
sd.flags,
'CHUNK',
sc.fname,
sc.pagesize,
(select sh_pagesize from sysmaster:sysshmvals) pagesize,
sc.chksize,
sc.nfree,
sc.flags,
Expand Down
6 changes: 6 additions & 0 deletions cmk/base/legacy_checks/informix_dbspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
from cmk.agent_based.legacy.v0_unstable import LegacyCheckDefinition
from cmk.agent_based.v2 import render

"""
Relevant documentation:
* https://docs.deistercloud.com/content/Databases.30/IBM%20Informix.2/Monitoring.10.xml?embedded=true#51cf1eb453b73e7ffdd2172551fc58ed
* https://www.ibm.com/docs/en/informix-servers/14.10?topic=tables-syschunks
"""

check_info = {}


Expand Down

0 comments on commit bcc194a

Please sign in to comment.