cacti監控linux和windows磁碟IO

來源:互聯網
上載者:User

標籤:ext   view   windows磁碟   fun   key   ice   9.1   chown   gpo   

cacti監控linux和windows磁碟IO

標籤:cacti linux磁碟IO windows磁碟IO原創作品,允許轉載,轉載時請務必以超連結形式標明文章 原始出處 、作者資訊和本聲明。否則將追究法律責任。http://charlie928.blog.51cto.com/3741218/1331780

一,環境

123 cacti版本:0.8.8b# uname -aLinux 10-6-8-200 2.6.32-279.22.1.el6.x86_64 #1 SMP Wed Feb 6 03:10:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

二,操作步驟

首先監控linux磁碟IO

1.下載snmpdiskio-0.9.6 2.解壓後並拷貝命令
1 # cp snmpdiskio /usr/local/bin/
3.編輯partition.xml檔案
123456789101112131415161718192021222324252627282930313233343536373839 vi /var/www/html/cacti/resource/snmp_queries/partition.xml<interface>        <name>Get SNMP Partitions</name>        <description>Queries a host for a list of monitorable partitions</description>        <oid_index>.1.3.6.1.4.1.2021.13.15</oid_index>        <index_order>hdDescr:hdIndex</index_order>        <index_order_type>numeric</index_order_type>        <index_title_format>|chosen_order_field|</index_title_format>        <fields>                <hdIndex>                        <name>Index</name>                        <method>walk</method>                        <source>value</source>                        <direction>input</direction>                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.1</oid>                </hdIndex>                <hdDescr>                        <name>Description</name>                        <method>walk</method>                        <source>value</source>                        <direction>input</direction>                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.2</oid>                </hdDescr>                <hdInBlocks>                        <name>Bytes Written</name>                        <method>walk</method>                        <source>value</source>                        <direction>output</direction>                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.3</oid>                </hdInBlocks>                <hdOutBlocks>                        <name>Bytes Read</name>                        <method>walk</method>                        <source>value</source>                        <direction>output</direction>                        <oid>.1.3.6.1.4.1.2021.13.15.1.1.4</oid>                </hdOutBlocks>        </fields></interface>
4.修改檔案屬性
1 # chown apache. partition.xml
5.修改snmpd.conf配置,添加以下內容
123456 # vi /etc/snmp/snmpd.confextend .1.3.6.1.4.1.2021.54 hdNum /bin/sh /usr/local/bin/snmpdiskio hdNumextend .1.3.6.1.4.1.2021.55 hdIndex /bin/sh /usr/local/bin/snmpdiskio hdIndexextend .1.3.6.1.4.1.2021.56 hdDescr /bin/sh /usr/local/bin/snmpdiskio hdDescrextend .1.3.6.1.4.1.2021.57 hdInBlocks /bin/sh /usr/local/bin/snmpdiskio hdInBlocksextend .1.3.6.1.4.1.2021.58 hdOutBlocks /bin/sh /usr/local/bin/snmpdiskio hdOutBlocks
6.重啟snmpd服務,並測試
12345678910111213 # service snmpd restart# snmpwalk -v 2c -c meihua localhost .1.3.6.1.4.1.2021.58UCD-SNMP-MIB::ucdavis.58.1.0 = INTEGER: 1UCD-SNMP-MIB::ucdavis.58.2.1.2.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "/bin/sh"UCD-SNMP-MIB::ucdavis.58.2.1.3.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "/usr/local/bin/snmpdiskio hdOutBlocks"UCD-SNMP-MIB::ucdavis.58.2.1.4.11.104.100.79.117.116.66.108.111.99.107.115 = ""UCD-SNMP-MIB::ucdavis.58.2.1.5.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 5UCD-SNMP-MIB::ucdavis.58.2.1.6.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 1UCD-SNMP-MIB::ucdavis.58.2.1.7.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 1UCD-SNMP-MIB::ucdavis.58.2.1.20.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 4UCD-SNMP-MIB::ucdavis.58.2.1.21.11.104.100.79.117.116.66.108.111.99.107.115 = INTEGER: 1UCD-SNMP-MIB::ucdavis.58.3.1.1.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "0"UCD-SNMP-MIB::ucdavis.58.3.1.2.11.104.100.79.117.116.66.108.111.99.107.115 = STRING: "0
7.解壓後模板匯入到cacti中

8.在主機中選擇此模板,是否能擷取資料

 

然後是監控windows磁碟IO操作步驟:

1.windows用戶端安裝informant-std-16.exe

:http://www.wtcs.org/informant/download.htm

2.下載模板檔案:http://forums.cacti.net/viewtopic.php?f=12&t=29832&hilit=Cacti_SNMP_INFORMANT_STD_W32_Metrics

以上模板檔案匯入到cacti中

 

以上模板拷貝到/var/www/html/cacti/resource/snmp_queries/中

並更改許可權。

3.查看windows磁碟IO是否有資料

本文出自 “charlie_cen” 部落格,請務必保留此出處http://charlie928.blog.51cto.com/3741218/1331780

cacti監控linux和windows磁碟IO

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.