Monitoring Websphere

Saner, Markus Markus.Saner at antalis.ch
Tue Jul 27 19:50:37 CEST 2004


Schaffranneck, Sven (K-DOI-5/4) wrote:
> i'm searching for a plugin that monitors an ibm websphere mq. does
> anyone knows a solution? 

I wrote a plugin about a year ago. It works fine for me and some others.
We use it to monitor several MQ Q manager primary on AIX and AS/400
systems.
(Except five, Nobody seams to be interested ones I asked on this user
list).

The plugin is only to monitor DL-Q, Q-depts and channel status.
It will not be usefull to collect statistical data !

If this is what you are looking for, I will send you a copy either in
source and/or executable for Linux i386.
You have to install the MQ client on the nagios server or where the
plugin runs.

Regards,
Markus



Overview:

You can use this utility without nagios.
If you like to integrate it into Nagios, use the '-h' switch to produce
html output.
More about below.



Parameters:

 [ -m name ] : Q-manager name
 [ -x name ] : connection name
 [ -c name ] : connection channel name
 [-qn name ] : check these queues, MQS syntax, 'QNAM*' will display all
Q's starting with.
 [-qx name ] : exclude this ',' delimited queues, limited to a number of
63.
 [-qd name ] : dead letter queue
 [-qw uint ] : queues warning level
 [-qc uint ] : queues critical level
 [-cn name ] : check these channels
 [-cx name ] : exclude this ',' delimited channels, limited to a number
of 63.
 [-dx name ] : exclude this ',' delimited list in display, limited to a
number of 63.
 [ -h ]      : generate html usable output for Nagios
 [ -v ]      : be a bit verbose, only for testing !

Following samples assume:
- Q-manager: QMTEST
- host Q-manager is running on: testhost
- Q-manager port: 1414, (the default)
- dead letter Q on QMTEST: QMTEST.QD
 



Samples:



1).
- check, no entries in dead letter Q.
- check, all channels up.
- Check all queues warning=1000 and critical=2000 levels 

check_mqseries -m 'QMTEST' -x 'testhost(1414)' -qn '*' -qd 'QMTEST.QD'
-qw 1000 -qc 2000 -cn '*'

Result:
MqC RUNNING - SYSTEM.ADMIN.SVRCONN
MqQ 2 entries - MQAI.REPLY.3ED857450083C073
MqQ 76 entries - SYSTEM.ADMIN.CHANNEL.EVENT
MqQ 1 entries - SYSTEM.ADMIN.QMGR.EVENT
MqQ 36 entries - SYSTEM.AUTH.DATA.QUEUE
MqQ 2 entries - SYSTEM.CHANNEL.SYNCQ
MqQ 1 entries - SYSTEM.CLUSTER.REPOSITORY.QUEUE




2).
Because Nagios has some limitations in number of characters to display,
you can limit the
displayed output. Use option -dx. This option will not switch off error
checking. 

The previose statement would look like following if you like to suppress
all 'SYSTEM.*' channels and Q's.

check_mqseries -m 'QMTEST' -x 'testhost(1414)' -qn '*' -qd 'QMTEST.QD'
-qw 1000 -qc 2000 -cn '*' -dx 'SYSTEM.*'

Result:
MqQ 2 entries - MQAI.REPLY.3ED857450083D033



By default the Q-manager connection is esablished on
'SYSTEM.ADMIN.SVRCONN' channel, like that the
MQSserver-client part needs not to be installed.
If you wish to connect to another channel, use the -c option to
overwrite the default. But in most
cases the default is perfect i guess.

 
If you wonder what check_mqseries does with your parameters you can
switch on verbose mode (-v).
You get a list of all options set and how they are intepreted. 


Sample 2). with verbose mode will display following result:

Connecting to Q-manager: QMTEST
     connection channel: SYSTEM.ADMIN.SVRCONN
     on connection name: testhost(1414)
      report on channel: *
    exclude channels(s): (null)
     report on dl-queue: QMTEST.QD
        report on queue: *
    queue warning level: 1000
         critical level: 2000
       exclude queue(s): (null)
     exclude in display: SYSTEM.*

MqQ 2 entries - MQAI.REPLY.3ED8574500840033
 
Verbose mode is not usefull when using it with Nagios.


I suggest to play aroud with it until you found the parameters of your
needs and after implement it in Nagios.





How to integrate into Nagios:

This is very simple, (as everithing with Nagios, thanks to Ethan), you
need two definitions to follow the
previose samples.

1). checkcommands.cfg
Add following lines:

# 'check_mqseries' command definition
#   ARG1: Q-manager name, '-m name'
#   ARG2: conection name, '-x server(port)'
#   ARG3: dead letter q name, '-qd name'
#   ARG4: queue depth warning level, '-qw uint'
#   ARG5: queue depth critical level, '-qc uint'
define command{
	command_name	check_mqseries
	command_line	$USER1$/check_mqseries -m $ARG1$ -x
'$HOSTADDRESS$($ARG2$)' -cn '*' -qn '*' -qd $ARG3$ -qw $ARG4$ -qc $ARG5$
-dx 'SYSTEM.*' -h 
	}

As you can see, the 'SYSTEM.*' Q's and channels are excluded from
display by default.
The '-h' switch is on, to say we want html output.


2). services.cfg
Add as many definition like this:
define service{
	use				whatever_template_you_like

	host_name			testhost
	service_description		MQ-Series QMTEST
	is_volatile			0
	check_period			24x7
	max_check_attempts		3
	normal_check_interval		5
	retry_check_interval		3
	contact_groups			whatever_contactgroup_you_like
	notification_interval		120
	notification_period		24x7
	notification_options		w,u,c,r
        check_command
check_mqseries!QMTEST!1414!QMTEST.QD!1000!2000

	name				MQ-Series
	}


Of cource this is only a sample and may does'nt hit your needs. There
are many options.
If you like to split it up into different checks on the same Q-manager,
you can exclude
channels and queues with -cx and -qx. They will not be displayd and not
be checked for
errors where excluded.


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list