jboss monitorin
list Larry Barber
Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated. Thanks, Larry Barber
list Scot Kreienkamp
I wrote a jboss client that pulls message and consumer counts from the jmx web console. That way I can tell if it's up, how full the queues are, and whether or not consumers are registered. That's about all the useful info I could find in the web console. Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>;
▸
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Larry Barber
Sent: Wednesday, September 12, 2012 10:43 AM
To: xymon at xymon.com
Subject: [Xymon] jboss monitorin
Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated.
Thanks,
Larry Barber
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Larry Barber
Could you send me a copy, or post it on Xymonton? Thanks, Larry Barber
▸
On Wed, Sep 12, 2012 at 9:50 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid>wrote:
I wrote a jboss client that pulls message and consumer counts from the jmx web console. That way I can tell if it's up, how full the queues are, and whether or not consumers are registered. That's about all the useful info I could find in the web console. *Scot Kreienkamp | Senior Systems Engineer** **| La-Z-Boy Incorporated**
*1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid|
www.la-z-boy.com
▸
*From:* xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] *On
Behalf Of *Larry Barber
*Sent:* Wednesday, September 12, 2012 10:43 AM
*To:* xymon at xymon.com
*Subject:* [Xymon] jboss monitorin
Has anybody found a good way to monitor jboss servers? I have a bunch of
jboss installations and need some way to monitor their performance. I
checked Xymonton but couldn't find anything useful (the jmxstat project
appears to be dead, at least the link leading to the download is dead). Any
help would be much appreciated.
Thanks,
Larry Barber
This message is intended only for the individual or entity to which it is
addressed. It may contain privileged, confidential information which is
exempt from disclosure under applicable laws. If you are not the intended
recipient, please note that you are strictly prohibited from disseminating
or distributing this information (other than to the intended recipient) or
copying this information. If you have received this communication in error,
please notify us immediately by e-mail or by telephone at the above number.
Thank you.
list Scot Kreienkamp
I didn't think it was really appropriate to post because it's heavily customized for my different environments and such. You'll have to do some work before it's suitable for yours.
Basically I pull a list of queues using curl then loop back through each queue with curl to grab the queue stats. It sends those in a status message then sends the stats in a second data message so they can be graphed. It will also clear any queue with DLQ in the name once it gets above 25. Otherwise the DLQ's never clear. I started doing that because the DLQ's got so big they brought the server to almost a standstill after several months of nobody paying attention to it.
The entries in your hosts file are like: jbossjms:8080
(jbossjms being the name of the test, and 8080 being the port the jmx console is on. This assumes no auth on the jmx web console, which there isn't by default.)
Graphs.cfg entry:
[jboss]
FNPATTERN ^jboss.(.+).rrd
TITLE Queue sizes
YAXIS Queue size
DEF:p at RRDIDX@=@RRDFN@:lambda:MAX
LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@
GPRINT:p at RRDIDX@:LAST: \: %5.0lf (cur)
GPRINT:p at RRDIDX@:MAX: \: %5.0lf (max)
GPRINT:p at RRDIDX@:MIN: \: %5.0lf (min)
GPRINT:p at RRDIDX@:AVERAGE: \: %5.0lf (avg)\n
I have mine setup to graph the max value, you probably need to change that to average.
You need to use splitncv in the xymonserver.cfg also. Otherwise anytime you add or remove a queue the graph won't show up or the RRD updater will error out as the new data point won't exist in the RRD.
Works very well for me. Here it is, hope this helps.
#!/bin/bash
function GETSTATS ()
{
COLOR=green
RETURNQUEUEMESSAGE="Queue_Name Message_Count Consumer_Count"
RETURNQUEUEMONITOR=""
ENVIRONMENTPREFIX=`echo $1 | cut -c 1-4`
RETURNMESSAGE=""
CONSUMERCOUNTER=""
case $1 in
retv3040.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3041.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3042.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3043.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3044.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3045.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
esac
while read QUEUENAME ; do
curl -s -m 10 "http://$1:$2/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.messaging.destination%3Aservice%3DQueue%2Cname%3D$QUEUENAME"; > /tmp/$$
MESSAGECOUNT=`cat /tmp/$$ |grep -A 3 "The number of messages in the queue"|tail -1 | awk '{print $1}'`
#setup some environment variables for prod VS dev and for specific queues
if [ "$ENVIRONMENTPREFIX" = "retv" ] ; then
case $QUEUENAME in
PricingUploadResponseQueue)
MSGCOUNTRED=5 #the number of messages in the queue to turn the test red
MSGCOUNTYELLOW=3 # the number of messages in the queue to turn the test yellow
MINCONSUMERCOUNT=12 # the expected number of consumers for the PricingUploadResponseQueue and UnMeteredReportResponseQueue
;;
*)
MSGCOUNTRED=500
MSGCOUNTYELLOW=250
MINCONSUMERCOUNT=0
;;
esac
else
case $QUEUENAME in
PricingUploadResponseQueue)
MSGCOUNTRED=10
MSGCOUNTYELLOW=5
MINCONSUMERCOUNT=0
;;
*)
MSGCOUNTRED=500
MSGCOUNTYELLOW=250
MINCONSUMERCOUNT=0
;;
esac
fi
if [ "$MESSAGECOUNT" -gt "$MSGCOUNTRED" ] ; then
COLOR=red
RETURNSTATUS="Not OK"
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME is very high!"
elif [ "$MESSAGECOUNT" -gt "$MSGCOUNTYELLOW" ] ; then
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME is higher than normal"
RETURNSTATUS="Caution"
if [ ! "$COLOR" = "red" ] ; then
COLOR=yellow
fi
fi
CONSUMERCOUNT=`cat /tmp/$$ |grep -A 3 "The number of consumers on the queue"|tail -1 | awk '{print $1}'`
if [ "$CONSUMERCOUNT" -lt "$MINCONSUMERCOUNT" ] ; then
COLOR=yellow
RETURNSTATUS="Not OK"
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME has less than expected $MINCONSUMERCOUNT queue consumers!"
fi
RETURNQUEUEMESSAGE="$RETURNQUEUEMESSAGE\n$QUEUENAME $MESSAGECOUNT $CONSUMERCOUNT"
RETURNQUEUEMONITOR="$RETURNQUEUEMONITOR\n$QUEUENAME : $MESSAGECOUNT"
if [ "$MESSAGECOUNT" -gt "25" ] ; then
if echo $QUEUENAME | grep "DLQ" ; then
curl -m 10 -s "http://$1:$2/jmx-console/HtmlAdaptor?action=invokeOp&methodIndex=5&name=jboss.messaging.destination%3Aservice%3DQueue%2Cname%3D$QUEUENAME"; >/dev/null 2>&1
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME was cleared"
COLOR=yellow
fi
fi
done < <(curl -s -m 10 "http://$1:$2/jmx-console/HtmlAdaptor?action=displayMBeans&filter=jboss.messaging.destination"; |grep -o ">name=.*,"|sed -e 's/>name=//g' -e 's/,$//g')
#set how many queue consumers we should expect
if [ "$ENVIRONMENTPREFIX" = "retv" ] ; then
MINQUEUECONSUMERSCOUNT=7 # the minimum number of queue consumers registered with JBoss before the test turns red for prod
else
MINQUEUECONSUMERSCOUNT=1 # the minimum number of queue consumers registered with JBoss before the test turns red for dev
fi
#get list of registered queue consumers
LISTEDCONSUMERS="Queue Consumers:<table>"
while read CONSUMERIPADDRESS ; do
let CONSUMERCOUNTER+=1
HOSTNAME=`host $CONSUMERIPADDRESS | awk '{print $5}'`
LISTEDCONSUMERS="$LISTEDCONSUMERS<tr><td>$HOSTNAME</td><td>$CONSUMERIPADDRESS</td></tr>"
done < <(curl -s "http://$1:$2/jmx-console/HtmlAdaptor?action=invokeOp&methodIndex=19&name=jboss.messaging%3Aservice%3DServerPeer"; |grep '<td>10' |sed -e 's/<td>//g' -e 's/<\/td>//g' |sort |uniq)
LISTEDCONSUMERS="$LISTEDCONSUMERS </table>"
if [ "$CONSUMERCOUNTER" -lt "$MINQUEUECONSUMERSCOUNT" ] ; then
RETURNMESSAGE="$RETURNMESSAGE\nSome queue consumers are missing!"
COLOR=red
elif [ "$CONSUMERCOUNTER" -eq "$MINQUEUECONSUMERSCOUNT" ] ; then
LISTEDCONSUMERS=""
fi
RETURNMESSAGE="$RETURNMESSAGE\nExpected $MINQUEUECONSUMERSCOUNT, found $CONSUMERCOUNTER queue consumers currently registered."
if [ "$RETURNQUEUEMONITOR" = "" ] ; then
RETURNQUEUEMESSAGE="JBoss is down or unreachable!!!"
COLOR=red
fi
if [ "$RETURNSTATUS" = "" ] ; then
RETURNSTATUS="OK"
fi
if [ "$RETURNMESSAGE" = "" ] ; then
RETURNMESSAGE="OK"
fi
/home/hobbit/client/bin/xymon retv6100.na.lzb.hq "status $1.jboss $COLOR `date` $RETURNSTATUS
`echo -e "Status message:\n $RETURNMESSAGE"`
$LISTEDCONSUMERS
Queue List:
`echo -e $RETURNQUEUEMESSAGE|column -t`
"
/home/hobbit/client/bin/xymon retv6100.na.lzb.hq "data $1.jboss green `date` OK
`echo -e $RETURNQUEUEMONITOR|sed -e 1d -e 's/\(.*\)/\U\1/' -e 's/QUEUE//g' -e 's/ //g' -e 's/INVENTORY/INVTRY/g' -e 's/RETAIL/RETL/g' -e 's/PRICE/PRC/g' -e 's/RESPONSE/RESPNS/g' -e 's/STATUS/STS/g' -e 's/FREIGHT/FRGT/g' -e 's/REQUEST/REQST/g' | awk -F ":" '{print substr($1,1,18)" : "$2}'`
"
rm -f /tmp/$$
}
while read HOSTLINE ; do
SERVERNAME=`echo $HOSTLINE | awk '{print $2}'`
SERVERPORT=`echo $HOSTLINE | awk -F ":" '{print $2}'`
GETSTATS $SERVERNAME $SERVERPORT
done < <(/home/hobbit/server/bin/xymongrep jbossjms:*)
▸
Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>;
▸
From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid] Sent: Wednesday, September 12, 2012 10:59 AM To: Scot Kreienkamp Cc: xymon at xymon.com Subject: Re: [Xymon] jboss monitorin Could you send me a copy, or post it on Xymonton? Thanks, Larry Barber On Wed, Sep 12, 2012 at 9:50 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote: I wrote a jboss client that pulls message and consumer counts from the jmx web console. That way I can tell if it's up, how full the queues are, and whether or not consumers are registered. That's about all the useful info I could find in the web console. Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>; From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Larry Barber Sent: Wednesday, September 12, 2012 10:43 AM To: xymon at xymon.com<mailto:xymon at xymon.com> Subject: [Xymon] jboss monitorin Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated. Thanks, Larry Barber This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you. This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Scot Kreienkamp
BTW, if you ever find a way to figure out how fast (or even if) messages are being processed, let me know. I've never been able to figure out a way. There's no way to get incoming rates and processing rates for the queues that I know of.
▸
Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>;
▸
From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid] Sent: Wednesday, September 12, 2012 10:59 AM To: Scot Kreienkamp Cc: xymon at xymon.com Subject: Re: [Xymon] jboss monitorin Could you send me a copy, or post it on Xymonton? Thanks, Larry Barber On Wed, Sep 12, 2012 at 9:50 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote: I wrote a jboss client that pulls message and consumer counts from the jmx web console. That way I can tell if it's up, how full the queues are, and whether or not consumers are registered. That's about all the useful info I could find in the web console. Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>; From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Larry Barber Sent: Wednesday, September 12, 2012 10:43 AM To: xymon at xymon.com<mailto:xymon at xymon.com> Subject: [Xymon] jboss monitorin Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated. Thanks, Larry Barber This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you. This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Andy Smith
Hi, Hmm... I had overlooked the fact that the cloud storage I was using is no longer available (since just 2 weeks ago actually), apologies. I have updated Xymonton with a new download location (http://dl.dropbox.com/u/92999992/jmxstat_kit.zip). In the meantime, we are using jmxstat to monitor lots of JBoss at the place I work, code is stable, last update 2011-11-11 support for Xymon 4.3, if you want any more info or any screenshots of what you could potentially get out of it, let me know, I wont pollute this list with this stuff because it is only interesting to specific projects. -- Andy
▸
Larry Barber wrote:Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated. Thanks, Larry Barber
list Nicolas Lienard
hi
you can also use the jvm check done by olivier (sent yesterday)
it uses jps/jinfo and jstat.
maybe you have to adapt the jps grep but it is minor.
#!/usr/bin/perl
use Data::Dumper;
my @jps = split /\n/, `sudo /usr/java/jdk1.6/bin/jps -v | grep Bootstrap`;
my %res;
foreach my $jvm (@jps) {
my @t = split /\s+/, $jvm;
my $pid = shift @t;
if ( my @tt = grep /-Dcatalina.base/, @t) {
my $tid = shift @tt;
my @ttid = split /\//, $tid;
my $id = pop @ttid;
if ( `sudo /usr/java/jdk1.6/bin/jinfo $pid 2>&1 ` =~ /java.specification.version/ ) {
$res{"$id"}{"version"} = "jdk1.6";
$res{"$id"}{"pid"} = $pid;
} elsif ( `sudo /usr/java/jdk1.5/bin/jinfo $pid 2>&1 ` =~ /java.specification.version/ ) {
$res{"$id"}{"version"} = "jdk1.5";
$res{"$id"}{"pid"} = $pid;
} else { print "Cannot identify jvm version for $pid\n"; }
}
}
foreach my $id (keys %res) {
my $pid = $res{"$id"}{"pid"};
my $bin = $res{"$id"}{"version"};
$str = `sudo /usr/java/$bin/bin/jstat -gccapacity -t $pid 1 1 | tail -n 1`;
($t,$timestamp,$NGCMN,$NGCMX,$NGC,$S0C,$S1C,$EC,$OGCMN,$OGCMX,$OGC,$OC,$PGCMN,$PGCMX,$PGC,$PC,$YGC,$FGC) = split /\s+/, $str;
$str = `sudo /usr/java/$bin/bin/jstat -gc -t $pid 1 1 | tail -n 1`;
($t,$timestamp,$s0c,$s1c,$s0u,$s1u,$ec,$eu,$oc,$ou,$pc,$pused,$ygc,$ygct,$fgc,$fgct,$gct) = split /\s+/, $str;
my $perused = sprintf ("%.2f",( $pused * 100 ) / $PGCMX );
if ($perused > 99) {
$color = "red";
} elsif ( $perused > 98 ) {
$color = "yellow";
} else { $color = "green"; }
$res{"$id"}{"gccap"}{"label"} = "Gc Capacity";
$res{"$id"}{"gccap"}{"value"} = $perused;
$res{"$id"}{"gccap"}{"alert"} = 0;
$str = `sudo /usr/java/$bin/bin/jstat -gc -t $pid 1 1 | tail -n 1`;
($t,$timestamp,$s0c,$s1c,$s0u,$s1u,$ec,$eu,$oc,$ou,$pc,$pu,$ygc,$ygct,$fgc,$fgct,$gct) = split /\s+/, $str;
$s0c *= 1024; $s1c *= 1024; $s0u *= 1024; $s1u *= 1024; $ec *= 1024; $eu *= 1024; $oc *= 1024; $ou *= 1024;
$pc *= 1024; $pu *= 1024;
$res{"$id"}{"gccap"}{"trends"} = "[jvm.$id.rrd]
DS:SOC:GAUGE:600:0:U $s0c
DS:S1C:GAUGE:600:0:U $s1c
DS:S0U:GAUGE:600:0:U $s0u
DS:S1U:GAUGE:600:0:U $s1u
DS:EC:GAUGE:600:0:U $ec
DS:EU:GAUGE:600:0:U $eu
DS:OC:GAUGE:600:0:U $oc
DS:OU:GAUGE:600:0:U $ou
DS:PC:GAUGE:600:0:U $pc
DS:PU:GAUGE:600:0:U $pu
DS:GCAP:GAUGE:600:0:U $perused";
}
$line = "Gc Capacity and VM memory reporting\n";
#$line = "$ENV{'BB'} $ENV{'BBDISP'} \"status $ENV{'MACHINE'}.jvm";
$mcolor = 0;
@colors = ("green","yellow","red");
$trends = "";
foreach my $id (sort keys %res) {
$line .= "&". at colors[$res{"$id"}{"gccap"}{"alert"}]." $id : ".$res{"$id"}{"gccap"}{"value"}."%\n";
if ( $res{"$id"}{"gccap"}{"alert"} > $mcolor ) {
$mcolor = $res{"$id"}{"gccap"}{"alert"} ;
}
$trends .= $res{"$id"}{"gccap"}{"trends"}."\n";
}
$date = `/bin/date`;
$color = $colors[$mcolor];
$line .= "\n<!-- linecount=6 -->";
system qq/ $ENV{'BB'} $ENV{'BBDISP'} "status $ENV{'MACHINE'}.jvm $color $line $date <!-- linecount=6 --> "/;
system qq/ $ENV{'BB'} $ENV{'BBDISP'} "data $ENV{'MACHINE'}.trends\n$trends"/;
graphs.cfg
[jvm]
FNPATTERN jvm.(.*).rrd
TITLE Garbage Collection
YAXIS Bytes
DEF:EC at RRDIDX@=@RRDFN@:EC:AVERAGE
DEF:EU at RRDIDX@=@RRDFN@:EU:AVERAGE
DEF:OC at RRDIDX@=@RRDFN@:OC:AVERAGE
DEF:OU at RRDIDX@=@RRDFN@:OU:AVERAGE
DEF:PC at RRDIDX@=@RRDFN@:PC:AVERAGE
DEF:PU at RRDIDX@=@RRDFN@:PU:AVERAGE
DEF:GCAP at RRDIDX@=@RRDFN@:GCAP:AVERAGE
LINE1:EC at RRDIDX@#@COLOR@:@RRDPARAM@ Current eden space capacity.\n
GPRINT:EC at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:EC at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:EC at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:EC at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
LINE1:EU at RRDIDX@#@COLOR@:@RRDPARAM@ Eden space utilization.\n
GPRINT:EU at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:EU at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:EU at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:EU at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
LINE1:OC at RRDIDX@#@COLOR@:@RRDPARAM@ Current old space capacity.\n
GPRINT:OC at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:OC at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:OC at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:OC at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
LINE1:OU at RRDIDX@#@COLOR@:@RRDPARAM@ Old space utilization.\n
GPRINT:OU at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:OU at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:OU at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:OU at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
LINE1:PC at RRDIDX@#@COLOR@:@RRDPARAM@ Current permanent space capacity.\n
GPRINT:PC at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:PC at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:PC at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:PC at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
LINE1:PU at RRDIDX@#@COLOR@:@RRDPARAM@ Permanent space utilization.\n
GPRINT:PU at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:PU at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:PU at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:PU at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
cheers
nico
▸
Le 12 sept. 2012 à 17:25, Scot Kreienkamp a écrit :
I didn't think it was really appropriate to post because it's heavily customized for my different environments and such. You'll have to do some work before it's suitable for yours.
Basically I pull a list of queues using curl then loop back through each queue with curl to grab the queue stats. It sends those in a status message then sends the stats in a second data message so they can be graphed. It will also clear any queue with DLQ in the name once it gets above 25. Otherwise the DLQ's never clear. I started doing that because the DLQ's got so big they brought the server to almost a standstill after several months of nobody paying attention to it.
The entries in your hosts file are like: jbossjms:8080
(jbossjms being the name of the test, and 8080 being the port the jmx console is on. This assumes no auth on the jmx web console, which there isn't by default.)
Graphs.cfg entry:
[jboss]
FNPATTERN ^jboss.(.+).rrd
TITLE Queue sizes
YAXIS Queue size
DEF:p at RRDIDX@=@RRDFN@:lambda:MAX
LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@
GPRINT:p at RRDIDX@:LAST: \: %5.0lf (cur)
GPRINT:p at RRDIDX@:MAX: \: %5.0lf (max)
GPRINT:p at RRDIDX@:MIN: \: %5.0lf (min)
GPRINT:p at RRDIDX@:AVERAGE: \: %5.0lf (avg)\n
I have mine setup to graph the max value, you probably need to change that to average.
You need to use splitncv in the xymonserver.cfg also. Otherwise anytime you add or remove a queue the graph won't show up or the RRD updater will error out as the new data point won't exist in the RRD.
Works very well for me. Here it is, hope this helps.
#!/bin/bash
function GETSTATS ()
{
COLOR=green
RETURNQUEUEMESSAGE="Queue_Name Message_Count Consumer_Count"
RETURNQUEUEMONITOR=""
ENVIRONMENTPREFIX=`echo $1 | cut -c 1-4`
RETURNMESSAGE=""
CONSUMERCOUNTER=""
case $1 in
retv3040.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3041.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3042.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3043.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3044.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
retv3045.na.lzb.hq)
ENVIRONMENTPREFIX=train
;;
esac
while read QUEUENAME ; do
curl -s -m 10 "http://$1:$2/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.messaging.destination%3Aservice%3DQueue%2Cname%3D$QUEUENAME"; > /tmp/$$
MESSAGECOUNT=`cat /tmp/$$ |grep -A 3 "The number of messages in the queue"|tail -1 | awk '{print $1}'`
#setup some environment variables for prod VS dev and for specific queues
if [ "$ENVIRONMENTPREFIX" = "retv" ] ; then
case $QUEUENAME in
PricingUploadResponseQueue)
MSGCOUNTRED=5 #the number of messages in the queue to turn the test red
MSGCOUNTYELLOW=3 # the number of messages in the queue to turn the test yellow
MINCONSUMERCOUNT=12 # the expected number of consumers for the PricingUploadResponseQueue and UnMeteredReportResponseQueue
;;
*)
MSGCOUNTRED=500
MSGCOUNTYELLOW=250
MINCONSUMERCOUNT=0
;;
esac
else
case $QUEUENAME in
PricingUploadResponseQueue)
MSGCOUNTRED=10
MSGCOUNTYELLOW=5
MINCONSUMERCOUNT=0
;;
*)
MSGCOUNTRED=500
MSGCOUNTYELLOW=250
MINCONSUMERCOUNT=0
;;
esac
fi
if [ "$MESSAGECOUNT" -gt "$MSGCOUNTRED" ] ; then
COLOR=red
RETURNSTATUS="Not OK"
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME is very high!"
elif [ "$MESSAGECOUNT" -gt "$MSGCOUNTYELLOW" ] ; then
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME is higher than normal"
RETURNSTATUS="Caution"
if [ ! "$COLOR" = "red" ] ; then
COLOR=yellow
fi
fi
CONSUMERCOUNT=`cat /tmp/$$ |grep -A 3 "The number of consumers on the queue"|tail -1 | awk '{print $1}'`
if [ "$CONSUMERCOUNT" -lt "$MINCONSUMERCOUNT" ] ; then
COLOR=yellow
RETURNSTATUS="Not OK"
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME has less than expected $MINCONSUMERCOUNT queue consumers!"
fi
RETURNQUEUEMESSAGE="$RETURNQUEUEMESSAGE\n$QUEUENAME $MESSAGECOUNT $CONSUMERCOUNT"
RETURNQUEUEMONITOR="$RETURNQUEUEMONITOR\n$QUEUENAME : $MESSAGECOUNT"
if [ "$MESSAGECOUNT" -gt "25" ] ; then
if echo $QUEUENAME | grep "DLQ" ; then
curl -m 10 -s "http://$1:$2/jmx-console/HtmlAdaptor?action=invokeOp&methodIndex=5&name=jboss.messaging.destination%3Aservice%3DQueue%2Cname%3D$QUEUENAME"; >/dev/null 2>&1
RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME was cleared"
COLOR=yellow
fi
fi
done < <(curl -s -m 10 "http://$1:$2/jmx-console/HtmlAdaptor?action=displayMBeans&filter=jboss.messaging.destination"; |grep -o ">name=.*,"|sed -e 's/>name=//g' -e 's/,$//g')
#set how many queue consumers we should expect
if [ "$ENVIRONMENTPREFIX" = "retv" ] ; then
MINQUEUECONSUMERSCOUNT=7 # the minimum number of queue consumers registered with JBoss before the test turns red for prod
else
MINQUEUECONSUMERSCOUNT=1 # the minimum number of queue consumers registered with JBoss before the test turns red for dev
fi
#get list of registered queue consumers
LISTEDCONSUMERS="Queue Consumers:<table>"
while read CONSUMERIPADDRESS ; do
let CONSUMERCOUNTER+=1
HOSTNAME=`host $CONSUMERIPADDRESS | awk '{print $5}'`
LISTEDCONSUMERS="$LISTEDCONSUMERS<tr><td>$HOSTNAME</td><td>$CONSUMERIPADDRESS</td></tr>"
done < <(curl -s "http://$1:$2/jmx-console/HtmlAdaptor?action=invokeOp&methodIndex=19&name=jboss.messaging%3Aservice%3DServerPeer"; |grep '<td>10' |sed -e 's/<td>//g' -e 's/<\/td>//g' |sort |uniq)
LISTEDCONSUMERS="$LISTEDCONSUMERS </table>"
if [ "$CONSUMERCOUNTER" -lt "$MINQUEUECONSUMERSCOUNT" ] ; then
RETURNMESSAGE="$RETURNMESSAGE\nSome queue consumers are missing!"
COLOR=red
elif [ "$CONSUMERCOUNTER" -eq "$MINQUEUECONSUMERSCOUNT" ] ; then
LISTEDCONSUMERS=""
fi
RETURNMESSAGE="$RETURNMESSAGE\nExpected $MINQUEUECONSUMERSCOUNT, found $CONSUMERCOUNTER queue consumers currently registered."
if [ "$RETURNQUEUEMONITOR" = "" ] ; then
RETURNQUEUEMESSAGE="JBoss is down or unreachable!!!"
COLOR=red
fi
if [ "$RETURNSTATUS" = "" ] ; then
RETURNSTATUS="OK"
fi
if [ "$RETURNMESSAGE" = "" ] ; then
RETURNMESSAGE="OK"
fi
/home/hobbit/client/bin/xymon retv6100.na.lzb.hq "status $1.jboss $COLOR `date` $RETURNSTATUS
`echo -e "Status message:\n $RETURNMESSAGE"`
$LISTEDCONSUMERS
Queue List:
`echo -e $RETURNQUEUEMESSAGE|column -t`
"
/home/hobbit/client/bin/xymon retv6100.na.lzb.hq "data $1.jboss green `date` OK
`echo -e $RETURNQUEUEMONITOR|sed -e 1d -e 's/\(.*\)/\U\1/' -e 's/QUEUE//g' -e 's/ //g' -e 's/INVENTORY/INVTRY/g' -e 's/RETAIL/RETL/g' -e 's/PRICE/PRC/g' -e 's/RESPONSE/RESPNS/g' -e 's/STATUS/STS/g' -e 's/FREIGHT/FRGT/g' -e 's/REQUEST/REQST/g' | awk -F ":" '{print substr($1,1,18)" : "$2}'`
"
rm -f /tmp/$$
}
while read HOSTLINE ; do
SERVERNAME=`echo $HOSTLINE | awk '{print $2}'`
SERVERPORT=`echo $HOSTLINE | awk -F ":" '{print $2}'`
GETSTATS $SERVERNAME $SERVERPORT
done < <(/home/hobbit/server/bin/xymongrep jbossjms:*)
Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated
1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid | www.la-z-boy.com
From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid]
Sent: Wednesday, September 12, 2012 10:59 AM
To: Scot Kreienkamp
Cc: xymon at xymon.com
Subject: Re: [Xymon] jboss monitorin
Could you send me a copy, or post it on Xymonton?
Thanks,
Larry Barber
On Wed, Sep 12, 2012 at 9:50 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid> wrote:
I wrote a jboss client that pulls message and consumer counts from the jmx web console. That way I can tell if it's up, how full the queues are, and whether or not consumers are registered. That's about all the useful info I could find in the web console.
Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated
1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid | www.la-z-boy.com
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Larry Barber
Sent: Wednesday, September 12, 2012 10:43 AM
To: xymon at xymon.com
Subject: [Xymon] jboss monitorin
Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated.
Thanks,
Larry Barber
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.list Tom Moore
For what it's worth, I wrote a simple script that uses the built in twiddle.sh command to check jboss queues.. Quick snippet modified for security TWIDDLECMD="/usr/local/jboss/jboss-4.2.3.GA/bin/twiddle.sh" # Run command echo "" >> $OUTFILE echo "Number of active JBoss Sessions" >> $OUTFILE echo "" >> $OUTFILE $TWIDDLECMD -s localhost:1799 -u user -p <password> get "jboss.web:host=localhost,path=/YourWebApp,type=Manager" activeSessions | sed 's/=/:/g' >> $OUTFILE # NOW USE THE XYMON COMMAND TO SEND THE DATA ACROSS $XYMON $XYMSRV "status $MACHINE.$TEST $COLOR `$DATE` `$CAT $OUTFILE` "
▸
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Scot Kreienkamp Sent: Wednesday, September 12, 2012 11:26 AM To: Larry Barber Cc: xymon at xymon.com Subject: Re: [Xymon] jboss monitorin I didn't think it was really appropriate to post because it's heavily customized for my different environments and such. You'll have to do some work before it's suitable for yours. Basically I pull a list of queues using curl then loop back through each queue with curl to grab the queue stats. It sends those in a status message then sends the stats in a second data message so they can be graphed. It will also clear any queue with DLQ in the name once it gets above 25. Otherwise the DLQ's never clear. I started doing that because the DLQ's got so big they brought the server to almost a standstill after several months of nobody paying attention to it. The entries in your hosts file are like: jbossjms:8080 (jbossjms being the name of the test, and 8080 being the port the jmx console is on. This assumes no auth on the jmx web console, which there isn't by default.) Graphs.cfg entry: [jboss] FNPATTERN ^jboss.(.+).rrd TITLE Queue sizes YAXIS Queue size DEF:p at RRDIDX@=@RRDFN@:lambda:MAX LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:p at RRDIDX@:LAST: \: %5.0lf (cur) GPRINT:p at RRDIDX@:MAX: \: %5.0lf (max) GPRINT:p at RRDIDX@:MIN: \: %5.0lf (min) GPRINT:p at RRDIDX@:AVERAGE: \: %5.0lf (avg)\n I have mine setup to graph the max value, you probably need to change that to average. You need to use splitncv in the xymonserver.cfg also. Otherwise anytime you add or remove a queue the graph won't show up or the RRD updater will error out as the new data point won't exist in the RRD. Works very well for me. Here it is, hope this helps. #!/bin/bash function GETSTATS () { COLOR=green RETURNQUEUEMESSAGE="Queue_Name Message_Count Consumer_Count" RETURNQUEUEMONITOR="" ENVIRONMENTPREFIX=`echo $1 | cut -c 1-4` RETURNMESSAGE="" CONSUMERCOUNTER="" case $1 in retv3040.na.lzb.hq) ENVIRONMENTPREFIX=train ;; retv3041.na.lzb.hq) ENVIRONMENTPREFIX=train ;; retv3042.na.lzb.hq) ENVIRONMENTPREFIX=train ;; retv3043.na.lzb.hq) ENVIRONMENTPREFIX=train ;; retv3044.na.lzb.hq) ENVIRONMENTPREFIX=train ;; retv3045.na.lzb.hq) ENVIRONMENTPREFIX=train ;; esac while read QUEUENAME ; do curl -s -m 10 "http://$1:$2/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.messaging.destination%3Aservice%3DQueue%2Cname%3D$QUEUENAME"; > /tmp/$$ MESSAGECOUNT=`cat /tmp/$$ |grep -A 3 "The number of messages in the queue"|tail -1 | awk '{print $1}'` #setup some environment variables for prod VS dev and for specific queues if [ "$ENVIRONMENTPREFIX" = "retv" ] ; then case $QUEUENAME in PricingUploadResponseQueue) MSGCOUNTRED=5 #the number of messages in the queue to turn the test red MSGCOUNTYELLOW=3 # the number of messages in the queue to turn the test yellow MINCONSUMERCOUNT=12 # the expected number of consumers for the PricingUploadResponseQueue and UnMeteredReportResponseQueue ;; *) MSGCOUNTRED=500 MSGCOUNTYELLOW=250 MINCONSUMERCOUNT=0 ;; esac else case $QUEUENAME in PricingUploadResponseQueue) MSGCOUNTRED=10 MSGCOUNTYELLOW=5 MINCONSUMERCOUNT=0 ;; *) MSGCOUNTRED=500 MSGCOUNTYELLOW=250 MINCONSUMERCOUNT=0 ;; esac fi if [ "$MESSAGECOUNT" -gt "$MSGCOUNTRED" ] ; then COLOR=red RETURNSTATUS="Not OK" RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME is very high!" elif [ "$MESSAGECOUNT" -gt "$MSGCOUNTYELLOW" ] ; then RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME is higher than normal" RETURNSTATUS="Caution" if [ ! "$COLOR" = "red" ] ; then COLOR=yellow fi fi CONSUMERCOUNT=`cat /tmp/$$ |grep -A 3 "The number of consumers on the queue"|tail -1 | awk '{print $1}'` if [ "$CONSUMERCOUNT" -lt "$MINCONSUMERCOUNT" ] ; then COLOR=yellow RETURNSTATUS="Not OK" RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME has less than expected $MINCONSUMERCOUNT queue consumers!" fi RETURNQUEUEMESSAGE="$RETURNQUEUEMESSAGE\n$QUEUENAME $MESSAGECOUNT $CONSUMERCOUNT" RETURNQUEUEMONITOR="$RETURNQUEUEMONITOR\n$QUEUENAME : $MESSAGECOUNT" if [ "$MESSAGECOUNT" -gt "25" ] ; then if echo $QUEUENAME | grep "DLQ" ; then curl -m 10 -s "http://$1:$2/jmx-console/HtmlAdaptor?action=invokeOp&methodIndex=5&name=jboss.messaging.destination%3Aservice%3DQueue%2Cname%3D$QUEUENAME"; >/dev/null 2>&1 RETURNMESSAGE="$RETURNMESSAGE\n$QUEUENAME was cleared" COLOR=yellow fi fi done < <(curl -s -m 10 "http://$1:$2/jmx-console/HtmlAdaptor?action=displayMBeans&filter=jboss.messaging.destination"; |grep -o ">name=.*,"|sed -e 's/>name=//g' -e 's/,$//g') #set how many queue consumers we should expect if [ "$ENVIRONMENTPREFIX" = "retv" ] ; then MINQUEUECONSUMERSCOUNT=7 # the minimum number of queue consumers registered with JBoss before the test turns red for prod else MINQUEUECONSUMERSCOUNT=1 # the minimum number of queue consumers registered with JBoss before the test turns red for dev fi #get list of registered queue consumers LISTEDCONSUMERS="Queue Consumers:<table>" while read CONSUMERIPADDRESS ; do let CONSUMERCOUNTER+=1 HOSTNAME=`host $CONSUMERIPADDRESS | awk '{print $5}'` LISTEDCONSUMERS="$LISTEDCONSUMERS<tr><td>$HOSTNAME</td><td>$CONSUMERIPADDRESS</td></tr>" done < <(curl -s "http://$1:$2/jmx-console/HtmlAdaptor?action=invokeOp&methodIndex=19&name=jboss.messaging%3Aservice%3DServerPeer"; |grep '<td>10' |sed -e 's/<td>//g' -e 's/<\/td>//g' |sort |uniq) LISTEDCONSUMERS="$LISTEDCONSUMERS </table>" if [ "$CONSUMERCOUNTER" -lt "$MINQUEUECONSUMERSCOUNT" ] ; then RETURNMESSAGE="$RETURNMESSAGE\nSome queue consumers are missing!" COLOR=red elif [ "$CONSUMERCOUNTER" -eq "$MINQUEUECONSUMERSCOUNT" ] ; then LISTEDCONSUMERS="" fi RETURNMESSAGE="$RETURNMESSAGE\nExpected $MINQUEUECONSUMERSCOUNT, found $CONSUMERCOUNTER queue consumers currently registered." if [ "$RETURNQUEUEMONITOR" = "" ] ; then RETURNQUEUEMESSAGE="JBoss is down or unreachable!!!" COLOR=red fi if [ "$RETURNSTATUS" = "" ] ; then RETURNSTATUS="OK" fi if [ "$RETURNMESSAGE" = "" ] ; then RETURNMESSAGE="OK" fi /home/hobbit/client/bin/xymon retv6100.na.lzb.hq "status $1.jboss $COLOR `date` $RETURNSTATUS `echo -e "Status message:\n $RETURNMESSAGE"` $LISTEDCONSUMERS Queue List: `echo -e $RETURNQUEUEMESSAGE|column -t` " /home/hobbit/client/bin/xymon retv6100.na.lzb.hq "data $1.jboss green `date` OK `echo -e $RETURNQUEUEMONITOR|sed -e 1d -e 's/\(.*\)/\U\1/' -e 's/QUEUE//g' -e 's/ //g' -e 's/INVENTORY/INVTRY/g' -e 's/RETAIL/RETL/g' -e 's/PRICE/PRC/g' -e 's/RESPONSE/RESPNS/g' -e 's/STATUS/STS/g' -e 's/FREIGHT/FRGT/g' -e 's/REQUEST/REQST/g' | awk -F ":" '{print substr($1,1,18)" : "$2}'` " rm -f /tmp/$$ } while read HOSTLINE ; do SERVERNAME=`echo $HOSTLINE | awk '{print $2}'` SERVERPORT=`echo $HOSTLINE | awk -F ":" '{print $2}'` GETSTATS $SERVERNAME $SERVERPORT done < <(/home/hobbit/server/bin/xymongrep jbossjms:*) Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>; From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid]<mailto:[mailto:user-6ef9c2864140@xymon.invalid]> Sent: Wednesday, September 12, 2012 10:59 AM To: Scot Kreienkamp Cc: xymon at xymon.com<mailto:xymon at xymon.com> Subject: Re: [Xymon] jboss monitorin Could you send me a copy, or post it on Xymonton? Thanks, Larry Barber On Wed, Sep 12, 2012 at 9:50 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote: I wrote a jboss client that pulls message and consumer counts from the jmx web console. That way I can tell if it's up, how full the queues are, and whether or not consumers are registered. That's about all the useful info I could find in the web console. Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Incorporated 1284 N. Telegraph Rd. | Monroe, MI 48162 | user-9678697f1438@xymon.invalid<mailto:user-9678697f1438@xymon.invalid> | www.la-z-boy.com<http://www.la-z-boy.com/>; From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Larry Barber Sent: Wednesday, September 12, 2012 10:43 AM To: xymon at xymon.com<mailto:xymon at xymon.com> Subject: [Xymon] jboss monitorin Has anybody found a good way to monitor jboss servers? I have a bunch of jboss installations and need some way to monitor their performance. I checked Xymonton but couldn't find anything useful (the jmxstat project appears to be dead, at least the link leading to the download is dead). Any help would be much appreciated. Thanks, Larry Barber This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you. This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Marco Avvisano
Hi Andy, i start to use your tool for jboss (version 4 and 5), great tool Only some questions. .. for bean java.lang:type=Memory , the values are in Kb or Mb ? There is a way to disable Uptime check ? I don't know but for some JVM, on the same machine, this check give me : DBG: connected! DBG: Processing Uptime for column Uptime DBG: Fetching attributes for fake uptime If i remove the bean from 'datacollection' it make always the check .. This tool work fine on hobbit client, but on xymon a need to lunch it specifying the Jvm (option -J ) thanks, Marco
▸
Il 12/09/2012 21.00, Andy Smith ha scritto:Hi, Hmm... I had overlooked the fact that the cloud storage I was using is no longer available (since just 2 weeks ago actually), apologies. I have updated Xymonton with a new download location (http://dl.dropbox.com/u/92999992/jmxstat_kit.zip). In the meantime, we are using jmxstat to monitor lots of JBoss at the place I work, code is stable, last update 2011-11-11 support for Xymon 4.3, if you want any more info or any screenshots of what you could potentially get out of it, let me know, I wont pollute this list with this stuff because it is only interesting to specific projects.
list Andy Smith
Hi,
Thanks for the feedback, good to hear you like it.
Regarding your questions, Memory is reported by JMX in bytes and this is converted in the tcl code to kbytes to avoid overflows in the integer arithmetic.
There is no Uptime bean, it is an attribute of the Runtime bean, I called it 'fake' because I wanted to treat it specially. Are you saying something fails for some JVM? Have they been running for a very long time, maybe uptime is overflowing? Let me know the Java version and the JBoss version I'll have a look if I can replicate it here.
If you need to specify the JVM for xymon then it sounds like the script is still trying to run bbhostgrep instead of xymongrep, anything in the logs?. There is a different shell wrapper for hobbit and xymon in the latest kit, and you need 0.1.3 of the tcl script. Have a look at the tcl script starting at line 5961 for how I envisaged this would work, the key is finding XYMONHOME in the environment instead of BBHOME. Let me know if you solve this please.
set XYMONCOMMS "xymon"
set XYMONSEARCH "xymongrep"
# inherit this from the environment or startup profile if its there
if { [info exists ::env(XYMONHOME) ] } {
set XYMONHOME $::env(XYMONHOME)
} elseif { [info exists ::env(BBHOME) ] } {
set XYMONHOME $::env(BBHOME)
set XYMONCOMMS "bb"
set XYMONSEARCH "bbhostgrep"
}
--
Andy
▸
Marco Avvisano wrote:Hi Andy, i start to use your tool for jboss (version 4 and 5), great tool Only some questions. .. for bean java.lang:type=Memory , the values are in Kb or Mb ? There is a way to disable Uptime check ? I don't know but for some JVM, on the same machine, this check give me : DBG: connected! DBG: Processing Uptime for column Uptime DBG: Fetching attributes for fake uptime If i remove the bean from 'datacollection' it make always the check .. This tool work fine on hobbit client, but on xymon a need to lunch it specifying the Jvm (option -J ) thanks, Marco Il 12/09/2012 21.00, Andy Smith ha scritto:Hi, Hmm... I had overlooked the fact that the cloud storage I was using is no longer available (since just 2 weeks ago actually), apologies. I have updated Xymonton with a new download location (http://dl.dropbox.com/u/92999992/jmxstat_kit.zip). In the meantime, we are using jmxstat to monitor lots of JBoss at the place I work, code is stable, last update 2011-11-11 support for Xymon 4.3, if you want any more info or any screenshots of what you could potentially get out of it, let me know, I wont pollute this list with this stuff because it is only interesting to specific projects.
list Marco Avvisano
Hi Andy, we use jboss 4.3.2 / 5.0.1, and xymon client. For Runtime bean the problem was "not registred" values, until the first access from jmxconsole. I solved adding the command curl 'http://myserver:myport/jmx-console/HtmlAdaptor?action=inspectMBean&name=java.lang%3Atype%3DRuntime'; > /dev/null in jmxstat.sh. Probabily i have the same problem for the column GCInfo, collect on the version 5.0.1 but not on 4.3.2 I use the shell script for xymon, and the environment seem to be correct. I get this error + PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/jre/bin + '[' -n /opt/hobbit/client ']' + XYMONEXT=/opt/hobbit/client/ext + JMXSH_JARFILE=/opt/hobbit/client/ext/jmxsh-R5.jar + JMXSH_SCRIPT=/opt/hobbit/client/ext/jmxstat.tcl + ENV=' ' + '[' -n /opt/hobbit/client/bin/xymon ']' + ENV=' -DXYMON=/opt/hobbit/client/bin/xymon ' + '[' -n /opt/hobbit/client ']' + ENV=' -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/client ' + '[' -n myserverip ']' + ENV=' -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/client -DXYMSRV=myserverip ' + case $@ in + exec /usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/bin/java -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/clie nt -DXYMSRV=myserverip -jar /opt/hobbit/client/ext/jmxsh-R5.jar /opt/hobbit/client/ext/jmxstat.tcl some error occurred jmxstat Usage: jmxstat [<options>] [<MBeans....>] -b Print configured Beans -n Dont send results to Xymon -r value column name for status report <> -I value Use the configuration file (default $XYMONHOME/etc/$HTAG.ini) <> -J value Report specified JVM Name(s) <> -x value Set debug level (0-9) <> -B Browse Mode -help Print this message -? Print this message JMX seems to report memory in kb (jboss 4,2.3). So, if i consider the conversion in the tcl in mb, and on the graph in gb, i get correct values (es . max heap size). Found this link about (for 1.5.0) : http://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html#summary On the version 4.2.3 i need to add a new section for ThreadPool ( jboss.web:typeThreadPoll,name=http-myipserver-myports). Not always find the way to make graph :- (the value and the color status are "attached" ) Marco
▸
Il 13/09/2012 23.19, Andy Smith ha scritto:Hi,
Thanks for the feedback, good to hear you like it.
Regarding your questions, Memory is reported by JMX in bytes and this is converted in the tcl code to kbytes to avoid overflows in the integer arithmetic.
There is no Uptime bean, it is an attribute of the Runtime bean, I called it 'fake' because I wanted to treat it specially. Are you saying something fails for some JVM? Have they been running for a very long time, maybe uptime is overflowing? Let me know the Java version and the JBoss version I'll have a look if I can replicate it here.
If you need to specify the JVM for xymon then it sounds like the script is still trying to run bbhostgrep instead of xymongrep, anything in the logs?. There is a different shell wrapper for hobbit and xymon in the latest kit, and you need 0.1.3 of the tcl script. Have a look at the tcl script starting at line 5961 for how I envisaged this would work, the key is finding XYMONHOME in the environment instead of BBHOME. Let me know if you solve this please.
set XYMONCOMMS "xymon"
set XYMONSEARCH "xymongrep"
# inherit this from the environment or startup profile if its there
if { [info exists ::env(XYMONHOME) ] } {
set XYMONHOME $::env(XYMONHOME)
} elseif { [info exists ::env(BBHOME) ] } {
set XYMONHOME $::env(BBHOME)
set XYMONCOMMS "bb"
set XYMONSEARCH "bbhostgrep"
}list Andy Smith
Hi Marco,
Thanks for the workaround for registering the Runtime bean, I will add it into the docs.
Your environment seems as you say, correct, does your xymongrep program exist in /opt/hobbit/client/bin? Try changing line 6076 of the tcl to this to get some more information:
mydie "some error occurred executing $XYMONHOME/bin/$XYMONSEARCH $HTAG"
Results will vary with the version of JBoss. Despite a lot of effort, for neither old 4.2.3_GA nor 5.1.0_GA, were we able to get both the system MBeans and JBoss MBeans exposed at the same time. There were some additional JVM parameters supposed to help with that, but when we tried them, it broke the JMX stack when queried, and the JVM was thereafter basically useless. So since the system MBeans were more important to us, we settled for that. Later versions of JBoss may behave better, and expose both sets of MBeans.
This is what we get interactively for JBoss 4.2.3_GA
$ /usr/java/latest/bin/java -jar jmxsh-R5.jar -h <host> -p <port> -U MonitorRole -P <password>
jmxsh v1.0a, Tue Jul 24 16:09:47 BST 2012
Type 'help' for help. Give the option '-?' to any command
for usage help.
Starting up in shell mode.
%
Entering browse mode.
====================================================
Available Domains:
1. JMImplementation
2. jboss.ws
3. com.sun.management
4. java.lang
5. java.util.logging
SERVER: service:jmx:rmi:///jndi/rmi://<host>:<port>/jmxrmi
====================================================
And these are the major Java parameters behind this.
-Djava.security.manager
-Djava.security.policy=/apps/jboss/jboss-4.2.3.GA/server/<appserver>/conf/server.policy
-Djboss.home.dir=/apps/jboss/jboss-4.2.3.GA
-Djboss.server.home.dir=/apps/jboss/jboss-4.2.3.GA/server/<appserver>
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=<myport>
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=<mypasswordstore>
The big problem we had getting it working was updating the server.policy file to permit the JMX probes. These are the entries we came up with that were added to that file, but this really depends on whether you're running JBoss with Java Security enabled.
// MBean related permissions
grant {
permission javax.management.MBeanServerPermission "*";
permission javax.management.MBeanPermission "*", "*";
permission java.lang.management.ManagementPermission "monitor";
};
grant principal javax.management.remote.JMXPrincipal "monitorRole" {
permission javax.management.MBeanPermission "*", "getAttribute";
permission javax.management.MBeanPermission "*", "getClassLoader";
permission javax.management.MBeanPermission "*", "getClassLoaderFor";
permission javax.management.MBeanPermission "*", "getClassLoaderRepository";
permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "*", "getMBeanInfo";
permission javax.management.MBeanPermission "*", "getObjectInstance";
permission javax.management.MBeanPermission "*", "instantiate";
permission javax.management.MBeanPermission "*", "invoke";
permission javax.management.MBeanPermission "*", "queryMBeans";
permission javax.management.MBeanPermission "*", "queryNames";
};
grant principal javax.management.remote.JMXPrincipal "controlRole" {
permission javax.management.MBeanPermission "*", "*";
};
To work these out we added the following debug parameter to the JVM, and nibbled away at the access failures listed in the JBoss server log
-Djava.security.debug=access:failure
I could'nt find any attachment, can you browse to that Mbean (jboss.web:typeThreadPoll,name=http-myipserver-myports) and check that is has the attributes :
currentThreadCount
maxSpareThreads
currentThreadsBusy
minSpareThreads
MaxSpareThreads
Thanks
▸
--
Andy
Marco Avvisano wrote:Hi Andy, we use jboss 4.3.2 / 5.0.1, and xymon client. For Runtime bean the problem was "not registred" values, until the first access from jmxconsole. I solved adding the command curl 'http://myserver:myport/jmx-console/HtmlAdaptor?action=inspectMBean&name=java.lang%3Atype%3DRuntime'; > /dev/null in jmxstat.sh. Probabily i have the same problem for the column GCInfo, collect on the version 5.0.1 but not on 4.3.2 I use the shell script for xymon, and the environment seem to be correct. I get this error + PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/jre/bin + '[' -n /opt/hobbit/client ']' + XYMONEXT=/opt/hobbit/client/ext + JMXSH_JARFILE=/opt/hobbit/client/ext/jmxsh-R5.jar + JMXSH_SCRIPT=/opt/hobbit/client/ext/jmxstat.tcl + ENV=' ' + '[' -n /opt/hobbit/client/bin/xymon ']' + ENV=' -DXYMON=/opt/hobbit/client/bin/xymon ' + '[' -n /opt/hobbit/client ']' + ENV=' -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/client ' + '[' -n myserverip ']' + ENV=' -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/client -DXYMSRV=myserverip ' + case $@ in + exec /usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/bin/java -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/clie nt -DXYMSRV=myserverip -jar /opt/hobbit/client/ext/jmxsh-R5.jar /opt/hobbit/client/ext/jmxstat.tcl some error occurred jmxstat Usage: jmxstat [<options>] [<MBeans....>] -b Print configured Beans -n Dont send results to Xymon -r value column name for status report <> -I value Use the configuration file (default $XYMONHOME/etc/$HTAG.ini) <> -J value Report specified JVM Name(s) <> -x value Set debug level (0-9) <> -B Browse Mode -help Print this message -? Print this message JMX seems to report memory in kb (jboss 4,2.3). So, if i consider the conversion in the tcl in mb, and on the graph in gb, i get correct values (es . max heap size). Found this link about (for 1.5.0) : http://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html#summary On the version 4.2.3 i need to add a new section for ThreadPool ( jboss.web:typeThreadPoll,name=http-myipserver-myports). Not always find the way to make graph :- (the value and the color status are "attached" ) Marco Il 13/09/2012 23.19, Andy Smith ha scritto:Hi, Thanks for the feedback, good to hear you like it. Regarding your questions, Memory is reported by JMX in bytes and this is converted in the tcl code to kbytes to avoid overflows in the integer arithmetic. There is no Uptime bean, it is an attribute of the Runtime bean, I called it 'fake' because I wanted to treat it specially. Are you saying something fails for some JVM? Have they been running for a very long time, maybe uptime is overflowing? Let me know the Java version and the JBoss version I'll have a look if I can replicate it here. If you need to specify the JVM for xymon then it sounds like the script is still trying to run bbhostgrep instead of xymongrep, anything in the logs?. There is a different shell wrapper for hobbit and xymon in the latest kit, and you need 0.1.3 of the tcl script. Have a look at the tcl script starting at line 5961 for how I envisaged this would work, the key is finding XYMONHOME in the environment instead of BBHOME. Let me know if you solve this please. set XYMONCOMMS "xymon" set XYMONSEARCH "xymongrep" # inherit this from the environment or startup profile if its there if { [info exists ::env(XYMONHOME) ] } { set XYMONHOME $::env(XYMONHOME) } elseif { [info exists ::env(BBHOME) ] } { set XYMONHOME $::env(BBHOME) set XYMONCOMMS "bb" set XYMONSEARCH "bbhostgrep" }
list Andy Smith
New version (0.1.4) available in Xymonton, the GCinfo issue might have been fixed on 2012-07-24, please test. -- Andy
list Marco Avvisano
Hi Andy, i try to change the tcl file. This is the output: exec /usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/bin/java -DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/client -DXYMSRV=159.213.32.197 -jar /opt/hobbit/client/ext/jmxsh-R5.jar /opt/hobbit/client/ext/jmxstat.tcl some error occurred executing /opt/hobbit/client/bin/xymongrep jmxstat
▸
jmxstat Usage: jmxstat [<options>] [<MBeans....>]
-b Print configured Beans
-n Dont send results to Xymon
-r value column name for status report <>
-I value Use the configuration file (default $XYMONHOME/etc/$HTAG.ini) <>
-J value Report specified JVM Name(s) <>
-x value Set debug level (0-9) <>
-B Browse Mode
-help Print this message
-? Print this message
I'll try to change my debug level to verify better the problem.
Under the domain jboss.web (using controlRole user), there is the bean TreadPoll (http and ajp), that have all the attributes
Example for http:
Available Domains:
1. jboss.console
2. jboss.deployment
3. jmx.loading
4. jboss.web
5. jboss.ws
6. jboss.rmi
7. user.jboss.deployment
8. jboss.security
9. engineering
10. Catalina
11. jboss.jdbc
12. jboss.mq
13. jboss.remoting
14. Sincronizzatore
15. jboss.jca
16. jboss.bean
17. jboss.beans
18. com.arjuna.ats.properties
19. jboss.admin
20. jboss.j2ee
21. jboss
22. jboss.jms
23. jboss.aop
24. jboss.jmx
25. jboss.web.deployment
26. jboss.ejb3
27. jboss.cache
28. jboss.mq.destination
29. JMImplementation
30. jboss.deployer
31. jboss.ejb
32. jboss.system
33. SincronizzatoreDecodifiche
34. jboss.alerts
35. jboss.management.local
Select an mbean: 133
====================================================
Attribute List:
1. -rw int port
2. -rw boolean useSendfile
3. -r- int minSpareThreads
4. -rw int maxThreads
5. -r- String modelerType
6. -r- boolean running
7. -rw String sSLCARevocationPath
8. -rw boolean sSLEnabled
9. -rw int pollTime
10. -rw String name
11. -rw int pollerSize
12. -rw String sSLCACertificateFile
13. -rw int sSLVerifyDepth
14. -rw int pollerThreadCount
15. -rw int sendfileSize
16. -rw String sSLCertificateFile
17. -r- int currentThreadCount
18. -rw int keepAliveTimeout
19. -r- int keepAliveCount
20. -rw String sSLCARevocationFile
21. -rw boolean tcpNoDelay
22. -rw int threadPriority
23. -rw String sSLVerifyClient
24. -r- int maxSpareThreads
25. -rw boolean useComet
26. -rw int soLinger
27. -rw String sSLCipherSuite
28. -r- boolean paused
29. -rw String sSLCertificateKeyFile
30. -r- int sendfileCount
31. -rw String sSLProtocol
32. -rw String sSLPassword
33. -rw int backlog
34. -rw int acceptorThreadCount
35. -rw int soTimeout
36. -rw int sendfileThreadCount
37. -r- int currentThreadsBusy
38. -rw String sSLCertificateChainFile
39. -rw boolean daemon
40. -rw String sSLCACertificatePath
Operation List:
41. void pause()
42. void destroy()
43. void stop()
44. void resume()
45. void start()
46. void init()
DOMAIN: jboss.web
MBEAN: jboss.web:type=ThreadPool,name=http-myipserver-myport
For my question about kb/mb (memory), you know if different jboss version have different units of measurement ?
thanks a lot for your support,
Marco
list Andy Smith
Hi, What happens if you run this from the command line :- /opt/hobbit/client/bin/xymoncmd /opt/hobbit/client/bin/xymongrep jmxstat
▸
--
Andy
Marco Avvisano wrote:Hi Andy,
i try to change the tcl file. This is the output:
exec /usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/bin/java
-DXYMON=/opt/hobbit/client/bin/xymon -DXYMONHOME=/opt/hobbit/client
-DXYMSRV=159.213.32.197 -jar /opt/hobbit/client/ext/jmxsh-R5.jar
/opt/hobbit/client/ext/jmxstat.tcl
some error occurred executing /opt/hobbit/client/bin/xymongrep jmxstat
jmxstat Usage: jmxstat [<options>] [<MBeans....>]
-b Print configured Beans
-n Dont send results to Xymon
-r value column name for status report <>
-I value Use the configuration file (default
$XYMONHOME/etc/$HTAG.ini) <>
-J value Report specified JVM Name(s) <>
-x value Set debug level (0-9) <>
-B Browse Mode
-help Print this message
-? Print this message
I'll try to change my debug level to verify better the problem.
Under the domain jboss.web (using controlRole user), there is the bean
TreadPoll (http and ajp), that have all the attributes
Example for http:
Available Domains:
1. jboss.console
2. jboss.deployment
3. jmx.loading
4. jboss.web
5. jboss.ws
6. jboss.rmi
7. user.jboss.deployment
8. jboss.security
9. engineering
10. Catalina
11. jboss.jdbc
12. jboss.mq
13. jboss.remoting
14. Sincronizzatore
15. jboss.jca
16. jboss.bean
17. jboss.beans
18. com.arjuna.ats.properties
19. jboss.admin
20. jboss.j2ee
21. jboss
22. jboss.jms
23. jboss.aop
24. jboss.jmx
25. jboss.web.deployment
26. jboss.ejb3
27. jboss.cache
28. jboss.mq.destination
29. JMImplementation
30. jboss.deployer
31. jboss.ejb
32. jboss.system
33. SincronizzatoreDecodifiche
34. jboss.alerts
35. jboss.management.local
Select an mbean: 133
====================================================
Attribute List:
1. -rw int port
2. -rw boolean useSendfile
3. -r- int minSpareThreads
4. -rw int maxThreads
5. -r- String modelerType
6. -r- boolean running
7. -rw String sSLCARevocationPath
8. -rw boolean sSLEnabled
9. -rw int pollTime
10. -rw String name
11. -rw int pollerSize
12. -rw String sSLCACertificateFile
13. -rw int sSLVerifyDepth
14. -rw int pollerThreadCount
15. -rw int sendfileSize
16. -rw String sSLCertificateFile
17. -r- int currentThreadCount
18. -rw int keepAliveTimeout
19. -r- int keepAliveCount
20. -rw String sSLCARevocationFile
21. -rw boolean tcpNoDelay
22. -rw int threadPriority
23. -rw String sSLVerifyClient
24. -r- int maxSpareThreads
25. -rw boolean useComet
26. -rw int soLinger
27. -rw String sSLCipherSuite
28. -r- boolean paused
29. -rw String sSLCertificateKeyFile
30. -r- int sendfileCount
31. -rw String sSLProtocol
32. -rw String sSLPassword
33. -rw int backlog
34. -rw int acceptorThreadCount
35. -rw int soTimeout
36. -rw int sendfileThreadCount
37. -r- int currentThreadsBusy
38. -rw String sSLCertificateChainFile
39. -rw boolean daemon
40. -rw String sSLCACertificatePath
Operation List:
41. void pause()
42. void destroy()
43. void stop()
44. void resume()
45. void start()
46. void init()
DOMAIN: jboss.web
MBEAN: jboss.web:type=ThreadPool,name=http-myipserver-myport
For my question about kb/mb (memory), you know if different jboss
version have different units of measurement ?
thanks a lot for your support,
Marcolist Marco Avvisano
Hi Andy, seems that there is a problem to load hosts.cfg, i don't know why .. /opt/hobbit/client/bin/xymoncmd /opt/hobbit/client/bin/xymongrep jmxstat 2012-09-18 13:26:03 Using default environment file /opt/hobbit/client/etc/xymonclient.cfg 2012-09-18 13:26:03 Cannot load /opt/hobbit/client/etc/hosts.cfg, or file is empty more /opt/hobbit/client/etc/hosts.cfg 0.0.0.0 myserver-jboss03 # noconn jmxstat 0.0.0.0 myserver-jboss05 # noconn jmxstat 0.0.0.0 myserver-jboss07 # noconn jmxstat ll /opt/hobbit/client/etc/hosts.cfg -rw-rw-r-- 1 hobbit hobbit 121 Sep 17 10:02 /opt/hobbit/client/etc/hosts.cfg M.
▸
Il 17/09/2012 21.29, Andy Smith ha scritto:Hi, What happens if you run this from the command line :- /opt/hobbit/client/bin/xymoncmd /opt/hobbit/client/bin/xymongrep jmxstat
list Henrik Størner
▸
On 18-09-2012 13:37, Marco Avvisano wrote:
Hi Andy, seems that there is a problem to load hosts.cfg, i don't know why .. /opt/hobbit/client/bin/xymoncmd /opt/hobbit/client/bin/xymongrep jmxstat 2012-09-18 13:26:03 Using default environment file /opt/hobbit/client/etc/xymonclient.cfg 2012-09-18 13:26:03 Cannot load /opt/hobbit/client/etc/hosts.cfg, or file is empty more /opt/hobbit/client/etc/hosts.cfg 0.0.0.0 myserver-jboss03 # noconn jmxstat 0.0.0.0 myserver-jboss05 # noconn jmxstat 0.0.0.0 myserver-jboss07 # noconn jmxstat ll /opt/hobbit/client/etc/hosts.cfg -rw-rw-r-- 1 hobbit hobbit 121 Sep 17 10:02 /opt/hobbit/client/etc/hosts.cfg
Directory permissions on /opt, /opt/hobbit, /opt/hobbit/client and /opt/hobbit/client/etc ? Regards, Henrik
list Marco Avvisano
Directory permissions seem are ok .. drwxr-xr-x 12 root root 4096 Aug 29 11:41 opt drwxr-xr-x 6 hobbit hobbit 4096 Sep 18 14:32 hobbit drwxrwxr-x 8 hobbit hobbit 4096 Mar 20 18:28 client drwxr-xr-x 2 hobbit hobbit 4096 Sep 18 14:32 etc M.
▸
Il 18/09/2012 13.39, Henrik Størner ha scritto:On 18-09-2012 13:37, Marco Avvisano wrote:Hi Andy, seems that there is a problem to load hosts.cfg, i don't know why .. /opt/hobbit/client/bin/xymoncmd /opt/hobbit/client/bin/xymongrep jmxstat 2012-09-18 13:26:03 Using default environment file /opt/hobbit/client/etc/xymonclient.cfg 2012-09-18 13:26:03 Cannot load /opt/hobbit/client/etc/hosts.cfg, or file is empty more /opt/hobbit/client/etc/hosts.cfg 0.0.0.0 myserver-jboss03 # noconn jmxstat 0.0.0.0 myserver-jboss05 # noconn jmxstat 0.0.0.0 myserver-jboss07 # noconn jmxstat ll /opt/hobbit/client/etc/hosts.cfg -rw-rw-r-- 1 hobbit hobbit 121 Sep 17 10:02 /opt/hobbit/client/etc/hosts.cfgDirectory permissions on /opt, /opt/hobbit, /opt/hobbit/client and /opt/hobbit/client/etc ? Regards, Henrik
list Marco Avvisano
Hi Andy,
to get attributes from ThreadPool bean, in jboss 5.1.0, i added this
code in your tcl script
jboss.web:type=ThreadPool.* {
foreach {a} $attr {
debug_print "Fetching I attribute $a from mbean $mb"
set e [exec "/opt/jboss-5.1.0.GA/bin/twiddle.sh" -s
$IP_ADDR:$JNDI_PORT get $mb $a ]
set d [lindex [split $e =] 1]
debug_print "data 1 for $a returned was $d - $e"
set line [list $a $d $colour ""]
V add row $line
set i [expr $i + 1]
}
set status [ setstatus $attr $j $mb ]
}
M.
▸
Il 18/09/2012 15.41, Marco Avvisano ha scritto:Directory permissions seem are ok .. drwxr-xr-x 12 root root 4096 Aug 29 11:41 opt drwxr-xr-x 6 hobbit hobbit 4096 Sep 18 14:32 hobbit drwxrwxr-x 8 hobbit hobbit 4096 Mar 20 18:28 client drwxr-xr-x 2 hobbit hobbit 4096 Sep 18 14:32 etc M. Il 18/09/2012 13.39, Henrik Størner ha scritto:On 18-09-2012 13:37, Marco Avvisano wrote:Hi Andy, seems that there is a problem to load hosts.cfg, i don't know why .. /opt/hobbit/client/bin/xymoncmd /opt/hobbit/client/bin/xymongrep jmxstat 2012-09-18 13:26:03 Using default environment file /opt/hobbit/client/etc/xymonclient.cfg 2012-09-18 13:26:03 Cannot load /opt/hobbit/client/etc/hosts.cfg, or file is empty more /opt/hobbit/client/etc/hosts.cfg 0.0.0.0 myserver-jboss03 # noconn jmxstat 0.0.0.0 myserver-jboss05 # noconn jmxstat 0.0.0.0 myserver-jboss07 # noconn jmxstat ll /opt/hobbit/client/etc/hosts.cfg -rw-rw-r-- 1 hobbit hobbit 121 Sep 17 10:02 /opt/hobbit/client/etc/hosts.cfgDirectory permissions on /opt, /opt/hobbit, /opt/hobbit/client and /opt/hobbit/client/etc ? Regards, Henrik