Monitoring jms queues

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kbackman
Posts: 17
Joined: Wed Aug 27, 2014 10:43 am

Monitoring jms queues

Post 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,
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring jms queues

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kbackman
Posts: 17
Joined: Wed Aug 27, 2014 10:43 am

Re: Monitoring jms queues

Post by kbackman »

Yes this does look to be a better approach to what I was working on. Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitoring jms queues

Post by ssax »

kbackman, I'm glad that helped, can we mark this as resolved and lock the topic?
kbackman
Posts: 17
Joined: Wed Aug 27, 2014 10:43 am

Re: Monitoring jms queues

Post by kbackman »

Yup, please go ahead. Thanks,
Locked