Cacti - Template For VMSTAT
来源:互联网 发布:2017苹果mac桌面壁纸 编辑:程序博客网 时间:2024/06/05 02:16
Client
# vmstat 1 2, 一秒间隔,取两次,因为发现第一次不准确command[cacti_vmstat]=/usr/bin/vmstat 1 2
Server Data Input Method
/bin/bash <path_cacti>/scripts/bigbig_vmstat_cpu.sh <server_addr>
#!/bin/bash# bigbig_vmstat_cpu.shhostname=$1result=`/usr/local/nagios/libexec/check_nrpe -H $hostname -c cacti_vmstat | tail -n 1`# procrunning=`echo $result | awk '{print $1}'`busy=`echo $result | awk '{print $2}'`#echo -n "running:$running busy:$busy "# memoryswapd=`echo $result | awk '{print $3}'` && ((swapd=$swapd*1024))free=`echo $result | awk '{print $4}'` && ((free=$free*1024))buff=`echo $result | awk '{print $5}'` && ((buff=$buff*1024))cache=`echo $result | awk '{print $6}'` && ((cache=$cache*1024))#echo -n "swapd:$swapd free:$free buff:$buff cache:$cache "# swapsi=`echo $result | awk '{print $7}'` && ((si=$si*1024))so=`echo $result | awk '{print $8}'` && ((so=$so*1024))#echo -n "si:$si so:$so "# iobi=`echo $result | awk '{print $9}'`bo=`echo $result | awk '{print $10}'`#echo -n "bi:$bi bo:$bo "# systemin=`echo $result | awk '{print $11}'`cs=`echo $result | awk '{print $12}'`#echo -n "in:$in cs:$cs "# cpuus=`echo $result | awk '{print $13}'`sy=`echo $result | awk '{print $14}'`id=`echo $result | awk '{print $15}'`wa=`echo $result | awk '{print $16}'`st=`echo $result | awk '{print $17}'`echo -n "sdfsdf:123 user:$us system:$sy idle:$id wait:$wa stealt:$st sdf sdf sdf sdf "
Server - Template Import
http://pan.baidu.com/s/1dD34F1B
Use Script Add The Graph
#!/bin/baship=$1# 判断是否存在,如果存在就退出hostfind=`php add_graphs.php --list-hosts | grep $ip$ | wc -l`[ $hostfind -eq 1 ] && ( echo "host $ip 已经存在 ";exit 0 )# 添加hostsphp add_device.php --description=$ip --ip=$ip --template=9hostid=`php add_graphs.php --list-hosts | grep $ip$ | awk '{print $1}'`echo $hostid#exit 0#[[ $hostid -gt 70 ]] || exit 0# 开始画vmstatphp add_graphs.php --graph-type=cg --graph-template-id=64 --host-id=$hostid --input-fields="server_addr=$ip"php add_graphs.php --graph-type=cg --graph-template-id=73 --host-id=$hostid --input-fields="server_addr=$ip"php add_graphs.php --graph-type=cg --graph-template-id=74 --host-id=$hostid --input-fields="server_addr=$ip"php add_graphs.php --graph-type=cg --graph-template-id=75 --host-id=$hostid --input-fields="server_addr=$ip"
0 0
- Cacti - Template For VMSTAT
- MySQL监控模板说明-Percona MySQL Monitoring Template for Cacti
- MySQL监控模板说明-Percona MySQL Monitoring Template for Cacti
- Cacti for Windows
- 使用cacti自定义graph template进行监控
- postfix_ mailserver 监控 for Cacti
- Cacti的安装 FOR LINUX
- 傻瓜安装 Cacti for Windows
- Beautiful template (for pages)
- CodeSmith for MySQL template
- vmstat
- VMSTAT
- VMSTAT
- vmstat
- vmstat
- vmstat
- vmstat
- vmstat
- map函数
- jQuery事件冒泡样例
- 【Android异常】The specified child already has a parent. You must call removeView() on the child's paren
- 黑马程序员——多线程——多线程与单例设计模式
- 0-1背包打印路径(递归和非递归版本)
- Cacti - Template For VMSTAT
- 博客搬到博客园了,下面是网址
- 基于bosh-lite部署CloudFoundry-V3-diego的运行时
- CF 574E(Bear and Drawing-2*n点阵画树)
- div里放图片,有的浏览器底部会多出5px
- Aircrack-ng之Aireplay-ng命令
- Linux之sed的用法
- 计算机网络面试整理【转】
- 【原题】求两个不相交的连续子数组的最大和