Skip to content

Remote execute of check_postgres.pl for disk_usage flags data_dir as invalid #216

@ItsBoris1

Description

@ItsBoris1

Hey,
i am testing out the check_postgres script on which options i can use, so that i can use them in my monitoring system icinga.

Right know I want to have some general information which is going to be feed to Icinga such as disk size, connection, hitratio etc.

When i try to use the disk_usage option like this
./check_postgres.pl --host=<ipadress> --port=5432 --dbuser=icinga --dbpass=<password> --action=disk_space --warning='80%' --db=test

I receive the following error
POSTGRES_DISK_SPACE UNKNOWN: DB "test" (host:<ipaddress>) Could not find data directory "/var/lib/postgresql/13/main" | time=0.16s

When I include the option assume-prod and adding the data dir's location like this
./check_postgres.pl --host=<ipaddress> --port=5432 --dbuser=icinga --dbpass=<pass> --action=disk_space --warning='80%' --db=test --datadir /var/lib/postgresql/13/main --assume-prod

I get this error
ERROR: Invalid data_directory: "/var/lib/postgresql/13/main"
Could it be, that the script is trying to find the data directory on the local system and because of that is throwing the error "invalid data_directory", because the dir exists on the remote system

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