Check_http ZT of nagios plugins

Source: Internet
Author: User

NagiosUnderCheck_httpThe specific ZT parameters are important. Let's take a look ..

// Display version

#./Check_http-V

Check_http v2053 (nagios-plugins 1.4.13)

//-H -U -P

(You cannot directly write a URL using-u. You must use-H when using-u. The URL with-u can be full or relative)

 
 
  1. #./check_http -H www.****.com  
  2.  

Http OK http/1.1 200 OK-106540 bytes in 1.833 seconds | time = 1.833151 s; 0.000000 size = 106540B; 0

 
 
  1. #./check_http -H www.****.com -u /url1/url2/index.html  
  2.  
  3. #./check_http -H www.****.com -u http://www.****.com/url1/url2/index.html  
  4.  
  5. #./check_http -H www.****.com -p 80 -u http://www.****.com/url1/url2/index.html  
  6.  

//-I

 
 
  1. #./check_http -I xxx.xxx.xxx -u /url1/url2/index.html  
  2.  

//-E ; The first line of string returned by the server is expected to match

 
 
  1. # ./check_http -H www.laabaa.com -e "200 OK" 
  2.  

Http OK http/1.1 200 OK-106540 bytes in 1.736 seconds | time = 1.736245 s; 0.000000 size = 106540B; 0

 
 
  1. # ./check_http -H www.laabaa.com -e "200 notOK" 
  2.  

Http critical-Invalid HTTP response received ed from host: HTTP/1.1 200 OK

//-S ; Expected string in the page code

//-M; Last modified time of the page, such as 1 m, 1 h, and 1d (minutes, hours, days );

 
 
  1. # ./check_http -I 192.168.100.107 -u /cehq/zhishu.html -M 1m  
  2.  

Http critical-Last modified 1:11:40 ago

//-M : ; Minimum page size (bytes): maximum page size (bytes)

 
 
  1. # ./check_http -I 192.168.100.107 -u /cehq/zhishu.html -m 100:200  
  2.  

Http warning: page size 3466 too large | size = 3466B; 100; 0; 0

//-W and-c; Define the alarm thresholds of warning and critical (unit: seconds)

 
 
  1. # ./check_http -I 192.168.100.107 -u /cehq/zhishu.html -w 0.0001  
  2.  

Http warning:-HTTP/1.1 200 OK-0.002 second response time | time = 0.001646 s; 0.000100; 0.000000 size = 3466B; 0

 
 
  1. # ./check_http -I 192.168.100.107 -u /cehq/zhishu.html -c 0.0001  
  2.  

Http critical:-HTTP/1.1 200 OK-0.002 second response time | time = 0.001778 s; 0.000100; 0.000000 size = 3466B; 0

//-N; check a page access. In order to get a better response time, do not read the page body, no-body:

 
 
  1. # ./check_http -H www.ce.cn -u /index.shtml -N  
  2.  

Http OK: HTTP/1.1 200 OK-4300 bytes in 0.015 second response time | time = 0.014826 s; 0.000000 size = 4300B; 0

//-A; access the authentication page with the user name and password:

 
 
  1. # ./check_http -I 10.10.10.32 -u /nagios/  
  2.  

Http warning: HTTP/1.1 401 Authorization Required-717 bytes in 0.004 second response time | time = 0.004006 s; 0.000000 size = 717B; 0

 
 
  1. # ./usr/lib/nagios/plugins/check_http -I 192.168.10.2 -u /nagios/ -a nagios:nagios  
  2.  

Http OK: HTTP/1.1 200 OK-911 bytes in 0.005 second response time | time = 0.004724 s; 0.000000 size = 911B; 0

//-T; connection timeout time (default: 10 seconds)

 
 
  1. #./check_http -H laabaa.com  
  2.  

Http OK http/1.1 200 OK-106540 bytes in 1.840 seconds | time = 1.839614 s; 0.000000 size = 106540B; 0

 
 
  1. #./check_http -H laabaa.com -t 1  
  2.  

CRITICAL-Socket timeout after 1 seconds

//-V; verbose, show details for command-line debugging

The preceding commonly used parameters do not include post, header, and other related parameters.

When nagios is applied, we are more concerned about check_http. This function is very useful!

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.