實(shí)戰(zhàn)EMPluginForMySQL監(jiān)控_第1頁
實(shí)戰(zhàn)EMPluginForMySQL監(jiān)控_第2頁
實(shí)戰(zhàn)EMPluginForMySQL監(jiān)控_第3頁
實(shí)戰(zhàn)EMPluginForMySQL監(jiān)控_第4頁
實(shí)戰(zhàn)EMPluginForMySQL監(jiān)控_第5頁
已閱讀5頁,還剩28頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、(實(shí)戰(zhàn))EM Plugin For MySQL 監(jiān)控搜狐DBA1主題大綱為什么選擇開發(fā)EM Plugin?EM Plugin能做些什么?EM Plugin的開發(fā)流程及代碼示例EM Plugin的優(yōu)點(diǎn) & 缺點(diǎn)2為什么選擇開發(fā) EM Plugin?3EM Plugin 能做些什么?4基于EM框架的功能 - Information Publishers Reports5基于EM框架的功能 Configuration Management6基于EM框架的功能 Configuration Management7基于EM框架的功能 Metric的使用 (History)8基于EM框架的功能 Metric

2、的使用 (Compare)9基于EM框架的功能 Metric的使用10基于EM框架的功能 郵件報(bào)警11EM Plugin 能做些什么?MetricPolicyReport & ChartLink 12EM Plugin的開發(fā)流程13定義Target Type & Metric & Properties根據(jù)Oracle提供的DTD編寫XML文件Oracle Enterprise Manager Extensibility Guide$AGENT_HOME/sysman/admin/dtds/TargetMetadata.dtd$AGENT_HOME/sysman/admin/dtds/Targe

3、tCollection.dtd$AGENT_HOME/sysman/admin/metadata/*.xml$AGENT_HOME/sysman/admin/default_collection/*.xmlmetadata.xml 定義收集哪些metric,定義metric的收集方法定義metric是否在UI顯示 collection.xml定義metric的收集頻率報(bào)警閥值 14 MySQL DB . . metadata.xml架構(gòu)15 Response Status Current Status of the Server Response time(ms) emdRoot script

4、sDir perlBin host port uname pass mysqlhome mydelimiter %perlBin%/perl %scriptsDir%/emx/%TYPE%/response.pl %mysqlhome% %mydelimiter% %host% %port% %uname% %pass% %mydelimiter% em_result= em_error= 120 metadata.xml架構(gòu) 定義Metric示例16 Show Status metadata.xml架構(gòu) 定義InstanceProperties示例17 collection.xml架構(gòu)18收

5、集Metric的方法FetchletsOS Command - 推薦使用PerlSQLSNMPURL TimingDynamic Monitoring Service (DMS)HTTP DataURLXMLWBEMJDBCOJMX/SOAPReceiveletsSNMP ReceiveletsAdvanced Queue ReceiveletsHTTP Receivelets19Chart展示20Report展示21Report展示22 Response Timing 375 150 south true Response Time (ms) reportTab MySQL Health S

6、tatus Reports . . 定義Chart23BEGINDECLARE -作為create_report_definition的p_late_binding_target_types參數(shù)值 l_target_types MGMT_IP_TARGET_TYPES; -定義報(bào)表的guid l_report_guid RAW(16); -定義元素的guid l_element_guid RAW(16); -create_report_definition和add_element_to_report_def的p_parameters參數(shù)值 l_param_values MGMT_IP_PARA

7、M_VALUE_LIST; - 序列變量 l_curr_order應(yīng)該連續(xù)增長,從1到報(bào)表中的元素總數(shù) BEGIN - INITIALIZE REPORT ORDER FOR PLUGIN INTERFACE l_report_order := 0; - 目標(biāo)類型 l_target_type = target type - specify the target type associated with this report - 報(bào)表名稱 l_report_title_nlsid := MySQL Innodb Deadlock Reports; -得到報(bào)表所有者 - 定義報(bào)表 - creat

8、e a report definition for the report l_report_guid := mgmt_ip.create_report_definition ( -加入圖 l_param_values := MGMT_IP_PARAM_VALUE_LIST(); commit;END;END;定義Report24打包Plugin文件(MPA) Management Plug-in Archive檢查metadata.xml和collection.xml文件的正確性emcli check_mp -metadata_ -collection_ -err_level=info打包文件

9、emcli add_mp_to_mpa -mpa=/export/home/oracle/mysql_plugin/mpa/1.5.20090601/MYSQL_TEST_INTEGRATION.jar -mp_version=1.5.20090601 -ttd=/export/home/oracle/mysql_plugin/satine_meta.xml -dc=/export/home/oracle/mysql_plugin/satine_coll.xml -file=HOMEPAGE_DEFINITION:/export/home/oracle/mysql_plugin/homepag

10、e_charts.xml -file=REPORT_DEFINITION:/export/home/oracle/mysql_plugin/reports/SlowLog.sql -file=REPORT_DEFINITION:/export/home/oracle/mysql_plugin/reports/HealthStatusReports.sql -file=MONITORING_SCRIPT:/export/home/oracle/mysql_plugin/scripts/response.pl -file=MONITORING_SCRIPT:/export/home/oracle/

11、mysql_plugin/scripts/MysqlIsAlive.pl -file=ECM_DEPLOY:/export/home/oracle/mysql_plugin/ecm/mysql_ecm_deploy.sql -file=ECM_UNDEPLOY:/export/home/oracle/mysql_plugin/ecm/mysql_ecm_undeploy.sql -func_desc=Just for testing25導(dǎo)入MPASetupManagement Plug-insImportList ArchiveOK26發(fā)布Plugin到AgentsDeployAdd Agen

12、tsNextFinish27添加Mysql對(duì)象到EM找到用于監(jiān)控的AgentAdd選擇對(duì)象類型Go輸入正確信息OK28Plugin性能測(cè)試使用工具:EM Management Plug-in Development Kit (EM PDK) lint and performance tools下載地址:使用方法:mptool/bin/mpcli perf -help 舉例: mpcli perf -out_dir=/export/home/oracle/metric_performance -time=600 -targets=mysql_test 29Plugin性能測(cè)試 報(bào)告報(bào)告規(guī)格:Metadata Statistics Target Runtime Statistics Agent Process Statistics Performance Charts System CPU UtilizationSystem Physical Memory UtilizationMemory

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論