zabbix監控linux磁碟io的模板

czxin788發表於2015-11-29
zabbix監控linux磁碟io的模板

最近,我發現zabbix沒有監控linux的磁碟io,於是藉助百度,我做了一個zabbix模板,用來監控磁碟io。
1、新增自動尋找磁碟指令碼:
cat /home/monitor/disk_scan.sh
######################################
#!/bin/bash
#written by lenwood
#mail:ccyhaoran@live.cn
 diskarray=(`cat /proc/diskstats |grep -E "\bsd[abcdefg]\b|\bxvd[abcdefg]\b"|grep -i "\b$1\b"|awk '{print $3}'|sort|uniq   2>/dev/null`)
length=${#diskarray[@]}
printf "{\n"
 printf  '\t'"\"data\":["
for ((i=0;i<$length;i++))
do
         printf '\n\t\t{'
        printf "\"{#DISK_NAME}\":\"${diskarray[$i]}\"}"
        if [ $i -lt $[$length-1] ];then
                 printf ','
        fi
done
 printf  "\n\t]\n"
printf "}\n"
 
 
###########################
 
註釋:grep -E 裡面的\b表示匹配空字串的意思。
The Backslash Character and Special Expressions
       The symbols \< and \>  respectively  match  the  empty  string  at  the
       beginning and end of a word.  The symbol \b matches the empty string at
       the edge of a word, and \B matches the empty string provided  it’s  not
       at  the edge of a word.  The symbol \w is a synonym for [[:alnum:]] and
       \W is a synonym for [^[:alnum:]].
 
 
 
2、後臺執行iostat命令
 
nohup iostat -m -x -d 30 > /home/script/log/iostat_output  &
 
-c 僅顯示CPU統計資訊.與-d選項互斥.
-d 僅顯示磁碟統計資訊.與-c選項互斥.
-k 以K為單位顯示每秒的磁碟請求數,預設單位塊.
-p device | ALL
  與-x選項互斥,用於顯示塊裝置及系統分割槽的統計資訊.也可以在-p後指定一個裝置名,如:
  # iostat -p hda
  或顯示所有裝置
  # iostat -p ALL
 -t    在輸出資料時,列印蒐集資料的時間.
 -V    列印版本號和幫助資訊.
 -x    輸出擴充套件資訊.
-m 以兆為單位
 
3、為了下次開啟也生效,把上述的nohup iostat命令加入/etc/rc.local裡面
4、在zabbix_agentd.conf中加入如下UserParameters:
 
############################
#透過iostat  -m -x -d 30 獲得的磁碟io資訊
UserParameter=io.scandisk[*],/home/script/disk_scan.sh $1
UserParameter=io.rps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b"|tail -1|awk '{print $$4}'
UserParameter=io.wps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$5}'
UserParameter=io.rMBps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$6}'
UserParameter=io.wMBps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$7}'
UserParameter=io.avgrq-sz[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$8}'
UserParameter=io.avgqu-sz[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$9}'
UserParameter=io.await[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$10}'
UserParameter=io.svctm[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$11}'
UserParameter=io.util[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$12}'
#透過cat /proc/diskstats獲得的磁碟io資訊
UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'                   
UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'                    
UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$8}'                  
UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$11}'                 
UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$12}'           
UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$13}'                      
UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$6}'            
UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$10}'         
 
##################
 
