Page 1 of 3

How can I use the check_tomcat script to monitor ?

Posted: Tue Aug 25, 2015 9:06 pm
by wangyu
I download the check_tomcat.sh script from the url
https://exchange.nagios.org/directory/P ... ap/details

Then I put the check_tomcat.sh script into on my nagios server , the path I put is /usr/local/nagios/libexec
then I run the script use this command:
[root@VSLHAGILEAP01 libexec]# ./check_tomcat.sh -j Boot -w 80 -c 90
The error is
[root@VSLHAGILEAP01 libexec]# ./check_tomcat.sh -j Boot -w 80 -c 90
sudo: unknown user: user
sudo: unable to initialize policy plugin
cat: /proc//status: No such file or directory
CRITICAL: process pid[] Tomcat Service Not Running

I install nagios server on 192.168.75.10 , the os is Cent os 6.4
The tomcat I install is on 192.168.75.11, the os is Windows 2003 server
I want to monitor the tomcat on the 192.168.75.11
How could I configure the check_tomcat ?

Whether this script can monitor the tomcat report the error "java.lang.out of memory" ?
If it can monitor ,please tell me the method ,thanks very much!

Re: How can I use the check_tomcat script to monitor ?

Posted: Tue Aug 25, 2015 9:20 pm
by Box293
This script is a bash script and hence it needs to be execute on a linux server.

The script is designed to be run on the server that has tomcat installed, hence running it on your Nagios box is not going to work.

On your windows server, where are you seeing the error "java.lang.out of memory" ?

Re: How can I use the check_tomcat script to monitor ?

Posted: Wed Aug 26, 2015 12:57 am
by wangyu
The Tomcat windows report error:"java.lang.out of memory"
I want to use Nagios monitor the error , Please tell me the method.

Re: How can I use the check_tomcat script to monitor ?

Posted: Wed Aug 26, 2015 2:16 am
by Box293
Perhaps provide a screenshot to show us exactly where the error is occurring.

Re: How can I use the check_tomcat script to monitor ?

Posted: Sun Aug 30, 2015 7:34 pm
by wangyu
The tomcat report error:
java.lang.OutOfMemoryError: Java heap space

Re: How can I use the check_tomcat script to monitor ?

Posted: Sun Aug 30, 2015 9:53 pm
by Box293
A screenshot would really help, it lets us see where you are seeing the message.

Re: How can I use the check_tomcat script to monitor ?

Posted: Wed Sep 02, 2015 12:51 am
by wangyu
The picture show the tomcat out of memory

Re: How can I use the check_tomcat script to monitor ?

Posted: Wed Sep 02, 2015 12:52 am
by wangyu
Which scipt should I use can monitor the out of memory ?

Re: How can I use the check_tomcat script to monitor ?

Posted: Wed Sep 02, 2015 1:56 am
by Box293
You could try using JMX:
https://exchange.nagios.org/directory/P ... mx/details
This guide is for Nagios XI but the concepts are similar:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: How can I use the check_tomcat script to monitor ?

Posted: Sun Sep 06, 2015 12:36 am
by wangyu
Thanks very much to Box293
I'll try.