Page 1 of 3

WebSphere plugin

Posted: Fri May 12, 2017 10:16 am
by hsauerbach
I am trying to get the Nagios plugin for WAS monitoring running on a Linux client with no luck. I am running 1.7, jreand WebSphere 8.5.0 and complied the was agent.jar. Did Step by Step following the documentation at https://github.com/yannlambret/webspher ... s#features with no luck. Any help would be very appreciated.

Re: WebSphere plugin

Posted: Fri May 12, 2017 11:09 am
by mcapra
No one here designed that plugin, so the assistance we can offer may be limited.

Can you share the sorts of errors/outputs you are encountering at each stage of the steps mentioned in the github's readme? We don't really have much to work with in terms of troubleshooting currently.

I tend to direct people towards enabling JMX on their applications. You'd have to consult with your application team to accomplish that, though.

Re: WebSphere plugin

Posted: Fri May 12, 2017 12:07 pm
by hsauerbach
For each JVM being monitored, were enabled in the WebSphere console.

everything configured fine including compiling the "build.xml" using ant and 1.7 jre to produce was agent.jar.

When I ran run.sh I got the following:

[/usr/local/wasagent]# ./run.sh
++ dirname ./run.sh
+ cd .
+ JAVA_HOME=/opt/WebSphere85/AppServer/java_1.7_64/
+ JAVA_OPTS='-Dwasagent.host=127.0.0.1 -Dwasagent.port=9090 -Dwasagent.configuration=wasagent.properties'
+ CLASSPATH=.:wasagent.jar
++ find lib -name '*.jar'
+ for jar in '$(find "lib" -name '\''*.jar'\'')'
+ CLASSPATH=.:wasagent.jar:lib/jetty-servlet-7.6.2.v20120308.jar
+ for jar in '$(find "lib" -name '\''*.jar'\'')'
+ CLASSPATH=.:wasagent.jar:lib/jetty-servlet-7.6.2.v20120308.jar:lib/com.ibm.ws.security.crypto.jar
+ for jar in '$(find "lib" -name '\''*.jar'\'')'
+ CLASSPATH=.:wasagent.jar:lib/jetty-servlet-7.6.2.v20120308.jar:lib/com.ibm.ws.security.crypto.jar:lib/com.ibm.ws.admin.client_8.5.0.jar
+ for jar in '$(find "lib" -name '\''*.jar'\'')'
+ CLASSPATH=.:wasagent.jar:lib/jetty-servlet-7.6.2.v20120308.jar:lib/com.ibm.ws.security.crypto.jar:lib/com.ibm.ws.admin.client_8.5.0.jar:lib/com.ibm.ws.webservices.thinclient_8.5.0.jar
+ for jar in '$(find "lib" -name '\''*.jar'\'')'
+ CLASSPATH=.:wasagent.jar:lib/jetty-servlet-7.6.2.v20120308.jar:lib/com.ibm.ws.security.crypto.jar:lib/com.ibm.ws.admin.client_8.5.0.jar:lib/com.ibm.ws.webservices.thinclient_8.5.0.jar:lib/servlet-api-2.5.jar
+ /opt/WebSphere85/AppServer/java_1.7_64//bin/java -Xmx16m -cp .:wasagent.jar:lib/jetty-servlet-7.6.2.v20120308.jar:lib/com.ibm.ws.security.crypto.jar:lib/com.ibm.ws.admin.client_8.5.0.jar:lib/com.ibm.ws.webservices.thinclient_8.5.0.jar:lib/servlet-api-2.5.jar -Dwasagent.host=127.0.0.1 -Dwasagent.port=9090 -Dwasagent.configuration=wasagent.properties net.wait4it.nagios.wasagent.core.WASAgent



When I executed the was agent.sh script with debugging turned on I got the following:
[/usr/local/wasagent]# ./wasagent.sh 'hostname=ssc-prd-dmav1-016.ba.ssa.gov&port=8882&jvm=heapUsed,90,95'
+ HOST=127.0.0.1
+ CONNECTOR=9090
++ wget -O - http://127.0.0.1:9090/wasagent/WASAgent '--post-data=hostname=XXX&port=8882&jvm=heapUsed,90,95'
+ DATA=
+ '[' 8 '!=' 0 ']'
+ exit 2