5、重啟zabbix agent
/etc/init.d/zabbix_agentd restart
6、確認zabbix agent是否啟動
[ ps -elf |grep zabbix
7、匯入我弄的模板:linux磁碟io模板-czxin
8、關聯你要監控的主機
 
 
 
 
####################
參考資料:
http://blog.chinaunix.net/uid-26446098-id-4964263.html
 
 
 
 
 附件列表

zabbix監控磁碟io的模板
zbx_export_templates.xml

點選(此處)摺疊或開啟

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <zabbix_export>
  3.     <version>2.0</version>
  4.     <date>2015-11-28T15:38:34Z</date>
  5.     <groups>
  6.         <group>
  7.             <name>378-軟體構型管理系統V1.0</name>
  8.         </group>
  9.     </groups>
  10.     <templates>
  11.         <template>
  12.             <template>disk_io_template</template>
  13.             <name>linux磁碟io模板-czxin</name>
  14.             <description/>
  15.             <groups>
  16.                 <group>
  17.                     <name>378-軟體構型管理系統V1.0</name>
  18.                 </group>
  19.             </groups>
  20.             <applications>
  21.                 <application>
  22.                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  23.                 </application>
  24.                 <application>
  25.                     <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  26.                 </application>
  27.             </applications>
  28.             <items>
  29.                 <item>
  30.                     <name>Disk:$1:Read:Bytes/sec(每秒讀磁碟的位元組數))</name>
  31.                     <type>0</type>
  32.                     <snmp_community/>
  33.                     <multiplier>1</multiplier>
  34.                     <snmp_oid/>
  35.                     <key>custom.vfs.dev.read.sectors[sda]</key>
  36.                     <delay>30</delay>
  37.                     <history>90</history>
  38.                     <trends>365</trends>
  39.                     <status>0</status>
  40.                     <value_type>3</value_type>
  41.                     <allowed_hosts/>
  42.                     <units>B/sec</units>
  43.                     <delta>1</delta>
  44.                     <snmpv3_contextname/>
  45.                     <snmpv3_securityname/>
  46.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  47.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  48.                     <snmpv3_authpassphrase/>
  49.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  50.                     <snmpv3_privpassphrase/>
  51.                     <formula>512</formula>
  52.                     <delay_flex/>
  53.                     <params/>
  54.                     <ipmi_sensor/>
  55.                     <data_type>0</data_type>
  56.                     <authtype>0</authtype>
  57.                     <username/>
  58.                     <password/>
  59.                     <publickey/>
  60.                     <privatekey/>
  61.                     <port/>
  62.                     <description/>
  63.                     <inventory_link>0</inventory_link>
  64.                     <applications>
  65.                         <application>
  66.                             <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  67.                         </application>
  68.                     </applications>
  69.                     <valuemap/>
  70.                     <logtimefmt/>
  71.                 </item>
  72.                 <item>
  73.                     <name>Disk:$1:Read:ms(每次讀磁碟花費的毫秒數)</name>
  74.                     <type>0</type>
  75.                     <snmp_community/>
  76.                     <multiplier>0</multiplier>
  77.                     <snmp_oid/>
  78.                     <key>custom.vfs.dev.read.ms[sda]</key>
  79.                     <delay>30</delay>
  80.                     <history>90</history>
  81.                     <trends>365</trends>
  82.                     <status>0</status>
  83.                     <value_type>0</value_type>
  84.                     <allowed_hosts/>
  85.                     <units>ms</units>
  86.                     <delta>1</delta>
  87.                     <snmpv3_contextname/>
  88.                     <snmpv3_securityname/>
  89.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  90.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  91.                     <snmpv3_authpassphrase/>
  92.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  93.                     <snmpv3_privpassphrase/>
  94.                     <formula>1</formula>
  95.                     <delay_flex/>
  96.                     <params/>
  97.                     <ipmi_sensor/>
  98.                     <data_type>0</data_type>
  99.                     <authtype>0</authtype>
  100.                     <username/>
  101.                     <password/>
  102.                     <publickey/>
  103.                     <privatekey/>
  104.                     <port/>
  105.                     <description/>
  106.                     <inventory_link>0</inventory_link>
  107.                     <applications>
  108.                         <application>
  109.                             <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  110.                         </application>
  111.                     </applications>
  112.                     <valuemap/>
  113.                     <logtimefmt/>
  114.                 </item>
  115.                 <item>
  116.                     <name>Disk:$1:Read:ops per second(每秒磁碟讀的次數)</name>
  117.                     <type>0</type>
  118.                     <snmp_community/>
  119.                     <multiplier>1</multiplier>
  120.                     <snmp_oid/>
  121.                     <key>custom.vfs.dev.read.ops[sda]</key>
  122.                     <delay>30</delay>
  123.                     <history>90</history>
  124.                     <trends>365</trends>
  125.                     <status>0</status>
  126.                     <value_type>0</value_type>
  127.                     <allowed_hosts/>
  128.                     <units>ops/second</units>
  129.                     <delta>1</delta>
  130.                     <snmpv3_contextname/>
  131.                     <snmpv3_securityname/>
  132.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  133.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  134.                     <snmpv3_authpassphrase/>
  135.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  136.                     <snmpv3_privpassphrase/>
  137.                     <formula>512</formula>
  138.                     <delay_flex/>
  139.                     <params/>
  140.                     <ipmi_sensor/>
  141.                     <data_type>0</data_type>
  142.                     <authtype>0</authtype>
  143.                     <username/>
  144.                     <password/>
  145.                     <publickey/>
  146.                     <privatekey/>
  147.                     <port/>
  148.                     <description/>
  149.                     <inventory_link>0</inventory_link>
  150.                     <applications>
  151.                         <application>
  152.                             <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  153.                         </application>
  154.                     </applications>
  155.                     <valuemap/>
  156.                     <logtimefmt/>
  157.                 </item>
  158.                 <item>
  159.                     <name>Disk:$1:Write:Bytes/sec(每秒磁碟寫的位元組數)</name>
  160.                     <type>0</type>
  161.                     <snmp_community/>
  162.                     <multiplier>1</multiplier>
  163.                     <snmp_oid/>
  164.                     <key>custom.vfs.dev.write.sectors[sda]</key>
  165.                     <delay>30</delay>
  166.                     <history>90</history>
  167.                     <trends>365</trends>
  168.                     <status>0</status>
  169.                     <value_type>3</value_type>
  170.                     <allowed_hosts/>
  171.                     <units>B/sec</units>
  172.                     <delta>1</delta>
  173.                     <snmpv3_contextname/>
  174.                     <snmpv3_securityname/>
  175.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  176.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  177.                     <snmpv3_authpassphrase/>
  178.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  179.                     <snmpv3_privpassphrase/>
  180.                     <formula>512</formula>
  181.                     <delay_flex/>
  182.                     <params/>
  183.                     <ipmi_sensor/>
  184.                     <data_type>0</data_type>
  185.                     <authtype>0</authtype>
  186.                     <username/>
  187.                     <password/>
  188.                     <publickey/>
  189.                     <privatekey/>
  190.                     <port/>
  191.                     <description/>
  192.                     <inventory_link>0</inventory_link>
  193.                     <applications>
  194.                         <application>
  195.                             <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  196.                         </application>
  197.                     </applications>
  198.                     <valuemap/>
  199.                     <logtimefmt/>
  200.                 </item>
  201.                 <item>
  202.                     <name>Disk:$1:Write:ms(每次寫磁碟花費的毫秒數)</name>
  203.                     <type>0</type>
  204.                     <snmp_community/>
  205.                     <multiplier>0</multiplier>
  206.                     <snmp_oid/>
  207.                     <key>custom.vfs.dev.write.ms[sda]</key>
  208.                     <delay>30</delay>
  209.                     <history>90</history>
  210.                     <trends>365</trends>
  211.                     <status>0</status>
  212.                     <value_type>3</value_type>
  213.                     <allowed_hosts/>
  214.                     <units>ms</units>
  215.                     <delta>1</delta>
  216.                     <snmpv3_contextname/>
  217.                     <snmpv3_securityname/>
  218.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  219.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  220.                     <snmpv3_authpassphrase/>
  221.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  222.                     <snmpv3_privpassphrase/>
  223.                     <formula>1</formula>
  224.                     <delay_flex/>
  225.                     <params/>
  226.                     <ipmi_sensor/>
  227.                     <data_type>0</data_type>
  228.                     <authtype>0</authtype>
  229.                     <username/>
  230.                     <password/>
  231.                     <publickey/>
  232.                     <privatekey/>
  233.                     <port/>
  234.                     <description/>
  235.                     <inventory_link>0</inventory_link>
  236.                     <applications>
  237.                         <application>
  238.                             <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  239.                         </application>
  240.                     </applications>
  241.                     <valuemap/>
  242.                     <logtimefmt/>
  243.                 </item>
  244.                 <item>
  245.                     <name>Disk:$1:Write:ops per second(每秒寫磁碟的次數)</name>
  246.                     <type>0</type>
  247.                     <snmp_community/>
  248.                     <multiplier>0</multiplier>
  249.                     <snmp_oid/>
  250.                     <key>custom.vfs.dev.write.ops[sda]</key>
  251.                     <delay>30</delay>
  252.                     <history>90</history>
  253.                     <trends>365</trends>
  254.                     <status>0</status>
  255.                     <value_type>3</value_type>
  256.                     <allowed_hosts/>
  257.                     <units>ops/second</units>
  258.                     <delta>1</delta>
  259.                     <snmpv3_contextname/>
  260.                     <snmpv3_securityname/>
  261.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  262.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  263.                     <snmpv3_authpassphrase/>
  264.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  265.                     <snmpv3_privpassphrase/>
  266.                     <formula>1</formula>
  267.                     <delay_flex/>
  268.                     <params/>
  269.                     <ipmi_sensor/>
  270.                     <data_type>0</data_type>
  271.                     <authtype>0</authtype>
  272.                     <username/>
  273.                     <password/>
  274.                     <publickey/>
  275.                     <privatekey/>
  276.                     <port/>
  277.                     <description/>
  278.                     <inventory_link>0</inventory_link>
  279.                     <applications>
  280.                         <application>
  281.                             <name>disk_io_proc(透過cat /proc/diskstats擷取的數值)</name>
  282.                         </application>
  283.                     </applications>
  284.                     <valuemap/>
  285.                     <logtimefmt/>
  286.                 </item>
  287.             </items>
  288.             <discovery_rules>
  289.                 <discovery_rule>
  290.                     <name>io_status_discovery</name>
  291.                     <type>0</type>
  292.                     <snmp_community/>
  293.                     <snmp_oid/>
  294.                     <key>io.scandisk</key>
  295.                     <delay>30</delay>
  296.                     <status>0</status>
  297.                     <allowed_hosts/>
  298.                     <snmpv3_contextname/>
  299.                     <snmpv3_securityname/>
  300.                     <snmpv3_securitylevel>0</snmpv3_securitylevel>
  301.                     <snmpv3_authprotocol>0</snmpv3_authprotocol>
  302.                     <snmpv3_authpassphrase/>
  303.                     <snmpv3_privprotocol>0</snmpv3_privprotocol>
  304.                     <snmpv3_privpassphrase/>
  305.                     <delay_flex/>
  306.                     <params/>
  307.                     <ipmi_sensor/>
  308.                     <authtype>0</authtype>
  309.                     <username/>
  310.                     <password/>
  311.                     <publickey/>
  312.                     <privatekey/>
  313.                     <port/>
  314.                     <filter>
  315.                         <evaltype>0</evaltype>
  316.                         <formula/>
  317.                         <conditions/>
  318.                     </filter>
  319.                     <lifetime>1</lifetime>
  320.                     <description/>
  321.                     <item_prototypes>
  322.                         <item_prototype>
  323.                             <name>IO_avgqu-sz(平均I/O佇列長度) on $1</name>
  324.                             <type>0</type>
  325.                             <snmp_community/>
  326.                             <multiplier>0</multiplier>
  327.                             <snmp_oid/>
  328.                             <key>io.avgqu-sz[{#DISK_NAME}]</key>
  329.                             <delay>30</delay>
  330.                             <history>90</history>
  331.                             <trends>365</trends>
  332.                             <status>0</status>
  333.                             <value_type>0</value_type>
  334.                             <allowed_hosts/>
  335.                             <units>length</units>
  336.                             <delta>0</delta>
  337.                             <snmpv3_contextname/>
  338.                             <snmpv3_securityname/>
  339.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  340.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  341.                             <snmpv3_authpassphrase/>
  342.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  343.                             <snmpv3_privpassphrase/>
  344.                             <formula>1</formula>
  345.                             <delay_flex/>
  346.                             <params/>
  347.                             <ipmi_sensor/>
  348.                             <data_type>0</data_type>
  349.                             <authtype>0</authtype>
  350.                             <username/>
  351.                             <password/>
  352.                             <publickey/>
  353.                             <privatekey/>
  354.                             <port/>
  355.                             <description/>
  356.                             <inventory_link>0</inventory_link>
  357.                             <applications>
  358.                                 <application>
  359.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  360.                                 </application>
  361.                             </applications>
  362.                             <valuemap/>
  363.                             <logtimefmt/>
  364.                         </item_prototype>
  365.                         <item_prototype>
  366.                             <name>IO_avgrq-sz(平均每次裝置I/O操作的資料大小 (扇區)) ON $1</name>
  367.                             <type>0</type>
  368.                             <snmp_community/>
  369.                             <multiplier>0</multiplier>
  370.                             <snmp_oid/>
  371.                             <key>io.avgrq-sz[{#DISK_NAME}]</key>
  372.                             <delay>30</delay>
  373.                             <history>90</history>
  374.                             <trends>365</trends>
  375.                             <status>0</status>
  376.                             <value_type>0</value_type>
  377.                             <allowed_hosts/>
  378.                             <units>扇區</units>
  379.                             <delta>0</delta>
  380.                             <snmpv3_contextname/>
  381.                             <snmpv3_securityname/>
  382.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  383.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  384.                             <snmpv3_authpassphrase/>
  385.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  386.                             <snmpv3_privpassphrase/>
  387.                             <formula>1</formula>
  388.                             <delay_flex/>
  389.                             <params/>
  390.                             <ipmi_sensor/>
  391.                             <data_type>0</data_type>
  392.                             <authtype>0</authtype>
  393.                             <username/>
  394.                             <password/>
  395.                             <publickey/>
  396.                             <privatekey/>
  397.                             <port/>
  398.                             <description/>
  399.                             <inventory_link>0</inventory_link>
  400.                             <applications>
  401.                                 <application>
  402.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  403.                                 </application>
  404.                             </applications>
  405.                             <valuemap/>
  406.                             <logtimefmt/>
  407.                         </item_prototype>
  408.                         <item_prototype>
  409.                             <name>IO_await(平均每次裝置I/O操作的等待時間 (毫秒)) on $1</name>
  410.                             <type>0</type>
  411.                             <snmp_community/>
  412.                             <multiplier>0</multiplier>
  413.                             <snmp_oid/>
  414.                             <key>io.await[{#DISK_NAME}]</key>
  415.                             <delay>30</delay>
  416.                             <history>90</history>
  417.                             <trends>365</trends>
  418.                             <status>0</status>
  419.                             <value_type>0</value_type>
  420.                             <allowed_hosts/>
  421.                             <units>ms</units>
  422.                             <delta>0</delta>
  423.                             <snmpv3_contextname/>
  424.                             <snmpv3_securityname/>
  425.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  426.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  427.                             <snmpv3_authpassphrase/>
  428.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  429.                             <snmpv3_privpassphrase/>
  430.                             <formula>1</formula>
  431.                             <delay_flex/>
  432.                             <params/>
  433.                             <ipmi_sensor/>
  434.                             <data_type>0</data_type>
  435.                             <authtype>0</authtype>
  436.                             <username/>
  437.                             <password/>
  438.                             <publickey/>
  439.                             <privatekey/>
  440.                             <port/>
  441.                             <description/>
  442.                             <inventory_link>0</inventory_link>
  443.                             <applications>
  444.                                 <application>
  445.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  446.                                 </application>
  447.                             </applications>
  448.                             <valuemap/>
  449.                             <logtimefmt/>
  450.                         </item_prototype>
  451.                         <item_prototype>
  452.                             <name>IO_rMBps(每秒讀兆位元組數) on $1</name>
  453.                             <type>0</type>
  454.                             <snmp_community/>
  455.                             <multiplier>0</multiplier>
  456.                             <snmp_oid/>
  457.                             <key>io.rMBps[{#DISK_NAME}]</key>
  458.                             <delay>30</delay>
  459.                             <history>90</history>
  460.                             <trends>365</trends>
  461.                             <status>0</status>
  462.                             <value_type>0</value_type>
  463.                             <allowed_hosts/>
  464.                             <units>rMBps</units>
  465.                             <delta>0</delta>
  466.                             <snmpv3_contextname/>
  467.                             <snmpv3_securityname/>
  468.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  469.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  470.                             <snmpv3_authpassphrase/>
  471.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  472.                             <snmpv3_privpassphrase/>
  473.                             <formula>1</formula>
  474.                             <delay_flex/>
  475.                             <params/>
  476.                             <ipmi_sensor/>
  477.                             <data_type>0</data_type>
  478.                             <authtype>0</authtype>
  479.                             <username/>
  480.                             <password/>
  481.                             <publickey/>
  482.                             <privatekey/>
  483.                             <port/>
  484.                             <description/>
  485.                             <inventory_link>0</inventory_link>
  486.                             <applications>
  487.                                 <application>
  488.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  489.                                 </application>
  490.                             </applications>
  491.                             <valuemap/>
  492.                             <logtimefmt/>
  493.                         </item_prototype>
  494.                         <item_prototype>
  495.                             <name>IO_rps(每秒完成的讀 I/O 裝置次數) on $1</name>
  496.                             <type>0</type>
  497.                             <snmp_community/>
  498.                             <multiplier>0</multiplier>
  499.                             <snmp_oid/>
  500.                             <key>io.rps[{#DISK_NAME}]</key>
  501.                             <delay>30</delay>
  502.                             <history>90</history>
  503.                             <trends>365</trends>
  504.                             <status>0</status>
  505.                             <value_type>0</value_type>
  506.                             <allowed_hosts/>
  507.                             <units>rps</units>
  508.                             <delta>0</delta>
  509.                             <snmpv3_contextname/>
  510.                             <snmpv3_securityname/>
  511.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  512.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  513.                             <snmpv3_authpassphrase/>
  514.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  515.                             <snmpv3_privpassphrase/>
  516.                             <formula>1</formula>
  517.                             <delay_flex/>
  518.                             <params/>
  519.                             <ipmi_sensor/>
  520.                             <data_type>0</data_type>
  521.                             <authtype>0</authtype>
  522.                             <username/>
  523.                             <password/>
  524.                             <publickey/>
  525.                             <privatekey/>
  526.                             <port/>
  527.                             <description/>
  528.                             <inventory_link>0</inventory_link>
  529.                             <applications>
  530.                                 <application>
  531.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  532.                                 </application>
  533.                             </applications>
  534.                             <valuemap/>
  535.                             <logtimefmt/>
  536.                         </item_prototype>
  537.                         <item_prototype>
  538.                             <name>IO_svctm( 平均每次裝置I/O操作的服務時間 (毫秒)) on $1</name>
  539.                             <type>0</type>
  540.                             <snmp_community/>
  541.                             <multiplier>0</multiplier>
  542.                             <snmp_oid/>
  543.                             <key>io.svctm[{#DISK_NAME}]</key>
  544.                             <delay>30</delay>
  545.                             <history>90</history>
  546.                             <trends>365</trends>
  547.                             <status>0</status>
  548.                             <value_type>0</value_type>
  549.                             <allowed_hosts/>
  550.                             <units>ms</units>
  551.                             <delta>0</delta>
  552.                             <snmpv3_contextname/>
  553.                             <snmpv3_securityname/>
  554.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  555.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  556.                             <snmpv3_authpassphrase/>
  557.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  558.                             <snmpv3_privpassphrase/>
  559.                             <formula>1</formula>
  560.                             <delay_flex/>
  561.                             <params/>
  562.                             <ipmi_sensor/>
  563.                             <data_type>0</data_type>
  564.                             <authtype>0</authtype>
  565.                             <username/>
  566.                             <password/>
  567.                             <publickey/>
  568.                             <privatekey/>
  569.                             <port/>
  570.                             <description/>
  571.                             <inventory_link>0</inventory_link>
  572.                             <applications>
  573.                                 <application>
  574.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  575.                                 </application>
  576.                             </applications>
  577.                             <valuemap/>
  578.                             <logtimefmt/>
  579.                         </item_prototype>
  580.                         <item_prototype>
  581.                             <name>IO_util(磁碟在一秒中有百分之多少的時間用於 I/O 操作) on $1</name>
  582.                             <type>0</type>
  583.                             <snmp_community/>
  584.                             <multiplier>0</multiplier>
  585.                             <snmp_oid/>
  586.                             <key>io.util[{#DISK_NAME}]</key>
  587.                             <delay>30</delay>
  588.                             <history>90</history>
  589.                             <trends>365</trends>
  590.                             <status>0</status>
  591.                             <value_type>0</value_type>
  592.                             <allowed_hosts/>
  593.                             <units>%</units>
  594.                             <delta>0</delta>
  595.                             <snmpv3_contextname/>
  596.                             <snmpv3_securityname/>
  597.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  598.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  599.                             <snmpv3_authpassphrase/>
  600.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  601.                             <snmpv3_privpassphrase/>
  602.                             <formula>1</formula>
  603.                             <delay_flex/>
  604.                             <params/>
  605.                             <ipmi_sensor/>
  606.                             <data_type>0</data_type>
  607.                             <authtype>0</authtype>
  608.                             <username/>
  609.                             <password/>
  610.                             <publickey/>
  611.                             <privatekey/>
  612.                             <port/>
  613.                             <description/>
  614.                             <inventory_link>0</inventory_link>
  615.                             <applications>
  616.                                 <application>
  617.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  618.                                 </application>
  619.                             </applications>
  620.                             <valuemap/>
  621.                             <logtimefmt/>
  622.                         </item_prototype>
  623.                         <item_prototype>
  624.                             <name>IO_wMBps(每秒寫M位元組數) on $1</name>
  625.                             <type>0</type>
  626.                             <snmp_community/>
  627.                             <multiplier>0</multiplier>
  628.                             <snmp_oid/>
  629.                             <key>io.wMBps[{#DISK_NAME}]</key>
  630.                             <delay>30</delay>
  631.                             <history>90</history>
  632.                             <trends>365</trends>
  633.                             <status>0</status>
  634.                             <value_type>0</value_type>
  635.                             <allowed_hosts/>
  636.                             <units>wMBps</units>
  637.                             <delta>0</delta>
  638.                             <snmpv3_contextname/>
  639.                             <snmpv3_securityname/>
  640.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  641.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  642.                             <snmpv3_authpassphrase/>
  643.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  644.                             <snmpv3_privpassphrase/>
  645.                             <formula>1</formula>
  646.                             <delay_flex/>
  647.                             <params/>
  648.                             <ipmi_sensor/>
  649.                             <data_type>0</data_type>
  650.                             <authtype>0</authtype>
  651.                             <username/>
  652.                             <password/>
  653.                             <publickey/>
  654.                             <privatekey/>
  655.                             <port/>
  656.                             <description/>
  657.                             <inventory_link>0</inventory_link>
  658.                             <applications>
  659.                                 <application>
  660.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  661.                                 </application>
  662.                             </applications>
  663.                             <valuemap/>
  664.                             <logtimefmt/>
  665.                         </item_prototype>
  666.                         <item_prototype>
  667.                             <name>IO_wps(每秒完成的寫 I/O 裝置次數) on $1</name>
  668.                             <type>0</type>
  669.                             <snmp_community/>
  670.                             <multiplier>0</multiplier>
  671.                             <snmp_oid/>
  672.                             <key>io.wps[{#DISK_NAME}]</key>
  673.                             <delay>30</delay>
  674.                             <history>90</history>
  675.                             <trends>365</trends>
  676.                             <status>0</status>
  677.                             <value_type>0</value_type>
  678.                             <allowed_hosts/>
  679.                             <units>wps</units>
  680.                             <delta>0</delta>
  681.                             <snmpv3_contextname/>
  682.                             <snmpv3_securityname/>
  683.                             <snmpv3_securitylevel>0</snmpv3_securitylevel>
  684.                             <snmpv3_authprotocol>0</snmpv3_authprotocol>
  685.                             <snmpv3_authpassphrase/>
  686.                             <snmpv3_privprotocol>0</snmpv3_privprotocol>
  687.                             <snmpv3_privpassphrase/>
  688.                             <formula>1</formula>
  689.                             <delay_flex/>
  690.                             <params/>
  691.                             <ipmi_sensor/>
  692.                             <data_type>0</data_type>
  693.                             <authtype>0</authtype>
  694.                             <username/>
  695.                             <password/>
  696.                             <publickey/>
  697.                             <privatekey/>
  698.                             <port/>
  699.                             <description/>
  700.                             <inventory_link>0</inventory_link>
  701.                             <applications>
  702.                                 <application>
  703.                                     <name>disk_io_iostat(透過iostat -m -x -d 30擷取的引數)</name>
  704.                                 </application>
  705.                             </applications>
  706.                             <valuemap/>
  707.                             <logtimefmt/>
  708.                         </item_prototype>
  709.                     </item_prototypes>
  710.                     <trigger_prototypes/>
  711.                     <graph_prototypes/>
  712.                     <host_prototypes/>
  713.                 </discovery_rule>
  714.             </discovery_rules>
  715.             <macros/>
  716.             <templates/>
  717.             <screens/>
  718.         </template>
  719.     </templates>
  720.     <graphs>
  721.         <graph>
  722.             <name>linux_disk_io_stat</name>
  723.             <width>900</width>
  724.             <height>200</height>
  725.             <yaxismin>0.0000</yaxismin>
  726.             <yaxismax>100.0000</yaxismax>
  727.             <show_work_period>1</show_work_period>
  728.             <show_triggers>1</show_triggers>
  729.             <type>0</type>
  730.             <show_legend>1</show_legend>
  731.             <show_3d>0</show_3d>
  732.             <percent_left>0.0000</percent_left>
  733.             <percent_right>0.0000</percent_right>
  734.             <ymin_type_1>0</ymin_type_1>
  735.             <ymax_type_1>0</ymax_type_1>
  736.             <ymin_item_1>0</ymin_item_1>
  737.             <ymax_item_1>0</ymax_item_1>
  738.             <graph_items>
  739.                 <graph_item>
  740.                     <sortorder>0</sortorder>
  741.                     <drawtype>0</drawtype>
  742.                     <color>00C800</color>
  743.                     <yaxisside>0</yaxisside>
  744.                     <calc_fnc>2</calc_fnc>
  745.                     <type>0</type>
  746.                     <item>
  747.                         <host>disk_io_template</host>
  748.                         <key>custom.vfs.dev.read.sectors[sda]</key>
  749.                     </item>
  750.                 </graph_item>
  751.                 <graph_item>
  752.                     <sortorder>1</sortorder>
  753.                     <drawtype>0</drawtype>
  754.                     <color>C80000</color>
  755.                     <yaxisside>0</yaxisside>
  756.                     <calc_fnc>2</calc_fnc>
  757.                     <type>0</type>
  758.                     <item>
  759.                         <host>disk_io_template</host>
  760.                         <key>custom.vfs.dev.read.ms[sda]</key>
  761.                     </item>
  762.                 </graph_item>
  763.                 <graph_item>
  764.                     <sortorder>2</sortorder>
  765.                     <drawtype>0</drawtype>
  766.                     <color>0000C8</color>
  767.                     <yaxisside>0</yaxisside>
  768.                     <calc_fnc>2</calc_fnc>
  769.                     <type>0</type>
  770.                     <item>
  771.                         <host>disk_io_template</host>
  772.                         <key>custom.vfs.dev.read.ops[sda]</key>
  773.                     </item>
  774.                 </graph_item>
  775.                 <graph_item>
  776.                     <sortorder>3</sortorder>
  777.                     <drawtype>0</drawtype>
  778.                     <color>C800C8</color>
  779.                     <yaxisside>0</yaxisside>
  780.                     <calc_fnc>2</calc_fnc>
  781.                     <type>0</type>
  782.                     <item>
  783.                         <host>disk_io_template</host>
  784.                         <key>custom.vfs.dev.write.sectors[sda]</key>
  785.                     </item>
  786.                 </graph_item>
  787.                 <graph_item>
  788.                     <sortorder>4</sortorder>
  789.                     <drawtype>0</drawtype>
  790.                     <color>00C8C8</color>
  791.                     <yaxisside>0</yaxisside>
  792.                     <calc_fnc>2</calc_fnc>
  793.                     <type>0</type>
  794.                     <item>
  795.                         <host>disk_io_template</host>
  796.                         <key>custom.vfs.dev.write.ms[sda]</key>
  797.                     </item>
  798.                 </graph_item>
  799.                 <graph_item>
  800.                     <sortorder>5</sortorder>
  801.                     <drawtype>0</drawtype>
  802.                     <color>C8C800</color>
  803.                     <yaxisside>0</yaxisside>
  804.                     <calc_fnc>2</calc_fnc>
  805.                     <type>0</type>
  806.                     <item>
  807.                         <host>disk_io_template</host>
  808.                         <key>custom.vfs.dev.write.ops[sda]</key>
  809.                     </item>
  810.                 </graph_item>
  811.             </graph_items>
  812.         </graph>
  813.     </graphs>
  814. </zabbix_export>


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28916011/viewspace-1848833/,如需轉載,請註明出處,否則將追究法律責任。

相關文章