How to add apache-tomcat Monitor Service in Nagios XI?
-
sathiyaraj
- Posts: 17
- Joined: Tue Feb 12, 2013 8:03 am
- Location: Bangalore, INDIA
How to add apache-tomcat Monitor Service in Nagios XI?
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....
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?
You need to first place it in your plugins directory then change to that directory and make it executable:
Then, run it with the -h "help" flag:
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
Code: Select all
chmod +x check_tomcat.plCode: Select all
./check_tomcat.pl -hhttp://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?
I am getting below error..But i have place check_tomcat.pl and correct permission also.
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?
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?
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%
}
/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?
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?
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.
"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?
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.
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?
abrist:
i added .pl.thanks.
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?
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
http://assets.nagios.com/downloads/nagi ... gement.pdf