I received no data. I also know the JVM's are enabled because we run Introscope on the server. All the work was done on the Nagios Client.

Any and all help would be VERY appreciated. I need to prove this work for us to make a large purchase.

Re: WebSphere plugin

Posted: Fri May 12, 2017 1:01 pm
by dwhitfield
We can't guarantee we can get a plugin to work that we didn't create. However, we can certainly give it a shot. Have you signed up for a quickstart yet? https://www.nagios.com/services/quickstart/nagios-xi/

Also, have you tried any of the other websphere plugins at https://exchange.nagios.org/directory/P ... /Websphere ?

Re: WebSphere plugin

Posted: Fri May 12, 2017 1:19 pm
by hsauerbach
We already had a quickstart hour presentation and sorry to say it did not work out to well.

From the list of WebSphere plugins Wasagent is the one we are trying to make work and the only other one that might be OK is WebSphere Application Server -- WebSite https://code.google.com/archive/p/nagios-was/ which we have not tried.

MQ is a product under WebSphere which we don't use anymore so all their plugins don't help us.

Thanks for all your help. It is really important to get something working.

Re: WebSphere plugin

Posted: Fri May 12, 2017 2:00 pm
by mcapra
Back to this point:
mcapra wrote:I tend to direct people towards enabling JMX on their applications. You'd have to consult with your application team to accomplish that, though.
I actually did this for a WebLogic server recently. I'm not sure what sort of applications your WebSphere is hosting, but all I had to do for WebLogic was modify my application's start script to include the following system properties related to JMX:

Code: Select all

-Dcom.sun.management.jmxremote 
-Djava.rmi.server.hostname=192.168.67.95 
-Dcom.sun.management.jmxremote.port=9010 
-Dcom.sun.management.jmxremote.local.only=false 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false
You could likely do the same wherever your applications are currently being started. I'm not a WebSphere guy though; Most of my Java development is OSS and won't pay for a license ;)

With that, I was able to use the check_jmx plugin quite handily to get some of the more basic MBeans without issue:

Code: Select all

[root@xi-stable ~]# /usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.67.95:9010/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 4248302272 -c 5498760192
JMX OK HeapMemoryUsage.used=236421728{committed=365953024;init=268435456;max=477626368;used=236421728}
Straight JMX really is the way to go with any sort of Java application monitoring, in my opinion. A lot of the various agents tend to get left alone for several years and become ineffectual with how often Oracle likes to change things. JMX on it's own is pretty bare-bones. We also have some documentation for JMX monitoring specifically whereas we do not have documentation specific to JBoss, Tomcat, WebLogic et al.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

If you only want to accept JMX connections made locally for security reasons, just run check_jmx through an agent like NRPE or NCPA.

Re: WebSphere plugin

Posted: Fri May 12, 2017 2:19 pm
by hsauerbach
This might be the answer let me check it out and I will let you know.

Thanks

Re: WebSphere plugin

Posted: Sun May 14, 2017 12:38 pm
by dwhitfield
hsauerbach wrote:I will let you know.
Please do!

Also, if you want to stick with that original plugin, you might try posting an issue on their github page: https://github.com/yannlambret/websphere-nagios/issues

Re: WebSphere plugin

Posted: Mon May 15, 2017 8:38 am
by hsauerbach
I will post my issue on https://github.com/yannlambret/websphere-nagios/issues before I continue to investigate the other java approach.

Thanks

Re: WebSphere plugin

Posted: Mon May 15, 2017 9:31 am
by dwhitfield
I just saw this on the other issue on that github:
Sorry for the late answer. I haven't be using WebSphere for a long time now, and I'm not able to test or validate anything myself. Feel free to open a pull request and I'll be glad to merge your fix.
That's not to say the author can't help on your issue, but it does not look like a plugin that is going to get long-term support from the author.

Please let us know if you need further assistance.