Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 committed Aug 8, 2024
1 parent 193ec60 commit 2fa3e89
Showing 1 changed file with 3 additions and 36 deletions.
39 changes: 3 additions & 36 deletions kubedb/sql_exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ global:
# The target to monitor and the collectors to execute on it.
target:
name: mssql_database
data_source_name: 'server=ms-stand-monitor-0.ms-stand-monitor-pods.demo.svc;user id=sa;password=Pa55w0rd!;database=master;encrypt=true;TrustServerCertificate=true;'
collectors: [mssql_standard]
data_source_name: 'sqlserver://sa:Pa55w0rd!@ms-std-mon-0.ms-std-mon-pods.demo.svc.cluster.local:1433/master'
collectors: [mssql_*]
enable_ping: true

# Collectors and metrics definitions
collectors:
- collector_name: mssql_standard
- collector_name: mssql_sample
metrics:
- metric_name: mssql_log_growths
type: counter
Expand All @@ -31,26 +31,6 @@ collectors:
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Log Growths' AND instance_name <> '_Total'
- metric_name: mssql_io_stall_seconds
type: counter
help: 'Stall time in seconds per database and I/O operation.'
key_labels:
- db
value_label: operation
values:
- io_stall_read
- io_stall_write
query_ref: io_stall

- metric_name: mssql_io_stall_total_seconds
type: counter
help: 'Total stall time in seconds per database.'
key_labels:
- db
values:
- io_stall
query_ref: io_stall

- metric_name: mssql_hostname
type: gauge
help: 'Database server hostname'
Expand All @@ -60,18 +40,5 @@ collectors:
query: |
SELECT @@SERVERNAME AS hostname
queries:
- query_name: io_stall
query: |
SELECT
cast(DB_Name(a.database_id) as varchar) AS db,
sum(io_stall_read_ms) / 1000.0 AS io_stall_read,
sum(io_stall_write_ms) / 1000.0 AS io_stall_write,
sum(io_stall) / 1000.0 AS io_stall
FROM
sys.dm_io_virtual_file_stats(null, null) a
INNER JOIN sys.master_files b ON a.database_id = b.database_id AND a.file_id = b.file_id
GROUP BY a.database_id
collector_files:
- "*.collector.yml"

0 comments on commit 2fa3e89

Please sign in to comment.