diff options
Diffstat (limited to 'bin/custodian-queue')
| -rwxr-xr-x | bin/custodian-queue | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/bin/custodian-queue b/bin/custodian-queue index 7928105..f2003de 100755 --- a/bin/custodian-queue +++ b/bin/custodian-queue @@ -131,10 +131,12 @@ if __FILE__ == $0 then      stats = queue.stats()      jobs  = stats['current-jobs-ready'] || 0 -    if ( jobs > 5000 ) -      system( "mauvesend alert.bytemark.co.uk -i custodian -r now -s \"Our queue has #{jobs} in it\" --detail=\"<p>The custodian queue doesn't seem to be emptying.  Is there a bug, or do we need to add more workers?</p>\" " ) +    max = 5000 + +    if ( jobs > max ) +      system( "mauvesend alert.bytemark.co.uk -i custodian -r now -s \"Our queue has #{jobs} [alert-threshold is: #{max}]  in it\" --detail=\"<p>The custodian queue doesn't seem to be emptying.  Is there a bug, or do we need to add more workers?  See https://wiki.bytemark.co.uk/Main/CustodianMonitoring</p>\" " )      else -      system( "mauvesend alert.bytemark.co.uk -i custodian -c now -s \"Our queue has #{jobs} in it\" --detail=\"<p>The custodian queue doesn't seem to be emptying.  Is there a bug, or do we need to add more workers?</p>\" " ) +      system( "mauvesend alert.bytemark.co.uk -i custodian -c now -s \"Our queue has #{jobs} [alert-threshold is: #{max} in it\" --detail=\"<p>The custodian queue doesn't seem to be emptying.  Is there a bug, or do we need to add more workers? See https://wiki.bytemark.co.uk/Main/CustodianMonitoring</p>\" " )      end      exit( 0 )    end | 
