Add warning thresholds for postgres replication delay
authorTom Hughes <tom@compton.nu>
Tue, 13 Aug 2013 10:44:12 +0000 (11:44 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 13 Aug 2013 10:44:12 +0000 (11:44 +0100)
cookbooks/munin/files/default/plugins/postgres_replication

index 4a04d0b0e9ecf2f4286e724e1f391b9acf2a471a..a0dd61d191d7ec89cbacad694efbadbf8207469b 100755 (executable)
@@ -11,8 +11,8 @@ my $pg = Munin::Plugin::Pgsql->new(
     vlabel    => 'Seconds',
     basequery => "SELECT (extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()))::int AS delay",
     pivotquery => 1,
-    configquery =>
-        "VALUES ('delay','Replication delay')"
+    configquery => "VALUES ('delay','Replication delay')",
+    extraconfig => "delay.warning 60\ndelay.critical 300"
 );
 
 $pg->Process();