]> git.openstreetmap.org Git - chef.git/blob - cookbooks/munin/files/default/plugins/postgres_replication
otrs: Use znuny mirror of otrs 6.0.30 release as upstream is gone
[chef.git] / cookbooks / munin / files / default / plugins / postgres_replication
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Munin::Plugin::Pgsql;
7
8 my $pg = Munin::Plugin::Pgsql->new(
9     title     => 'PostgreSQL replication delay',
10     info      => 'Replication delay',
11     vlabel    => 'Seconds',
12     basequery => "SELECT (extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()))::int AS delay",
13     pivotquery => 1,
14     configquery => "VALUES ('delay','Replication delay')",
15     extraconfig => "delay.warning 300\ndelay.critical 3600",
16     graphmin  => 0
17 );
18
19 $pg->Process();