The Oracle collector now prepends the view name to each metric to avoid overwriting metrics from different views with the same names

This commit is contained in:
dvanaken
2019-11-05 11:05:39 -05:00
committed by Dana Van Aken
parent 6283186d76
commit d874ca6a8b
19 changed files with 11949 additions and 20017 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -42,8 +42,8 @@
"control_files": "/opt/oracle/oradata/ORCLCDB/control01.ctl",
"control_management_pack_access": "DIAGNOSTIC+TUNING",
"core_dump_dest": "/opt/oracle/diag/rdbms/orclcdb/ORCLCDB/cdump",
"cpu_count": "8",
"cpu_min_count": "8",
"cpu_count": "4",
"cpu_min_count": "4",
"create_bitmap_area_size": "8388608",
"cursor_bind_capture_destination": "memory+disk",
"cursor_invalidation": "IMMEDIATE",
@@ -64,8 +64,8 @@
"db_block_checksum": "TYPICAL",
"db_block_size": "8192",
"db_cache_advice": "ON",
"db_cache_size": "16777216",
"db_file_multiblock_read_count": "29",
"db_cache_size": "0",
"db_file_multiblock_read_count": "128",
"db_files": "200",
"db_flash_cache_size": "0",
"db_flashback_retention_target": "1440",
@@ -93,7 +93,7 @@
"disk_asynch_io": "TRUE",
"dispatchers": "(PROTOCOL=TCP) (SERVICE=ORCLCDBXDB)",
"distributed_lock_timeout": "60",
"dml_locks": "4328",
"dml_locks": "2216",
"dnfs_batch_size": "4096",
"dst_upgrade_insert_conv": "TRUE",
"enable_automatic_maintenance_pdb": "TRUE",
@@ -138,7 +138,7 @@
"java_pool_size": "0",
"java_restrict": "none",
"java_soft_sessionspace_limit": "0",
"job_queue_processes": "160",
"job_queue_processes": "80",
"large_pool_size": "0",
"ldap_directory_access": "NONE",
"ldap_directory_sysauth": "no",
@@ -240,12 +240,12 @@
"parallel_degree_policy": "MANUAL",
"parallel_execution_message_size": "16384",
"parallel_force_local": "FALSE",
"parallel_max_servers": "160",
"parallel_max_servers": "80",
"parallel_min_degree": "1",
"parallel_min_percent": "0",
"parallel_min_servers": "16",
"parallel_min_servers": "8",
"parallel_min_time_threshold": "AUTO",
"parallel_servers_target": "160",
"parallel_servers_target": "80",
"parallel_threads_per_cpu": "1",
"permit_92_wrap_format": "TRUE",
"pga_aggregate_limit": "2147483648",
@@ -258,7 +258,7 @@
"plsql_warnings": "DISABLE:ALL",
"pre_page_sga": "TRUE",
"private_temp_table_prefix": "ORA$PTT_",
"processes": "640",
"processes": "320",
"query_rewrite_enabled": "TRUE",
"query_rewrite_integrity": "enforced",
"read_only_open_delayed": "FALSE",
@@ -271,10 +271,9 @@
"replication_dependency_tracking": "TRUE",
"resource_limit": "TRUE",
"resource_manage_goldengate": "FALSE",
"resource_manager_cpu_allocation": "8",
"resource_manager_plan": "SCHEDULER[0x4D52]:DEFAULT_MAINTENANCE_PLAN",
"resource_manager_cpu_allocation": "4",
"result_cache_max_result": "5",
"result_cache_max_size": "1179648",
"result_cache_max_size": "8060928",
"result_cache_mode": "MANUAL",
"result_cache_remote_expiration": "0",
"resumable_timeout": "0",
@@ -288,14 +287,14 @@
"service_names": "ORCLCDB",
"session_cached_cursors": "50",
"session_max_open_files": "10",
"sessions": "984",
"sessions": "504",
"sga_max_size": "1610612736",
"sga_min_size": "0",
"sga_target": "1610612736",
"shadow_core_dump": "partial",
"shared_memory_address": "0",
"shared_pool_reserved_size": "5872025",
"shared_pool_size": "16777216",
"shared_pool_reserved_size": "19293798",
"shared_pool_size": "0",
"shared_servers": "1",
"shrd_dupl_table_refresh_rate": "60",
"skip_unusable_indexes": "TRUE",
@@ -310,7 +309,7 @@
"standby_file_management": "MANUAL",
"star_transformation_enabled": "FALSE",
"statistics_level": "TYPICAL",
"streams_pool_size": "117440512",
"streams_pool_size": "0",
"tape_asynch_io": "TRUE",
"target_pdbs": "3",
"temp_undo_enabled": "FALSE",
@@ -319,7 +318,7 @@
"timed_os_statistics": "0",
"timed_statistics": "TRUE",
"trace_enabled": "TRUE",
"transactions": "1082",
"transactions": "554",
"transactions_per_rollback_segment": "5",
"undo_management": "AUTO",
"undo_retention": "900",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"start_time": 1563264802685,
"end_time": 1563265002918,
"observation_time": 200,
"start_time": 1572969216650,
"end_time": 1572969246165,
"observation_time": 29,
"database_type": "oracle",
"database_version": "19.0.0.0.0",
"workload_name": "tpcc"

View File

@@ -25,11 +25,16 @@ public class OracleCollector extends DBCollector {
private static final String VERSION_SQL = "select VERSION from product_component_version";
private static final String PARAMETERS_SQL = "select name, value from v$parameter";
private static final String PARAMETERS_SQL =
"select name, value from v$parameter";
private static final String PARAMETERS_SQL_WITH_HIDDEN =
"select x.ksppinm name, y.ksppstvl value from sys.x$ksppi x, sys.x$ksppcv y where"
+ " x.inst_id = userenv('Instance') and y.inst_id = userenv('Instance') and x.indx = y.indx";
"select x.ksppinm name, y.ksppstvl value "
+ "from sys.x$ksppi x, sys.x$ksppcv y "
+ "where x.inst_id = userenv('Instance') "
+ "and y.inst_id = userenv('Instance') "
+ "and x.indx = y.indx "
+ "and x.ksppinm like '/_%' ESCAPE '/'";
private static final String METRICS_SQL = "select name, value from v$sysstat";
@@ -54,14 +59,18 @@ public class OracleCollector extends DBCollector {
}
// Collect DBMS internal metrics
String key;
out = statement.executeQuery(METRICS_SQL);
while (out.next()) {
dbMetrics.put(out.getString(1).toLowerCase(), out.getString(2));
key = "sysstat." + out.getString(1).toLowerCase();
dbMetrics.put(key, out.getString(2));
}
out = statement.executeQuery(METRICS_SQL2);
while (out.next()) {
dbMetrics.put(out.getString(1).toLowerCase(), out.getString(2));
key = "sys_time_model." + out.getString(1).toLowerCase();
dbMetrics.put(key, out.getString(2));
}
out = statement.executeQuery(METRICS_SQL3);
@@ -74,9 +83,9 @@ public class OracleCollector extends DBCollector {
while (out.next()) {
String eventName = out.getString(1).toLowerCase();
for (int i = 2; i <= columnCount; ++i) {
String name = eventName + "." + columnNames[i - 1];
key = "system_event." + eventName + "." + columnNames[i - 1];
Object value = out.getObject(i);
dbMetrics.put(name, String.valueOf(value));
dbMetrics.put(key, String.valueOf(value));
}
}