Page 1 of 1

Monitoring jms queues

Posted: Tue Feb 17, 2015 3:17 pm
by kbackman
Hey guys,

I've been tasked with writing a check that alert if a queue is empty for x amount of time. I've got a couple of ideas on how to do this, but none seem very elegant and I was wondering if there are any plugins out there that will handle this. My search through Google hasn't turned up anything useful on this problem.

Thanks,

Re: Monitoring jms queues

Posted: Tue Feb 17, 2015 7:11 pm
by Box293
The simplest way to perform this is to write to a temporary file when the plugin runs. The first time it runs you don't have a value so you create the temp file and add the values to the file. When it runs next time it checks the file exists and you can read the existing values. Then you can do comparisions as to the last and current values to help you determine if warning and critical thresholds have been reached.

This usually seems to be the way most plugins like this handle it.

However if you can query when the queue was last empty / updated and get a time value then you could convert this to epoch and compare that value to now. It all depends on what sort of data you can pull from jms.

Does this help?

Re: Monitoring jms queues

Posted: Thu Feb 19, 2015 4:53 pm
by kbackman
Yes this does look to be a better approach to what I was working on. Thanks!

Re: Monitoring jms queues

Posted: Fri Feb 20, 2015 1:56 pm
by ssax
kbackman, I'm glad that helped, can we mark this as resolved and lock the topic?

Re: Monitoring jms queues

Posted: Wed Mar 04, 2015 10:08 am
by kbackman
Yup, please go ahead. Thanks,