Module: check_mk
Branch: master
Commit: 345875e41f33398f722badb35dc1e80d8876110c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=345875e41f3339…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 17:49:23 2013 +0100
FIX postgres_stat_database: make agent compatible with PostgreSQL 8.4.x
The SQL query that was used in the agent plugin <tt>mk_postgres</tt>
was not compatible with PostgreSQL 8.4.x, because there is not column
<tt>conflicts</tt>. This column is not used by the check anyway, so it has
been removed (thanks to Alexander Keller).
---
.werks/342 | 13 +++++++++++++
ChangeLog | 1 +
agents/plugins/mk_postgres | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/342 b/.werks/342
new file mode 100644
index 0000000..e3416cf
--- /dev/null
+++ b/.werks/342
@@ -0,0 +1,13 @@
+Title: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212475
+Targetversion: future
+
+The SQL query that was used in the agent plugin <tt>mk_postgres</tt>
+was not compatible with PostgreSQL 8.4.x, because there is not column
+<tt>conflicts</tt>. This column is not used by the check anyway, so it has
+been removed (thanks to Alexander Keller).
diff --git a/ChangeLog b/ChangeLog
index 3d34acb..7edd337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
* 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
* 0367 FIX: Now using /dev/null instead of closing stdin in linux agent...
+ * 0342 FIX: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
diff --git a/agents/plugins/mk_postgres b/agents/plugins/mk_postgres
index a041a9c..97e1865 100755
--- a/agents/plugins/mk_postgres
+++ b/agents/plugins/mk_postgres
@@ -13,5 +13,5 @@ echo '<<<postgres_sessions>>>'
echo "select current_query = '<IDLE>', count(*) from pg_stat_activity
group by (current_query = '<IDLE>');" | su - $USER -c "psql -d
postgres -A -t -F' '"
echo '<<<postgres_stat_database:sep(59)>>>'
-echo 'select datid, datname, numbackends, xact_commit, xact_rollback, blks_read,
blks_hit, tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted, conflicts,
pg_database_size(datname) "datsize" from pg_stat_database;' \
+echo 'select datid, datname, numbackends, xact_commit, xact_rollback, blks_read,
blks_hit, tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted,
pg_database_size(datname) "datsize" from pg_stat_database;' \
| su - $USER -c "psql -d postgres -A -F';'" | sed '$d'