Page 1 of 1

tomcat monitor

Posted: Thu Sep 03, 2015 8:23 am
by berhan30
How to monitor apache tomcat for nagios in ubuntu:
-I download and put check_tomcat.pl in libexec
- I put the command in the file commands.cfg:

define command{
command_name check_tomcat
command_line /usr/local/nagios/libexec/check_tomcat.pl
}

- I put the command in the file servers.cfg:

define service{
use local-service ; Name of service template to use
host_name dspace
service_description Tomcat
check_command check_tomcat
notifications_enabled 1
}

warrning: Return code of 13 is out of bounds

note: the port of tomcat is 80

Re: tomcat monitor

Posted: Thu Sep 03, 2015 9:21 am
by hsmith
berhan30 wrote:How to monitor apache tomcat for nagios in ubuntu:
-I download and put check_tomcat.pl in libexec
- I put the command in the file commands.cfg:

define command{
command_name check_tomcat
command_line /usr/local/nagios/libexec/check_tomcat.pl
}

- I put the command in the file servers.cfg:

define service{
use local-service ; Name of service template to use
host_name dspace
service_description Tomcat
check_command check_tomcat
notifications_enabled 1
}

warrning: Return code of 13 is out of bounds

note: the port of tomcat is 80
What happens when you use the /usr/local/nagios/libexec/check_tomcat.pl plugin from the command line? That is usually the best place to start troubleshooting the issue.

Re: tomcat monitor

Posted: Tue Sep 08, 2015 9:28 am
by berhan30
How to monitor apache tomcat for nagios in ubuntu:
warring CRITICAL: http://localhost:80/manager/status?XML=true HTTP/1.1 404 Not Found
note: the port of tomcat is 80

define service{
use local-service ; Inherit default values from a temp$
host_name dspace
service_description Tomcat
check_command check_tomcat!80!admin!admin!10%,50%!5%,10%
}

define command{
command_name check_tomcat
command_line /usr/local/nagios/libexec/check_tomcat
}

Please detail
Thank you

Re: tomcat monitor

Posted: Tue Sep 08, 2015 11:47 am
by tmcdonald
It looks like you are trying to run this against localhost. What is the IP address of the dspace host?

Re: tomcat monitor

Posted: Wed Sep 09, 2015 2:43 am
by berhan30
IP address of the dspace host is 172.16.1.2

Re: tomcat monitor

Posted: Wed Sep 09, 2015 4:11 pm
by hsmith
berhan30 wrote:IP address of the dspace host is 172.16.1.2
And what happens when you run the command against that host from the command line. We should focus on getting the results you want in the command line before we worry about services.