changing perf queries
This commit is contained in:
Родитель
66e53983ec
Коммит
a7c8a43119
|
@ -118,7 +118,7 @@ LoadPlugin processes
|
|||
|
||||
<Plugin dbi>
|
||||
<Query "perfstats">
|
||||
Statement "select replace(rtrim(counter_name),' ','_') as counter_name, replace(rtrim(instance_name),' ','_') as instance_name,cntr_value from sys.dm_os_performance_counters where (counter_name in ('SQL Compilations/sec','SQL Re-Compilations/sec','User Connections','Batch Requests/sec','Logouts/sec','Logins/sec','Processes blocked','Latch Waits/sec','Full Scans/sec','Index Searches/sec','Page Splits/sec','Page Lookups/sec','Page Reads/sec','Page Writes/sec','Readahead Pages/sec','Lazy Writes/sec','Checkpoint Pages/sec','Database Cache Memory (KB)','Log Pool Memory (KB)','Optimizer Memory (KB)','SQL Cache Memory (KB)','Connection Memory (KB)','Lock Memory (KB)', 'Memory broker clerk size','Page life expectancy')) or (instance_name in ('_Total','Column store object pool') and counter_name in ('Transactions/sec','Transactions/sec','Write Transactions/sec','Log Flushes/sec','Log Flush Wait Time','Lock Timeouts/sec','Number of Deadlocks/sec','Lock Waits/sec','Latch Waits/sec','Memory broker clerk size','Log Bytes Flushed/sec','Bytes Sent to Replica/sec','Log Send Queue','Bytes Sent to Transport/sec','Sends to Replica/sec','Bytes Sent to Transport/sec','Sends to Transport/sec','Bytes Received from Replica/sec','Receives from Replica/sec','Flow Control Time (ms/sec)','Flow Control/sec','Resent Messages/sec','Redone Bytes/sec') or (object_name = 'SQLServer:Database Replica' and counter_name = 'Log Bytes Received/sec' and instance_name = '_Total'))"
|
||||
Statement "select replace(rtrim(counter_name),' ','_') as counter_name, replace(rtrim(instance_name),' ','_') as instance_name,cntr_value from sys.dm_os_performance_counters where (counter_name in ('SQL Compilations/sec','SQL Re-Compilations/sec','User Connections','Batch Requests/sec','Logouts/sec','Logins/sec','Processes blocked','Latch Waits/sec','Full Scans/sec','Index Searches/sec','Page Splits/sec','Page Lookups/sec','Page Reads/sec','Page Writes/sec','Readahead Pages/sec','Lazy Writes/sec','Checkpoint Pages/sec','Database Cache Memory (KB)','Log Pool Memory (KB)','Optimizer Memory (KB)','SQL Cache Memory (KB)','Connection Memory (KB)','Lock Memory (KB)', 'Memory broker clerk size','Page life expectancy')) or (instance_name in ('_Total','Column store object pool') and counter_name in ('Transactions/sec','Transactions/sec','Write Transactions/sec','Log Flushes/sec','Log Flush Wait Time','Lock Timeouts/sec','Number of Deadlocks/sec','Lock Waits/sec','Latch Waits/sec','Memory broker clerk size','Log Bytes Flushed/sec','Bytes Sent to Replica/sec','Log Send Queue','Bytes Sent to Transport/sec','Sends to Replica/sec','Bytes Sent to Transport/sec','Sends to Transport/sec','Bytes Received from Replica/sec','Receives from Replica/sec','Flow Control Time (ms/sec)','Flow Control/sec','Resent Messages/sec','Redone Bytes/sec') or (object_name = 'SQLServer:Database Replica' and counter_name in ('Log Bytes Received/sec','Log Apply Pending Queue','Redone Bytes/sec','Recovery Queue','Log Apply Ready Queue') and instance_name = '_Total')) or (object_name = 'SQLServer:Database Replica' and counter_name in ('Transaction Delay'))"
|
||||
<Result>
|
||||
Type "sql_server_perf_stats"
|
||||
InstancesFrom "counter_name" "instance_name"
|
||||
|
@ -134,15 +134,6 @@ LoadPlugin processes
|
|||
ValuesFrom "wait_time_ms" "waiting_tasks_count" "max_wait_time_ms"
|
||||
</Result>
|
||||
</Query>
|
||||
|
||||
<Query "hadrstats">
|
||||
Statement "select ar.replica_server_name, d.name as 'db_name',rs.log_send_queue_size,rs.log_send_rate,rs.redo_queue_size,rs.redo_rate,rs.filestream_send_rate,rs.secondary_lag_seconds from sys.dm_hadr_database_replica_states as rs join sys.databases as d on (rs.database_id = d.database_id) join sys.availability_replicas as ar on (rs.replica_id = ar.replica_id)"
|
||||
<Result>
|
||||
Type "sql_server_hadr_stats"
|
||||
InstancesFrom "replica_server_name" "db_name"
|
||||
ValuesFrom "log_send_queue_size" "log_send_rate" "redo_queue_size" "redo_rate" "filestream_send_rate" "secondary_lag_seconds"
|
||||
</Result>
|
||||
</Query>
|
||||
|
||||
<Database "master">
|
||||
Host "##SQL_HOSTNAME##"
|
||||
|
@ -152,7 +143,6 @@ LoadPlugin processes
|
|||
DriverOption "password" "##SQL_PASSWORD##"
|
||||
Query "perfstats"
|
||||
Query "waitstats"
|
||||
Query "hadrstats"
|
||||
</Database>
|
||||
</Plugin>
|
||||
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
sql_server_perf_stats perf_stats_value:GAUGE:0:U
|
||||
sql_server_wait_stats wait_time_ms:DERIVE:0:U, waiting_tasks_count:DERIVE:0:U, max_wait_time_ms:GAUGE:0:U
|
||||
sql_server_hadr_stats log_send_queue_size:GAUGE:0:U, log_send_rate:GAUGE:0:U, redo_queue_size:GAUGE:0:U, redo_rate:DERIVE:0:U, filestream_send_rate:GAUGE:0:U, secondary_lag_seconds:GAUGE:0:U
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
sql_server_perf_stats perf_stats_value:GAUGE:0:U
|
||||
sql_server_wait_stats wait_time_ms:DERIVE:0:U, waiting_tasks_count:DERIVE:0:U, max_wait_time_ms:GAUGE:0:U
|
||||
sql_server_hadr_stats log_send_queue_size:GAUGE:0:U, log_send_rate:GAUGE:0:U, redo_queue_size:GAUGE:0:U, redo_rate:DERIVE:0:U, filestream_send_rate:GAUGE:0:U, secondary_lag_seconds:GAUGE:0:U
|
||||
|
|
Загрузка…
Ссылка в новой задаче