Zabbix Monitoring Client Database Zabbix Client

Source: Internet
Author: User

[[Email protected] Client zabbix]# grep-v "^$" etc/zabbix_agentd.conf|grep-v "^#" logfile=/tmp/zabbix_agentd.logserver= 127.0.0.1,zabbix_server_ipserveractive=zabbix_server_ip:10051# Note The addition port number hostname=113.86.103.100# and Zabbix_ Server side to maintain one to, such as: (A) include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/unsafeuserparameters=1userparameter= Mysql.version,mysql-vuserparameter=mysql.status[*],/usr/local/zabbix/scripts/chk_mysql.sh $1UserParameter= mysql.ping,mysqladmin-uzabbix-pzabbix-p3306-h127.0.0.1 Ping|grep-c Alive

A

#!/bin/sh#set-xmysql_sock= "/tmp/mysql.sock" mysql_pwd=xxxxxargs=1mysqladmin=/alidata/server/mysql/bin/        mysqladmin# Note that commands must be used in the script in the absolute path if [$#-ne "$ARGS"];then echo "please input onearguement:" Ficase $ in Uptime) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock status|cut-f2-d ":" |cut-f1-d "T" ' Echo $resu        lt;; com_update) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_update" |cu        T-d "|"-f3 ' echo $result;;                slow_queries) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock status |cut-f5-d ":" |cut-f1-d "O"    echo $result;; Com_select) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_select" |cut-d    "|"-f3 ' echo $result;; Com_rollback) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_rollback" |cut-d "|"-f3 ' echo $result;;                Questions) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock status|cut-f4-d ":" |cut-f1-d "S" '    echo $result;; Com_insert) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_insert" |cut-d    "|"-f3 ' echo $result;; Com_delete) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_delete" |cut-d    "|"-f3 ' echo $result;; Com_commit) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_commit" |cut-d    "|"-f3 ' echo $result;; bytes_sent) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Bytes_sent" |cut-d    "|"-f3 ' echo $result;; bytes_received) result= ' $MYSQLADMIN-UZABBIX-P${MYSQL_PWD}-S $MYSQL _sock extended-status |grep-w "bytes_received" |cut-d "|"-f3 ' echo    $result;; Com_begin) result= ' $MYSQLADMIN-uzabbix-p${mysql_pwd}-S $MYSQL _sock extended-status |grep-w "Com_begin" |cut-d "|        "-f3 ' echo $result;; *) echo "usage:$0 (uptime| com_update| slow_queries| Com_select| com_rollback| Questions) ";; Esac

[[Email protected] Client scripts]# service Zabbix_agentd restartshutting down zabbix_agentd:                               [  OK  ]starting ZABBIX_AGENTD:                                    [  OK  ]

Zabbix Monitoring Client Database Zabbix Client

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.