If you have the WebLogic Management Pack for Oracle Enterprise Manager (OEM), you can monitor a slew of metrics. Often, I am asked if OEM can monitor if there are pending messages in a WebLogic JMS queue or topic. The answer is "sort of."

You can set warning and critical thresholds at the JMS Server level. Here are the instructions to do so through OEM:

  1. Log in to the OEM console.
  2. Navigate to your Oracle Web Server target.
  3. Click on WebLogic Server > Monitoring > All Metrics.
  4. Expand JMS Server Metrics.
  5. Click on Destinations.
  6. Click on the destination name in the table.
  7. Click on Modify Thresholds, and set the warning and critical values to thresholds of your choice.

You may want to experiment with this first and see if alerts are sent. If not, try other metrics such as [JMS Server Metrics | Messages Pending], [JMS Server Metrics by Server | Current JMS Messages], or [JMS Server Metrics by Server | Pending JMS Messages].

It's a bit flaky to be honest. In some cases I had to create a custom metric extension which invoked a custom shell script to retrieve the message count in a particular queue. So good luck!