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 13, 2025
1 parent 2e9a4b6 commit e57f706
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .werks/17587
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Title: informix_dbspaces: fix calculation of free and used space size
Class: fix
Compatible: compat
Component: checks
Date: 1739361730
Edition: cre
Level: 1
Version: 2.2.0p40

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 checks/informix_dbspaces
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
"""
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
"""


factory_settings["informix_dbspaces_default_levels"] = {"levels_perc": (80.0, 85.0)}

Expand Down

0 comments on commit e57f706

Please sign in to comment.