|
|
| Author |
Message |
|
| Guest |
Posted: Tue Apr 08, 2008 7:02 pm |
|
|
|
Guest
|
|
| Back to top |
|
| alexis |
Posted: Wed Apr 09, 2008 2:53 pm |
|
|
|
User
Joined: 06 Sep 2007
Posts: 80
Location: London
|
|
| Back to top |
|
| Guest |
Posted: Wed Apr 09, 2008 4:34 pm |
|
|
|
Guest
|
Hi Steve,
You can obtain broker's OS process ID by something like this:
sed 's/.*,\(.*\)\}.*/\1/' /var/lib/rabbitmq/pids > /var/run/rabbitmq.pid
or
perl -ne 'm/,(.*)}/; print $1' /var/lib/rabbitmq/pids
(put it somewhere inside startup script around echo SUCCESS)
This will work if you have one rabbit node. If you have multiple, you can create multiple
pid files for monit from /var/lib/rabbitmq/pids and monitor each process separately.
And then for monit:
check process rabbitmq-broker with pidfile /var/run/rabbitmq.pid
start program = "/etc/init.d/rabbitmq start"
stop program = "/etc/init.d/rabbitmq stop"
if 5 restarts within 5 cycles then timeout
alert someone@example.com only on { timeout }
Something like this might work. Please note however that I don't actually run this setup -
it's just how I might do it when I get around to it.
- Dmitriy
Alexis Richardson wrote:
> Steve
>
> It's the first I'd heard of it. Is it something that you would recommend?
>
> alexis
>
>
> On Tue, Apr 8, 2008 at 8:02 PM, Steve Jenson <stevej@gmail.com> wrote:
>> Hi,
>>
>> Does anybody out there use rabbitmq with monit?
>>
>> Thanks,
>> Steve
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss@lists.rabbitmq.com
>> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>
>
>
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Apr 09, 2008 4:45 pm |
|
|
|
Guest
|
On Wed, Apr 9, 2008 at 9:33 AM, Dmitriy Samovskiy
<dmitriy.samovskiy@cohesiveft.com> wrote:
> Hi Steve,
>
> You can obtain broker's OS process ID by something like this:
> sed 's/.*,\(.*\)\}.*/\1/' /var/lib/rabbitmq/pids > /var/run/rabbitmq.pid
> or
> perl -ne 'm/,(.*)}/; print $1' /var/lib/rabbitmq/pids
>
> (put it somewhere inside startup script around echo SUCCESS)
I like that a lot better than the "clever" awk I whipped up:
awk 'BEGIN { RS="}"; FS=","} /([:digit:].*)/ {print $2}'
/var/lib/rabbitmq/pids > $PIDFILE
BTW, I had to install the deb on another machine so I could get the
/etc/init.d script.
Would it be possible to include it in the binary generic unix server
distribution?
> This will work if you have one rabbit node. If you have multiple, you can
> create multiple pid files for monit from /var/lib/rabbitmq/pids and monitor
> each process separately.
>
>
> And then for monit:
>
> check process rabbitmq-broker with pidfile /var/run/rabbitmq.pid
> start program = "/etc/init.d/rabbitmq start"
> stop program = "/etc/init.d/rabbitmq stop"
> if 5 restarts within 5 cycles then timeout
> alert someone@example.com only on { timeout }
>
> Something like this might work. Please note however that I don't actually
> run this setup - it's just how I might do it when I get around to it.
Thanks! I am going to set this up today and will email back with any
modifications I have to make.
Steve
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Apr 09, 2008 10:23 pm |
|
|
|
Guest
|
On Wed, Apr 9, 2008 at 9:33 AM, Dmitriy Samovskiy
<dmitriy.samovskiy@cohesiveft.com> wrote:
> And then for monit:
>
> check process rabbitmq-broker with pidfile /var/run/rabbitmq.pid
> start program = "/etc/init.d/rabbitmq start"
> stop program = "/etc/init.d/rabbitmq stop"
> if 5 restarts within 5 cycles then timeout
> alert someone@example.com only on { timeout }
>
> Something like this might work. Please note however that I don't actually
> run this setup - it's just how I might do it when I get around to it.
That worked for me pretty much verbatim except that my script is in
/etc/init.d/rabbitmq-server
Best,
Steve J.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Apr 11, 2008 10:50 am |
|
|
|
Guest
|
Steve Jenson wrote:
> BTW, I had to install the deb on another machine so I could get the
> /etc/init.d script.
> Would it be possible to include it in the binary generic unix server
> distribution?
It could definitely be made available, though I doubt this is the right
package to put it into, as various flavours of Un*x have various init
script systems. However, it is a good idea to have a "reference
implementation" of those scripts available somewhere. Or flavour
specific code maybe provided by rabbit users, as we don't have all the
unices to test those scripts against.
Adrian,
--
[][][] Adrien Pi |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|