Nagios monitors tomcat with Check_http

Source: Internet
Author: User

1.[[email protected] ~]# vi/usr/local/nagios/etc/objects/commands.cfg

Add New content:

Define command{command_name check_tomcat_8080 command_line $USER 1$/check_http-i $HOSTADDRESS $-P $PORT $-U $URL $-E $N 200$-W $Warning $-C $Cri $}

2.[[email protected] ~]# vi/usr/local/nagios/etc/objects/services.cfg

To add a monitoring service entry:

############################# #tomcat -076 check_tomcat_8080#################################### #define  service{        host_name                tomcat-076         service_description     check_tomcat_8080         check_command           check_nrpe!check_ tomcat_8080        max_check_attempts       5        normal_check_interval   5         retry_check_interval    2         check_period             24x7        notification_interval   10         notification_period     24x7         Notification_options    w,u,c,r        contact_ Groups          yunwei}

3. Check if it is correct

/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg

4. Add monitoring items to the customer service side

[[email protected] tomcat] #vi/usr/local/nagios/etc/nrpe.cfg log_facility=daemonpid_file=/var/run/nrpe.pidserver_ Port=5666nrpe_user=nagiosnrpe_group=nagiosallowed_hosts=127.0.0.1,x.x.x.xdont_blame_nrpe=0debug=0command_ Timeout=60connection_timeout=300command[check_users]=/usr/local/nagios/libexec/check_users-w 5-c 10command[check _load]=/usr/local/nagios/libexec/check_load-w 15,10,5-c 30,25,20command[check_mem]=/usr/local/nagios/libexec/ Check_mem 80command[check_disks]=/usr/local/nagios/libexec/check_disks 80command[check_ipcons]=/usr/local/ Nagios/libexec/check_ipcons 5000command[check_tomcat_8080]=/usr/local/nagios/libexec/check_http-i 192.168.1.77-p 80-u/adcollectt/ok.html-e 200-w 5-c 10

5. Start Nrpe

[Email protected] tomcat]#/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d

6. Restart the Nagios server

Service Nagios Reload

7. See if the success

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/9E/wKiom1gYR_2xaS0qAABRigv-yRo023.png-wh_500x0-wm_3 -wmp_4-s_3269637443.png "title=" Qq20161101154408.png "alt=" Wkiom1gyr_2xas0qaabrigv-yro023.png-wh_50 "/>

This article is from the "Echo Xiayun" blog, so be sure to keep this source http://linuxerxy.blog.51cto.com/10707334/1868121

Nagios monitors tomcat with Check_http

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.