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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sathiyaraj
Posts: 17
Joined: Tue Feb 12, 2013 8:03 am
Location: Bangalore, INDIA

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

Post 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....
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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
sathiyaraj
Posts: 17
Joined: Tue Feb 12, 2013 8:03 am
Location: Bangalore, INDIA

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

Post by sathiyaraj »

I am getting below error..But i have place check_tomcat.pl and correct permission also.
tomcat.jpg
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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"
sathiyaraj
Posts: 17
Joined: Tue Feb 12, 2013 8:03 am
Location: Bangalore, INDIA

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

Post 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%
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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$
}
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sathiyaraj
Posts: 17
Joined: Tue Feb 12, 2013 8:03 am
Location: Bangalore, INDIA

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

Post 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.
Last edited by sathiyaraj on Fri Jul 12, 2013 12:59 am, edited 1 time in total.
sathiyaraj
Posts: 17
Joined: Tue Feb 12, 2013 8:03 am
Location: Bangalore, INDIA

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

Post by sathiyaraj »

abrist:

i added .pl.thanks.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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
Locked