What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

A few things about queues

Votes:

0

After spending way to much time trying to get the queuesizes via the message queuing service (which in turn uses a messagecount.exe utility found in the sensor system sub directory of the prtg install location) I finally gave up.

Situation:

Forest with 2 domain. PRTG running in domain A, wants to check queue on server in domain B. due to some rights reason I simply cannot access the queue information even though the credentials should work. Long story short, it's a hassle.

During my testing I finally dove in and tried to see what the message count utility does...

To my surprise (which later on I should have figured out earlier) the messagecount util does the following:

it gets all the messages from the queue you try to count, keeps them in memory (nice if you have < 1000 messages in queue.. not so nice when you have 100000 or more in the queue...) and does a count. Obviously, all these messages traverse the network. Checking a queue with 100k messages therefor takes a long time. :(

So in the end, I gave up, wrote a custom wmi query (since the application belonging to the queue does write this info to performance counters) and now the size of the queue is not relevant any more. The only hassle is creating all the custom WMI queries. But(at least in v9) the wmi queries can have place holders.

So what have I learned from fiddling with prtg and message queuing:

If the message count util works for you, and your queues usually have less than say 10k messages in them, use it. Else, pray and hope the application that uses the queue you are trying to monitor also has performance counters with the same information :)

messagecount-exe msmq queue wmi

Created on Sep 27, 2011 5:01:11 PM



6 Replies

Votes:

1

Hi Thomas,

The messages are processed one by one to determine if they exceed the max age. If the max age is set to 0 the sensor could simply return the queue length without processing every single message. This will be fixed in a future version of the sensor.

If the sensor needs to process 100000 or more messages and needs to check the age of every single one, you might want to consider running the sensor on the machine that hosts the queue, by installing a remote probe on that machine.

Created on Sep 27, 2011 6:52:59 PM



Votes:

0

Sure a remote sensor could would, but the ideal situation is having everything checked via a single box. I hate having to manage agents and such.

I'd love to see the max age = 0 feature added. on large queues this could really help. Especially since we have multiple queues on multiple servers sometimes holding > 1mio messages. (Mostly queues waiting to get written to back end databases).

Created on Sep 29, 2011 3:08:21 PM



Votes:

0

Hi Thomas,

Sure, everything from one box sounds ideal, but if a remote probe can reduce network traffic by having the sensor(s) perform local checks its certainly worth investigating.

In our setup we have about 20 remote probes, one on every geographical location. The beauty of PRTG is that you don't have to manage any agents whatsoever. With every update of the core server, the remote probes are automatically updated by the core server.

For the sensor, if you send me your email address I can drop you a link to a version for testing. My email address can be found here in the side bar under "Send an Email"

Created on Sep 29, 2011 5:45:23 PM



Votes:

0

HI Gerard,

If you have multiple geo locations like paessler, I can understand why network bandwith might be an issue. However running everything inside one datacenter with 10gb network speeds, the bandwith is (should) hardly be a concern.

I'll drop you a line for a test version of the message count util.

Created on Oct 19, 2011 9:17:37 AM



Votes:

0

Whats the WMI query you are using? Is it something like this?

Select MessagesinQueue From Win32_PerfRawData_MSMQ_MSMQQueue Where Name = "<#PH1>"

Created on Nov 3, 2011 3:27:21 PM



Votes:

0

Hi Xela,

The MSMQ sensor uses the .NET Framework System.Messaging.MessageQueue Class http://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.aspx

Regards,

Created on Nov 6, 2011 10:58:38 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.