Page 1 of 1

How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Mon Jul 01, 2013 1:06 am
by sathiyaraj
Hi All..

i downloaded check_tomcat.pl from nagios plugin site. How can i use this file? i want to monitor remote server?

Note: I enabled mysql Monitor,check disk,user user,check SSH,check ping,check total process,etc...

Thanks in Advance....

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Mon Jul 01, 2013 10:35 am
by slansing
You need to first place it in your plugins directory then change to that directory and make it executable:

Code: Select all

chmod +x check_tomcat.pl
Then, run it with the -h "help" flag:

Code: Select all

./check_tomcat.pl -h
This will allow you to see it's usage, from here, you can choose how/what you would like to define, then run that command from the command line as you would any other plugin. If you are satisfied with the results, create a command and service definition:

http://nagios.sourceforge.net/docs/3_0/ ... ml#command

http://nagios.sourceforge.net/docs/3_0/ ... ml#service

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Wed Jul 10, 2013 7:49 am
by sathiyaraj
I am getting below error..But i have place check_tomcat.pl and correct permission also.
tomcat.jpg

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Wed Jul 10, 2013 9:10 am
by slansing
In what directory did you place this plugin? And did you make sure to make it executable?:

Code: Select all

chmod +x "filedirectory/path/filename"

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Thu Jul 11, 2013 2:57 am
by sathiyaraj
I copied into this directory and user, group permission set as nagios:nagios.

/usr/local/nagios/libexec/check_tomcat.pl

i have to do any edit in this file ( check_tomcat.pl)

Already command.cfg and localhost.cfg added like this.

#vi /usr/local/nagios/etc/Command.cfg

define command{
command_name check_tomcat
command_line $USER1$/check_tomcat -H $HOSTADDRESS$ -p $ARG1$ -l $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
}

#vi //usr/local/nagios/etc/hosts/localhost.cfg

define service{
use local-service
host_name localhost
service_description Tomcat
check_command check_tomcat!8080!tomcat!tomcat!25%,25%!10%,10%
}

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Thu Jul 11, 2013 10:28 am
by slansing
If you are trying to monitor a remote server with this plugin do not add it to your localhost host, you must create a new host dedicated to that remote server's address, then create a service and assign this command to that service. You are making sure to do this all in the CCM and not in the local config files on the XI server right?

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Thu Jul 11, 2013 10:29 am
by abrist
You are missing the extension (.pl) on your command definition:

Code: Select all

define command{
command_name check_tomcat
command_line $USER1$/check_tomcat.pl -H $HOSTADDRESS$ -p $ARG1$ -l $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
}

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Fri Jul 12, 2013 12:56 am
by sathiyaraj
slansing :

I added Commands in CCM For tomcat.Next i have to ass Service and host templates ..? if yes can u explain in details. Lot of options inside.

if any screen sort that helpful.

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Fri Jul 12, 2013 12:58 am
by sathiyaraj
abrist:

i added .pl.thanks.

Re: How to add apache-tomcat Monitor Service in Nagios XI?

Posted: Fri Jul 12, 2013 9:32 am
by slansing
Once you write the command, you need to create a new host, then add this new command to a service under that host:

http://assets.nagios.com/downloads/nagi ... gement.pdf