Skip to content

Commit

Permalink
update minion queue monitoring further
Browse files Browse the repository at this point in the history
  • Loading branch information
ranguard committed May 14, 2016
1 parent 18080fa commit c0f7664
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/munin/monitor_minion_queue.pl
Expand Up @@ -3,14 +3,15 @@
use strict;
use warnings;

# Munin runs this as root, need the sudo to get the Pg perms
# Munin runs this as metacpan user, but with root's env
# it's only for production so path is hard coded

my $config_mode = 0;
$config_mode = 1 if $ARGV[0] && $ARGV[0] eq 'config';

if($config_mode) {

# Dump this (though we supported dynamic below) so it's faster
print <<'EOF';
graph_title Minion Queue stats
graph_vlabel count
Expand All @@ -28,7 +29,7 @@
}

# Get the stats
my $stats_report = `sudo -u metacpan /home/metacpan/bin/metacpan-api-carton-exec bin/queue.pl minion job -s`;
my $stats_report = `/home/metacpan/bin/metacpan-api-carton-exec bin/queue.pl minion job -s`;

my @lines = split("\n", $stats_report);

Expand Down

0 comments on commit c0f7664

Please sign in to comment.