Watch 2 Star 2 Fork 1

Whoisxiang / zabbixShell

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
zabbix template spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

zabbix

The template of apache.memcached.redis.squid and varnish what the zabbix haved

通过zabbix的自定义脚本监控web的中间件服务,强大的zabbix,只要脚本能写出来,就能做到监控!

上面提到的监控,仓库内都是有脚本和模板的.例子:监控squid

[root@monitor_test /]# cat check_squid_status.sh

#!/bin/bash

five_min(){ squidclient -h localhost -p 3128 mgr:info |grep 'Request Hit Ratios:' |awk '{print$5/100}' #5分钟的命中率 }

six_min(){ squidclient -h localhost -p 3128 mgr:info |grep 'Request Hit Ratios:' |awk '{print$7/100}' #60分钟内的命中率 }

objects(){ squidclient -h localhost -p 3128 mgr:info |grep 'on-disk objects' |awk '{print$1}' #缓存的数量 }

space(){ cat /var/log/squid.txt |grep 'Filesystem Space in use:' |awk -F '/' '{print$1}'|awk '{s+=$5};END{printf "%4.2f\n",s/1024/1024}'#缓存的大小,已经换算成G. }

$1

Comments ( 1 )

Sign in for post a comment

Shell
1
https://gitee.com/xiang1/zabbix.git
git@gitee.com:xiang1/zabbix.git
xiang1
zabbix
zabbix
master

Search