Help hacking a script to montior my AppServers?

Mirza Dedic mirde at oppy.com
Mon Aug 30 20:20:02 CEST 2010


I am trying to monitor our OpenEdge Database Application Servers on our AIX box with Nagios, and to send an alert based on a "tricky" situation, described below:

The tool that I run locally on the AIX host to check our servers outputs the following:

#asbman -name production -query
PID   State     Port  nRq    nRcvd  nSent  Started          Last Change
2175264 AVAILABLE 15614 006968 007643 008661 Aug 29, 2010 19:03 Aug 30, 2010 11:16
922080 AVAILABLE 15616 002675 002970 003465 Aug 30, 2010 09:22 Aug 30, 2010 11:16
483832 AVAILABLE 15607 001740 001939 002204 Aug 30, 2010 10:02 Aug 30, 2010 11:16
2936902 AVAILABLE 15620 001753 001955 002236 Aug 30, 2010 10:02 Aug 30, 2010 11:16
3658058 AVAILABLE 15623 001742 001921 002190 Aug 30, 2010 10:02 Aug 30, 2010 11:16
3027394 AVAILABLE 15608 001297 001377 001493 Aug 30, 2010 10:21 Aug 30, 2010 11:16
3965150 SENDING  15611 001290 001352 001465 Aug 30, 2010 10:21 Aug 30, 2010 06:12
4186168 AVAILABLE 15615 001300 001379 001549 Aug 30, 2010 10:21 Aug 30, 2010 11:16
2044322 AVAILABLE 15617 001298 001369 001558 Aug 30, 2010 10:21 Aug 30, 2010 11:16

I would want Nagios to raise an alert if State = SENDING for more than 6 hours (Last Change)? Would this be possible?

Anyone have an idea of how I would do this?

I guess one way would be to make a shell script to output "asbman -name production -query | grep "SENDING" >> status.txt" and have a check log type check read it and raise an error if stuff is found? But it does not exactly implement the "Last Change" date time idea, we will always have PIDs going from AVAILABLE to SENDING and back, but those that are stuck in SENDING for 6+ hours is of concern.

Any help on this is appreciated.


The Oppenheimer Group ---- CONFIDENTIAL

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100830/82c5e4c3/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
-------------- next part --------------
_______________________________________________
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