How can I use the check_tomcat script to monitor ?
Re: How can I use the check_tomcat script to monitor ?
Accroding to the PDF: Monitoring JMX with Nagios XI
I use this command,Please see picture 27,it's OK now.
I install rrdtool+pnp4nagios on nagios server.
Then the picture 28 , 29 show the photo of the cpu , memory status.
I configure the content of the services.cfg on nagios server is:
#######################################################################
define service{
use local-service,srv-pnp
host_name cmmsgplm.ECMMS.FOXCONN
service_description check-CPULOAD
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups GROUP
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use srv-pnp
host_name cmmsgplm.ECMMS.FOXCONN
service_description check-MEMINFO
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups GROUP
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_nt!MEMUSE!-w 80 -c 90
}
##############################################################################
Now I want to show the JMX status photo on the nagios web interface ,include Heap Memory Usage , Threads, CPU Usage.
How could I configure the services.cfg to finish this goal ?
I use this command,Please see picture 27,it's OK now.
I install rrdtool+pnp4nagios on nagios server.
Then the picture 28 , 29 show the photo of the cpu , memory status.
I configure the content of the services.cfg on nagios server is:
#######################################################################
define service{
use local-service,srv-pnp
host_name cmmsgplm.ECMMS.FOXCONN
service_description check-CPULOAD
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups GROUP
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use srv-pnp
host_name cmmsgplm.ECMMS.FOXCONN
service_description check-MEMINFO
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups GROUP
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_nt!MEMUSE!-w 80 -c 90
}
##############################################################################
Now I want to show the JMX status photo on the nagios web interface ,include Heap Memory Usage , Threads, CPU Usage.
How could I configure the services.cfg to finish this goal ?
- 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 ?
You would need a command:
And a service:
Not tested but this should get you on the right track.
edit note: removed the - sign from -"$ARG1$" in command
Code: Select all
define command {
command_name check_jmx
command_line $USER1$/check_jmx "$ARG1$" "$ARG2$" "$ARG3$" "$ARG4$" "$ARG5$" "$ARG6$" "$ARG7$" "$ARG8$"
}Code: Select all
define service{
use srv-pnp
host_name cmmsgplm.ECMMS.FOXCONN
service_description JMX Memory
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups GROUP
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_jmx!-U service:jmx:rmi:///jndi/rmi://10.202.16.78:8080/jmxrmi!-O java.lang:type=Memory!-A HeapMemoryUsage!-K used! -I HeapMemoryUsage!-J used!-w 4248302272!-c5498760192
}edit note: removed the - sign from -"$ARG1$" in command
Last edited by Box293 on Tue Sep 08, 2015 1:36 am, edited 1 time in total.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: How can I use the check_tomcat script to monitor ?
The picture 42 show the command.cfg
The picture 43 show the services.cfg
The picture 44 show the status of the JMX ,the status of JMX is unknown .
What 's the wrong with the problem ?
How can I solve this problem?
The picture 43 show the services.cfg
The picture 44 show the status of the JMX ,the status of JMX is unknown .
What 's the wrong with the problem ?
How can I solve this problem?
- 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 ?
In your command definition, remove the - sign in front of "$ARG1$"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: How can I use the check_tomcat script to monitor ?
When I remove the - sign in front of "$ARG1$" .
The picture show the error.
The picture show the error.
- Attachments
-
- 48.png (8.81 KiB) Viewed 3248 times
- 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 ?
Your $ARG6$ does not end with a $ sign, it is $ARG6 but should be $ARG6$
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: How can I use the check_tomcat script to monitor ?
Thanks very much ,I'll try.
Re: How can I use the check_tomcat script to monitor ?
Thanks very much for box293,it's OK now.Please see the picture 54.
The JMX Memory show the HeapMemoryUsage of the Tomcat.
But the question when I click the button of .Please see the picture 55.
The picture 56 show the error information.
How can I solve this problem ?
The JMX Memory show the HeapMemoryUsage of the Tomcat.
But the question when I click the button of .Please see the picture 55.
The picture 56 show the error information.
How can I solve this problem ?
Re: How can I use the check_tomcat script to monitor ?
Does that directory exist? If so, what are the permissions?
ls -l /usr/local/pnp4nagios/var/perfdata
ls -l /usr/local/pnp4nagios/var/perfdata
Former Nagios employee
Re: How can I use the check_tomcat script to monitor ?
The picture 13 show the result of execute "ls -l "
It show there is not the host "swhdtplmap01.efoxconn.com" name in /usr/local/pnp4nagios/var/perfdata
So what should I do can solve this problem ?
It show there is not the host "swhdtplmap01.efoxconn.com" name in /usr/local/pnp4nagios/var/perfdata
So what should I do can solve this problem ?