X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/294adb0cb8e908dc374de0b63328538a0b568896..1da44136718f65e2fb02ef2249c98395b69cf9da:/cookbooks/munin/files/default/plugins/postgres_replication diff --git a/cookbooks/munin/files/default/plugins/postgres_replication b/cookbooks/munin/files/default/plugins/postgres_replication index a41af7d3b..4a04d0b0e 100755 --- a/cookbooks/munin/files/default/plugins/postgres_replication +++ b/cookbooks/munin/files/default/plugins/postgres_replication @@ -9,12 +9,7 @@ my $pg = Munin::Plugin::Pgsql->new( title => 'PostgreSQL replication delay', info => 'Replication delay', vlabel => 'Seconds', - basequery => - "SELECT - CASE - WHEN pg_last_xlog_receive_location() = pg_last_xlog_replay_location() THEN 0::int - ELSE (extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()))::int - END AS delay", + basequery => "SELECT (extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()))::int AS delay", pivotquery => 1, configquery => "VALUES ('delay','Replication delay')"