Skip to content

txn_time/idle flap from OK to UNKNOWN #73

Open
@martinmarques

Description

@martinmarques

I have been dealing with a problem in a new installation I was doing today. The problem came up as I saw in Icinga that txn_time and txn_idle were flapping and for no reason I could think of.

Checking the code, I found that the problem came here:

    ## Return unknown if stats_command_string / track_activities is off
    if ($cq =~ /disabled/o or $cq =~ /<command string not enabled>/) {
        add_unknown msg('psa-disabled');
        return;
    }

What would happen if the query had in some part the word 'disabled'? For example a column of a table which has been selected.

I think this is not the best way to check if a postgres setting is set accordinly.

Removing the offending code (as I'm sure the postgres setting has track_activities on) made everything work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions