-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_example.yaml
executable file
·39 lines (32 loc) · 1.86 KB
/
config_example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
graphite_settings:
hosts:
- 'mygraphiteserver1.example.com:2024'
- 'mygraphiteserver2.example.com:2024'
performance_counters:
metric_prefix: 'one_min.test.perfcounters'
interval: 5
counters:
- '\Network Interface(*)\Bytes Received/sec'
- '\Network Interface(*)\Bytes Sent/sec'
- '\Processor(_Total)\% Processor Time'
sql_metrics:
sql_servers:
- connection_string: "server=mssql.example.com;user id=sa;password=sa"
queries:
# example of the query which return rows, column_name will be interpreted as METRIC-NAME SUFFIX, row_value - as METRIC VALUE
- interval: 10 # in seconds
tsql_row: 'select @@CONNECTIONS as CONNECTIONS, @@CPU_BUSY as CPU_BUSY'
timestamp: now # specify column name which will be interpreted as metric timestamp or leave as is
metric_prefix: 'one_min.test.sql.usage'
- connection_string: 'server=localhost;user id=WIN\admin' # supports windows auth
queries:
# example of the query which return a simple table with two colums, first column will be interpreted as METRIC-NAME SUFFIX, second - as METRIC VALUE,
# third (optional) - as METRIC TIMESTAMP
- interval: 30
tsql_table: 'SELECT db=DB_NAME(dbid), connections=COUNT(dbid) FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid'
timestamp: now
metric_prefix: 'one_min.test.sql.connections'
- interval: 30
tsql_table: 'select name, accdate from sys.syslogins'
metric_prefix: 'one_min.test.%hostname%.sql.logins' # %hostname% will be interpreted as local hostname
timestamp: accdate