添加数据库无效对象监控

来源:这里教程网 时间:2026-03-03 18:58:37 作者:

添加无效对象、无效索引监控指标                 <item>                     <name>Database invalid object count</name>                     <type>11</type>                     <snmp_community/>                     <snmp_oid/>                     <key>db.odbc.select[db invalid object count,{$DSN}]</key>                     <delay>5m</delay>                     <history>7d</history>                     <trends>365d</trends>                     <status>0</status>                     <value_type>3</value_type>                     <allowed_hosts/>                     <units/>                     <snmpv3_contextname/>                     <snmpv3_securityname/>                     <snmpv3_securitylevel>0</snmpv3_securitylevel>                     <snmpv3_authprotocol>0</snmpv3_authprotocol>                     <snmpv3_authpassphrase/>                     <snmpv3_privprotocol>0</snmpv3_privprotocol>                     <snmpv3_privpassphrase/>                     <params>SELECT count(1) FROM dba_objects WHERE status != 'VALID'</params>                     <ipmi_sensor/>                     <authtype>0</authtype>                     <username>{$DB_USERNAME}</username>                     <password>{$DB_PASSWORD}</password>                     <publickey/>                     <privatekey/>                     <port/>                     <description/>                     <inventory_link>0</inventory_link>                     <applications>                         <application>                             <name>Winn Database</name>                         </application>                     </applications>                     <valuemap/>                     <logtimefmt/>                     <preprocessing/>                     <jmx_endpoint/>                     <timeout>3s</timeout>                     <url/>                     <query_fields/>                     <posts/>                     <status_codes>200</status_codes>                     <follow_redirects>1</follow_redirects>                     <post_type>0</post_type>                     <http_proxy/>                     <headers/>                     <retrieve_mode>0</retrieve_mode>                     <request_method>1</request_method>                     <output_format>0</output_format>                     <allow_traps>0</allow_traps>                     <ssl_cert_file/>                     <ssl_key_file/>                     <ssl_key_password/>                     <verify_peer>0</verify_peer>                     <verify_host>0</verify_host>                     <master_item/>                 </item>         <trigger>             <expression>{Winn Template Oracle DB:db.odbc.select[db invalid object count,{$DSN}].last()}&gt;=3</expression>             <recovery_mode>0</recovery_mode>             <recovery_expression/>             <name>The database has more than three invalid objects</name>             <correlation_mode>0</correlation_mode>             <correlation_tag/>             <url/>             <status>0</status>             <priority>4</priority>             <description/>             <type>0</type>             <manual_close>1</manual_close>             <dependencies/>             <tags>                 <tag>                     <tag>Application</tag>                     <value>Oracle</value>                 </tag>                 <tag>                     <tag>Field</tag>                     <value>Database</value>                 </tag>                 <tag>                     <tag>Scope</tag>                     <value>Infrastructure</value>                 </tag>                 <tag>                     <tag>Type</tag>                     <value>Technical</value>                 </tag>             </tags>         </trigger>                 <item>                     <name>Database invalid index count</name>                     <type>11</type>                     <snmp_community/>                     <snmp_oid/>                     <key>db.odbc.select[db invalid index count,{$DSN}]</key>                     <delay>5m</delay>                     <history>7d</history>                     <trends>365d</trends>                     <status>0</status>                     <value_type>3</value_type>                     <allowed_hosts/>                     <units/>                     <snmpv3_contextname/>                     <snmpv3_securityname/>                     <snmpv3_securitylevel>0</snmpv3_securitylevel>                     <snmpv3_authprotocol>0</snmpv3_authprotocol>                     <snmpv3_authpassphrase/>                     <snmpv3_privprotocol>0</snmpv3_privprotocol>                     <snmpv3_privpassphrase/>                     <params>SELECT count(1) FROM dba_indexes WHERE status = 'UNUSABLE'</params>                     <ipmi_sensor/>                     <authtype>0</authtype>                     <username>{$DB_USERNAME}</username>                     <password>{$DB_PASSWORD}</password>                     <publickey/>                     <privatekey/>                     <port/>                     <description/>                     <inventory_link>0</inventory_link>                     <applications>                         <application>                             <name>Winn Database</name>                         </application>                     </applications>                     <valuemap/>                     <logtimefmt/>                     <preprocessing/>                     <jmx_endpoint/>                     <timeout>3s</timeout>                     <url/>                     <query_fields/>                     <posts/>                     <status_codes>200</status_codes>                     <follow_redirects>1</follow_redirects>                     <post_type>0</post_type>                     <http_proxy/>                     <headers/>                     <retrieve_mode>0</retrieve_mode>                     <request_method>1</request_method>                     <output_format>0</output_format>                     <allow_traps>0</allow_traps>                     <ssl_cert_file/>                     <ssl_key_file/>                     <ssl_key_password/>                     <verify_peer>0</verify_peer>                     <verify_host>0</verify_host>                     <master_item/>                 </item>         <trigger>             <expression>{Winn Template Oracle DB:db.odbc.select[db invalid index count,{$DSN}].last()}&gt;=3</expression>             <recovery_mode>0</recovery_mode>             <recovery_expression/>             <name>The database has more than three invalid indexes</name>             <correlation_mode>0</correlation_mode>             <correlation_tag/>             <url/>             <status>0</status>             <priority>4</priority>             <description/>             <type>0</type>             <manual_close>1</manual_close>             <dependencies/>             <tags>                 <tag>                     <tag>Application</tag>                     <value>Oracle</value>                 </tag>                 <tag>                     <tag>Field</tag>                     <value>Database</value>                 </tag>                 <tag>                     <tag>Scope</tag>                     <value>Infrastructure</value>                 </tag>                 <tag>                     <tag>Type</tag>                     <value>Technical</value>                 </tag>             </tags>         </trigger>                 <item>                     <name>Database invalid partition index count</name>                     <type>11</type>                     <snmp_community/>                     <snmp_oid/>                     <key>db.odbc.select[db invalid partition index count,{$DSN}]</key>                     <delay>5m</delay>                     <history>7d</history>                     <trends>365d</trends>                     <status>0</status>                     <value_type>3</value_type>                     <allowed_hosts/>                     <units/>                     <snmpv3_contextname/>                     <snmpv3_securityname/>                     <snmpv3_securitylevel>0</snmpv3_securitylevel>                     <snmpv3_authprotocol>0</snmpv3_authprotocol>                     <snmpv3_authpassphrase/>                     <snmpv3_privprotocol>0</snmpv3_privprotocol>                     <snmpv3_privpassphrase/>                     <params>SELECT count(1) FROM dba_ind_partitions WHERE status = 'UNUSABLE'</params>                     <ipmi_sensor/>                     <authtype>0</authtype>                     <username>{$DB_USERNAME}</username>                     <password>{$DB_PASSWORD}</password>                     <publickey/>                     <privatekey/>                     <port/>                     <description/>                     <inventory_link>0</inventory_link>                     <applications>                         <application>                             <name>Winn Database</name>                         </application>                     </applications>                     <valuemap/>                     <logtimefmt/>                     <preprocessing/>                     <jmx_endpoint/>                     <timeout>3s</timeout>                     <url/>                     <query_fields/>                     <posts/>                     <status_codes>200</status_codes>                     <follow_redirects>1</follow_redirects>                     <post_type>0</post_type>                     <http_proxy/>                     <headers/>                     <retrieve_mode>0</retrieve_mode>                     <request_method>1</request_method>                     <output_format>0</output_format>                     <allow_traps>0</allow_traps>                     <ssl_cert_file/>                     <ssl_key_file/>                     <ssl_key_password/>                     <verify_peer>0</verify_peer>                     <verify_host>0</verify_host>                     <master_item/>                 </item>         <trigger>             <expression>{Winn Template Oracle DB:db.odbc.select[db invalid partition index count,{$DSN}].last()}&gt;=3</expression>             <recovery_mode>0</recovery_mode>             <recovery_expression/>             <name>The database has more than three invalid partition indexes</name>             <correlation_mode>0</correlation_mode>             <correlation_tag/>             <url/>             <status>0</status>             <priority>4</priority>             <description/>             <type>0</type>             <manual_close>1</manual_close>             <dependencies/>             <tags>                 <tag>                     <tag>Application</tag>                     <value>Oracle</value>                 </tag>                 <tag>                     <tag>Field</tag>                     <value>Database</value>                 </tag>                 <tag>                     <tag>Scope</tag>                     <value>Infrastructure</value>                 </tag>                 <tag>                     <tag>Type</tag>                     <value>Technical</value>                 </tag>             </tags>         </trigger>

相关推荐