Skip to content

Illegal division by zero in bgwriter #388

Description

@TheDromundKaas

Hello,

I am using check_pgactivity via MRPE for my CheckMK installation.

For issue #373 I installed the new version of check_pgactivity to multiple hosts to check if it works. And while it works and I notified that it works for me, the bgwriter check on one of the hosts showed a strange unreliability.

Sometimes CheckMK complained that it got the return code 25 and an UNKNOWN state for the check. I tried to replicate the problem, but whenever I called the bgwriter service it went well.

I had almost given up and attributed the problem to some strange network connectivity, I set up a watch command with the bgwriter service and an echo of $?. And for a brief moment (2 seconds) I could see that the service returned

Illegal division by zero at /etc/check_mk/mrpe/check_pgactivity line 3060

The used command line was:

/etc/check_mk/mrpe/check_pgactivity --service bgwriter -U dbamon

Versions:

PostgreSQL 15.14
check_pgactivity 2.7
Perl 5.26.1

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions