How can I use the check_tomcat script to monitor ?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

How can I use the check_tomcat script to monitor ?

Post 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!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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" ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

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

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post by Box293 »

Perhaps provide a screenshot to show us exactly where the error is occurring.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

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

Post by wangyu »

The tomcat report error:
java.lang.OutOfMemoryError: Java heap space
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post by Box293 »

A screenshot would really help, it lets us see where you are seeing the message.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

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

Post by wangyu »

The picture show the tomcat out of memory
Attachments
Tomcat  Out of Memory.png
Tomcat Out of Memory.png (8.44 KiB) Viewed 3841 times
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

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

Post by wangyu »

Which scipt should I use can monitor the out of memory ?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

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

Post by wangyu »

Thanks very much to Box293
I'll try.
Locked