Nagios's check_ping plugin learning

Source: Internet
Author: User

(Nagios plugin: nagios-plugins-1.4.12/plugins/check_ping.c)

[Email protected] libexec]#/check_ping--help

Check_ping v1.4.15 (Nagios-plugins 1.4.15)

Copyright (c) 1999 Ethan Galstad <>

Copyright (c) 2000-2007 Nagios Plugin Development Team

<>

Use ping to check connection statistics for a remote host.

Usage:

Check_ping-h

[-P packets] [-t timeout] [ -4|-6]

Options:

-H,--help

Print Detailed Help Screens

-V,--version

Print Version Information

-4,--use-ipv4

Use IPV4 connection

-6,--use-ipv6

Use IPV6 connection

-H,--hostname=host

Host to Ping

-W,--warning=threshold

Warning Threshold pair

-C,--critical=threshold

Critical Threshold pair

-P,--packets=integer

Number of ICMP ECHO packets to send (Default:5)

-L,--link

Show HTML in the plugin output (obsoleted by urlize)

-T,--timeout=integer

Seconds before connection times out (default:10)

THRESHOLD is <rta>,<pl>% where <rta> are the round trip average

Time (MS) which triggers a WARNING or CRITICAL state, and <pl> are the

Percentage of packet loss to trigger a alarm state.

This plugin uses, the ping command to probe, the specified host for packet loss

(percentage) and round trip average (milliseconds). It can produce HTML output

Linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in

The contrib area of the downloads sections at

Send email to If you have questions

Regarding use of this software. To submit patches or suggest improvements,

Send email to

[Email protected] libexec]#

Usage:

Usage:check_ping-h

[-P packets] [-t timeout] [-l] [ -4|-6]

Specific as follows:

-H Host Address

-W WARNING Warning Status: Response time (MS), packet loss rate (%) Valve value

-C CRITICAL Hazardous Status: Response Time (MS), packet loss (%) Valve value

The number of packages sent by-p defaults to 5 packages

-T Timeout time default 10 seconds

-4|-6 using Ipv4|ipv6 address default IPv4

Example:

Copy the code code as follows:

./check_ping-h 8.8.8.8-w 200,20%-C 300,50%-P 3-T 2

-H Target Host

-W delay 200 packet loss 20%

-C delay 300 packet loss 50%

3 Range of delay

1. Delay less than 200

2. Delay within 200-300 range

3. Delay greater than 300

Less then output OK normal

Output WARNING warning in the range

Greater than the output CRITICAL outage

1, OK normal

Copy the code code as follows:

[Email protected] plugins]#/check_ping-h 8.8.8.8-w 200,20%-C 300,50%-P 3-T 2

PING Ok-packet loss = 0, RTA = 96.45 ms|rta=96.449997ms;200.000000;300.000000;0.000000 pl=0%;20;50;0

2. WARNING Warning

Copy the code code as follows:

[Email protected] plugins]#/check_ping-h 8.8.8.8-w 100,20%-C 200,50%-P 3-T 2

PING Warning-packet loss = 0, RTA = 106.00 ms|rta=106.003998ms;100.000000;200.000000;0.000000 pl=0%;20;50;0

3, CRITICAL Downtime

Copy the code code as follows:

[Email protected] plugins]#/check_ping-h 8.8.8.8-w 50,20%-C 100,50%-P 3-T 2

PING Critical-packet loss = 0, RTA = 128.41 ms|rta=128.410995ms;50.000000;100.000000;0.000000 pl=0%;20;50;0


This article is from the "Chen blog" blog, make sure to keep this source http://chenshengang.blog.51cto.com/4399161/1554710

Nagios's check_ping plugin learning

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.