|
| 1 | +# Global tags can be specified here in key="value" format. |
| 2 | +# [global_tags] |
| 3 | +# dc = "us-east-1" # will tag all metrics with dc=us-east-1 |
| 4 | +# rack = "1a" |
| 5 | +# Environment variables can be used as tags, and throughout the config file |
| 6 | +# user = "$USER" |
| 7 | + |
| 8 | +# Configuration for telegraf agent |
| 9 | +[agent] |
| 10 | +# Default data collection interval for all inputs |
| 11 | +interval = "15s" |
| 12 | + |
| 13 | + |
| 14 | +# Read metrics from SQL Server |
| 15 | +# Various sections for each Database Type. |
| 16 | + |
| 17 | + |
| 18 | +#[[inputs.sqlserver]] |
| 19 | +#interval = "15s" |
| 20 | +#Setting Database to Managed Instance. |
| 21 | +#database_type = "AzureSQLDB" |
| 22 | + |
| 23 | +#List of Servers to Collect Data from |
| 24 | +#servers = ["Server=YOURSERVER.database.windows.net;User Id=telegraf;Password=MyComplexPassword1!;database=YOURDB;app name=telegraf;connection timeout = 5"] |
| 25 | + |
| 26 | + |
| 27 | +## database_type = AzureSQLDB by default collects the following queries |
| 28 | + ## - AzureSQLDBWaitStats |
| 29 | + ## - AzureSQLDBResourceStats |
| 30 | + ## - AzureSQLDBResourceGovernance |
| 31 | + ## - AzureSQLDBDatabaseIO |
| 32 | + ## - AzureSQLDBServerProperties |
| 33 | + ## - AzureSQLDBOsWaitstats |
| 34 | + ## - AzureSQLDBMemoryClerks |
| 35 | + ## - AzureSQLDBPerformanceCounters |
| 36 | + ## - AzureSQLDBRequests |
| 37 | + ## - AzureSQLDBSchedulers |
| 38 | + |
| 39 | +#exclude_query = [ 'AzureSQLDBSchedulers' , 'AzureSQLDBSqlRequests'] |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +#[[inputs.sqlserver]] |
| 44 | +#interval = "15s" |
| 45 | +#Setting Database to Managed Instance. |
| 46 | + |
| 47 | +#database_type = "AzureSQLManagedInstance" |
| 48 | +#servers = ["Server=YOURSERVER.database.windows.net;Port=1433;User Id=telegraf;Password=MyComplexPassword1!;app name=telegraf;connection timeout = 5"] |
| 49 | + |
| 50 | +#List of Servers to Collect Data from |
| 51 | +## Possible collectors for database_type = AzureSQLManagedInstance by default collects the following queries |
| 52 | + ## - AzureSQLMIResourceStats |
| 53 | + ## - AzureSQLMIResourceGovernance |
| 54 | + ## - AzureSQLMIDatabaseIO |
| 55 | + ## - AzureSQLMIServerProperties |
| 56 | + ## - AzureSQLMIOsWaitstats |
| 57 | + ## - AzureSQLMIMemoryClerks |
| 58 | + ## - AzureSQLMIPerformanceCounters |
| 59 | + ## - AzureSQLMIRequests |
| 60 | + ## - AzureSQLMISchedulers |
| 61 | + |
| 62 | +#exclude_query = [ 'AzureSQLMISchedulers' , 'AzureSQLMISqlRequests'] |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +[[inputs.sqlserver]] |
| 67 | +interval = "15s" |
| 68 | +#Setting Database to Managed Instance. |
| 69 | +database_type = "SQLServer" |
| 70 | + |
| 71 | +#List of Servers to Collect Data from |
| 72 | +servers = ["Server=10.0.0.19;Port=5433;User Id=telegraf;Password=LS1setup!;app name=telegraf;connection timeout = 5","Server=10.0.0.19;Port=1433;User Id=telegraf;Password=LS1setup!;app name=telegraf;connection timeout = 5","Server=10.0.0.20;Port=1433;User Id=telegraf;Password=LS1setup!;app name=telegraf;connection timeout = 5"] |
| 73 | + |
| 74 | + |
| 75 | + ## database_type = SQLServer by default collects the following queries |
| 76 | + ## - SQLServerPerformanceCounters |
| 77 | + ## - SQLServerWaitStatsCategorized |
| 78 | + ## - SQLServerDatabaseIO |
| 79 | + ## - SQLServerProperties |
| 80 | + ## - SQLServerMemoryClerks |
| 81 | + ## - SQLServerSchedulers |
| 82 | + ## - SQLServerRequests |
| 83 | + ## - SQLServerVolumeSpace |
| 84 | + ## - SQLServerCpu |
| 85 | + |
| 86 | +exclude_query = [ 'SQLServerRequests' , 'SQLServerSchedulers'] |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +#Change the influxDB settings to point to your InfluxDB install |
| 91 | +#[[outputs.influxdb_v2]] |
| 92 | + ## The URLs of the InfluxDB cluster nodes. |
| 93 | + ## |
| 94 | + ## Multiple URLs can be specified for a single cluster, only ONE of the |
| 95 | + ## urls will be written to each interval. |
| 96 | + ## urls exp: http://127.0.0.1:8086 |
| 97 | + #urls = ["http://influxdb:8086"] |
| 98 | + |
| 99 | + ## Token for authentication. |
| 100 | +# token = "DPc148KA6E79yRKmID6lKbeh-9jpEcUqRoAKFUdmlsEIemy7HGAKlCL3Bq3I6anzfHP7rIWQIFo9DniQzoz8TQ==" |
| 101 | + |
| 102 | + ## Organization is the name of the organization you wish to write to; must exist. |
| 103 | +# organization = "sqlmonitor" |
| 104 | + |
| 105 | + ## Destination bucket to write into. |
| 106 | +# bucket = "sqlbucket" |
| 107 | +[[outputs.influxdb]] |
| 108 | + database = "telegraf" |
| 109 | + urls = ["http://10.0.0.22:8086"] |
| 110 | + |
| 111 | +# if you want sparate databases, use namepass which will direct output metrics to specific databases |
| 112 | +#[[outputs.influxdb]] |
| 113 | +# database = "mssql_metrics" |
| 114 | +# urls = ["http://localhost:8086"] |
| 115 | +# namepass = ["sqlserver*"] |
| 116 | + |
| 117 | +#[[outputs.influxdb]] |
| 118 | +# database = "docker_metrics" |
| 119 | +# urls = ["http://localhost:8086"] |
| 120 | +# namepass = ["*_docker"] |
| 121 | + |
0 commit comments