[check_postgres] check_postgres_txn_time -H POSTCIBBDB -db pcibb --warning=60s --critical=120s -dbuser postgres -dbpass postgres --port=5434 --include=pcibb

Yehudah Edelstein YEHUDAED at cellcom.co.il
Tue Jul 15 05:39:38 UTC 2014


Hi,
	The check_postgres, we installed only on 1 central server. Using ssh would require me to install the check_postgres on each server that I have a DB that I want to monitor. Also I'm not familiar with the install procedure since a teammate of mine has done the install, but the colleague no longer works with us.
Regards
Yehudah

-----Original Message-----
From: David Christensen [mailto:david at endpoint.com] 
Sent: Monday, July 14, 2014 7:04 PM
To: Yehudah Edelstein
Cc: check_postgres at bucardo.org
Subject: Re: [check_postgres] check_postgres_txn_time -H POSTCIBBDB -db pcibb --warning=60s --critical=120s -dbuser postgres -dbpass postgres --port=5434 --include=pcibb


On Jul 14, 2014, at 10:42 AM, Yehudah Edelstein <YEHUDAED at cellcom.co.il> wrote:

> Hi,
> 	At the end I got it to work by playing around with the quotes for thw warning and critical parameters:
> $pg/check_postgres_txn_time -H ${HST} -db ${INSTANCE} --warning="${WARN}"  --critical="${CRIT}" -dbuser postgres -dbpass ${pswd} --port=${port}  --include=${INSTANCE}  > ${TEMPFILE2}

That honestly sounds like it's unlikely related to the issue, and I'd suspect the long-running query text itself was causing output parsing issues, but since it is a transient issue probably sorted itself out when that specific query finished running.

> Though I came up with another problem trying to run check_postgres_disk_space:
> check_postgres_disk_space -H postcibbdb -p 5434 -db pcibb -u postgres --dbpass=postgres
> POSTGRES_DISK_SPACE UNKNOWN: DB "pcibb" (host:postcibbdb) (port=5434) Could not find data directory "/CIBB/data01" | time=0.02s
> 
> It somehow knows the data directory is "/CIBB/data01" BUT can't find it.
> I'm running this API from another Linux server. The disk does exist on the remote server postcibbdb. The other (10) checks are successful.
> i.e.
> $pg/check_postgres_connection -H postcibbdb -p 5434 -db pcibb -u postgres --dbpass=postgres
> POSTGRES_CONNECTION OK: DB "pcibb" (host:postcibbdb) (port=5434) version 9.3.4 | time=0.01s

The disk check needs to run on the same server as the data directory itself; it gets the path from the equivalent setting (data_directory) from the connection, but as you can see it looks on the local machine for this path.

> The disk exists:
> /dev/mapper/vg_cibb_data-vol_cibb_data 1048064000 461772228 586291772    45% /CIBB/data01
> 
> My guess is that it's some syntax problem. I need to check the archive disk, the data disk, and the logfile disk. How can I do that, without knowing in advance what the directory names are? The same script I want to run on various servers (different DBs).

You just need to run this check directly on the servers in question; if you want to run this from a central server, you can make this a ssh to the appropriate server and then run the command in question; e.g.:

$ ssh logserver check_postgres_disk_space -H postcibbdb -p 5434 -db pcibb -u postgres --dbpass=postgres

HTH,

David
--
David Christensen
End Point Corporation
david at endpoint.com
785-727-1171




---------------------------------------------------------------------------------------------------------------
This e-mail message may contain confidential, commercial and privileged information or data that
constitute proprietary information of Cellcom Israel Ltd. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient you are hereby notified that any use
of this information or data by any other person is absolutely prohibited.
If you are not the intended recipient, please delete all copies.

Thank You.
http://www.cellcom.co.il


More information about the Check_postgres mailing list