Page 1 of 1

wasagent

Posted: Tue Oct 28, 2014 12:45 pm
by jkearney
Hello,

I've been trying to get the wasagent plugin working for over a week now but I am having no luck. Has anyone been able to get it functioning with Nagios XI and Websphere 8.5? If so can anyone walk me through the setup since following the documentation has me submitting the check and getting nothing in response.



Linux Distribution and version? CentOS 6.5
32 or 64bit? 64bit
VMware Image or Manual Install of XI? Manual
Are there special configurations on your system, ie; is Gnome installed? yes
Are you using a proxy? Are you using SSL? No and No

Thank you so much for any help anyone can provide.

Re: wasagent

Posted: Tue Oct 28, 2014 4:37 pm
by lmiltchev
I've been trying to get the wasagent plugin working for over a week now but I am having no luck.
What is the error that you are getting? Can you show us an example of the actual check that you are running from the command line, along with the output of it?

Re: wasagent

Posted: Wed Oct 29, 2014 12:34 pm
by jkearney
lmiltchev wrote:
I've been trying to get the wasagent plugin working for over a week now but I am having no luck.
What is the error that you are getting? Can you show us an example of the actual check that you are running from the command line, along with the output of it?
Yes of course, I'm sorry I should have included that to begin with. I was following the guide located here, https://code.google.com/p/wasagent/wiki/Wasagent, so I am running this command,

Code: Select all

./wasagent.sh 'hostname=portaldev&port=10025&jvm=heapUsed,90,95' 
I get no return from the command. It will run for a few seconds and then just return to the command line. I have attached a screenshot as well.

Re: wasagent

Posted: Wed Oct 29, 2014 4:36 pm
by cmerchant
I followed the thread on thehttps://code.google.com/p/wasagent/wiki/Wasagent and somewhere it was mentioning a similar problem from the command line. The user figured it out, he/she was missing wget from the vm.
Comment by [email protected], Dec 28, 2012

I am having an issue I can't figure out. I am able to go to http://SERVER:9091/wasagent/WasAgent?ho ... Used;80;90 and get a result. But, when I try to run it from the command line, I get no data back. I run the command as follows "./wasagent.sh 'hostname=HOSTNAME&port=8880&jvm=heapUsed;90;95'" but it just returns to the next line with no results. Any ideas?
Comment by [email protected], Dec 28, 2012

Ignore my question, I figured it out. wget was not installed on the vm is was testing it on.

Re: wasagent

Posted: Thu Oct 30, 2014 8:03 am
by jkearney
:( No dice unfortunately. It says I have the latest when I tried to install/update it.
cmerchant wrote:I followed the thread on thehttps://code.google.com/p/wasagent/wiki/Wasagent and somewhere it was mentioning a similar problem from the command line. The user figured it out, he/she was missing wget from the vm.
Comment by [email protected], Dec 28, 2012

I am having an issue I can't figure out. I am able to go to http://SERVER:9091/wasagent/WasAgent?ho ... Used;80;90 and get a result. But, when I try to run it from the command line, I get no data back. I run the command as follows "./wasagent.sh 'hostname=HOSTNAME&port=8880&jvm=heapUsed;90;95'" but it just returns to the next line with no results. Any ideas?
Comment by [email protected], Dec 28, 2012

Ignore my question, I figured it out. wget was not installed on the vm is was testing it on.

Re: wasagent

Posted: Thu Oct 30, 2014 12:08 pm
by lmiltchev
Did you modify "run.sh" and "wasagent.sh" files (setting up JAVA_HOME, port, etc.) according to the instructions, listed on the wasagent wiki page here?

What is the output of the following command?

Code: Select all

bash -x /full/path/to/wasagent.sh 'hostname=portaldev&port=10025&jvm=heapUsed,90,95'

Re: wasagent

Posted: Thu Oct 30, 2014 1:32 pm
by jkearney
lmiltchev wrote:Did you modify "run.sh" and "wasagent.sh" files (setting up JAVA_HOME, port, etc.) according to the instructions, listed on the wasagent wiki page here?

What is the output of the following command?

Code: Select all

bash -x /full/path/to/wasagent.sh 'hostname=portaldev&port=10025&jvm=heapUsed,90,95'
I changed the Javahome to JAVA_HOME="/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64" and I left everything else as the default.
For the properties file I fed in a username and password and added the file path where the trust.p12 files exist.

Code: Select all

javax.net.ssl.trustStore=/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/portaldevdmCell01/trust.p12
javax.net.ssl.trustStorePassword=WebAS
javax.net.ssl.trustStoreType=PKCS12
javax.net.ssl.keyStore=/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/portaldevdmCell01/key.p12
javax.net.ssl.keyStorePassword=WebAS
javax.net.ssl.keyStoreType=PKCS12
The result of that command was

Code: Select all

[root@portaldevdm ~]# bash -x /root/Downloads/wasagent-r220/wasagent.sh 'hostname=portaldev&port=10025&jvm=heapUsed,90,95'
+ HOST=127.0.0.1
+ CONNECTOR=9090
++ wget -q -O - http://127.0.0.1:9090/wasagent/WASAgent '--post-data=hostname=portaldev&port=10025&jvm=heapUsed,90,95'
+ DATA=
+ '[' 8 '!=' 0 ']'
+ exit 2

Re: wasagent

Posted: Fri Oct 31, 2014 6:50 am
by lmiltchev
Can you list the contents of the wasagent's lib directory?

Re: wasagent

Posted: Fri Oct 31, 2014 7:49 am
by jkearney
lmiltchev wrote:Can you list the contents of the wasagent's lib directory?
[root@portaldevdm lib]# ls -l
total 73716
-rwxrwxrwx 1 root root 52553076 May 29 2013 com.ibm.ws.admin.client_8.0.0.jar
-rwxrwxrwx 1 root root 13822 May 29 2013 com.ibm.ws.security.crypto.jar
-rwxrwxrwx 1 root root 21743932 May 29 2013 com.ibm.ws.webservices.thinclient_8.0.0.jar
-rwxrwxrwx 1 1000 1000 1041037 Jun 18 2013 jetty-servlet-7.6.2.v20120308.jar
-rwxrwxrwx 1 1000 1000 119303 Jun 18 2013 servlet-api-2.5.jar

Re: wasagent

Posted: Fri Oct 31, 2014 12:09 pm
by cmerchant
Can you issue the wget command outside of the wasagent.sh, on the command line do this:

Code: Select all

wget -q -O - http://127.0.0.1:9090/wasagent/WASAgent '--post-data=hostname=portaldev&port=10025&jvm=heapUsed,90,95'
and could you attach the WAS log, to see whether websphere is actually seeing the request? Thanks.