Use zabbix to monitor latency of international lines

Source: Internet
Author: User

Use zabbix to monitor latency of international lines
In many cases, the lines of various manufacturers in China are unstable, but they can only be tested temporarily. No detailed statistics are provided. Here, zabbix is used to collect statistics under this record.
Trigger can be used for alarm when you are concerned about latency
1. Compile the zabbix monitoring script. The following uses monitoring the Hong Kong server as an example:

  1. #! /Bin/bash
  2. (Time curl-s $1)> & amp;/monitor/hk_logfile.log
  3. If [[$? -Eq 0]; then
  4. Real = 'cat/monitor/hk_logfile.log | grep 'real' | awk '{print $2 }''
  5. MS =$ {real: 2: 5}
  6. Echo $ ms
  7. Fi
Note: $1 is transmitted from the zabbix server, that is, the destination address to be tested.
The script must be placed on the test source server.
Zabbix requires 777 permissions to call scripts and printed log files, or the group is zabbix users.

2. Use UserParameter of zabbix to call the script
UserParameter = script.hk [*],/monitor/monitor_hk.sh $1

$1 is transmitted from the zabbix server, that is, the destination address to be tested.

3. display the latency between lines through zabbix plotting

4. Graphic Display

So far, latency monitoring has been completed, in ms.

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.