From 0816e70ea2a5c4b8773da5079df24321687f4e9e Mon Sep 17 00:00:00 2001 From: amvin87 <63835878+amvin87@users.noreply.github.com> Date: Fri, 6 Aug 2021 21:31:34 +0530 Subject: [PATCH] Create telegraf.conf telegraf.conf --- linux/monitor/telegraf.conf | 121 ++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 linux/monitor/telegraf.conf diff --git a/linux/monitor/telegraf.conf b/linux/monitor/telegraf.conf new file mode 100644 index 0000000..8f6686f --- /dev/null +++ b/linux/monitor/telegraf.conf @@ -0,0 +1,121 @@ +# Global tags can be specified here in key="value" format. +# [global_tags] +# dc = "us-east-1" # will tag all metrics with dc=us-east-1 +# rack = "1a" +# Environment variables can be used as tags, and throughout the config file +# user = "$USER" + +# Configuration for telegraf agent +[agent] +# Default data collection interval for all inputs +interval = "15s" + + +# Read metrics from SQL Server +# Various sections for each Database Type. + + +#[[inputs.sqlserver]] +#interval = "15s" +#Setting Database to Managed Instance. +#database_type = "AzureSQLDB" + +#List of Servers to Collect Data from +#servers = ["Server=YOURSERVER.database.windows.net;User Id=telegraf;Password=MyComplexPassword1!;database=YOURDB;app name=telegraf;connection timeout = 5"] + + +## database_type = AzureSQLDB by default collects the following queries + ## - AzureSQLDBWaitStats + ## - AzureSQLDBResourceStats + ## - AzureSQLDBResourceGovernance + ## - AzureSQLDBDatabaseIO + ## - AzureSQLDBServerProperties + ## - AzureSQLDBOsWaitstats + ## - AzureSQLDBMemoryClerks + ## - AzureSQLDBPerformanceCounters + ## - AzureSQLDBRequests + ## - AzureSQLDBSchedulers + +#exclude_query = [ 'AzureSQLDBSchedulers' , 'AzureSQLDBSqlRequests'] + + + +#[[inputs.sqlserver]] +#interval = "15s" +#Setting Database to Managed Instance. + +#database_type = "AzureSQLManagedInstance" +#servers = ["Server=YOURSERVER.database.windows.net;Port=1433;User Id=telegraf;Password=MyComplexPassword1!;app name=telegraf;connection timeout = 5"] + +#List of Servers to Collect Data from +## Possible collectors for database_type = AzureSQLManagedInstance by default collects the following queries + ## - AzureSQLMIResourceStats + ## - AzureSQLMIResourceGovernance + ## - AzureSQLMIDatabaseIO + ## - AzureSQLMIServerProperties + ## - AzureSQLMIOsWaitstats + ## - AzureSQLMIMemoryClerks + ## - AzureSQLMIPerformanceCounters + ## - AzureSQLMIRequests + ## - AzureSQLMISchedulers + +#exclude_query = [ 'AzureSQLMISchedulers' , 'AzureSQLMISqlRequests'] + + + +[[inputs.sqlserver]] +interval = "15s" +#Setting Database to Managed Instance. +database_type = "SQLServer" + +#List of Servers to Collect Data from +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"] + + + ## database_type = SQLServer by default collects the following queries + ## - SQLServerPerformanceCounters + ## - SQLServerWaitStatsCategorized + ## - SQLServerDatabaseIO + ## - SQLServerProperties + ## - SQLServerMemoryClerks + ## - SQLServerSchedulers + ## - SQLServerRequests + ## - SQLServerVolumeSpace + ## - SQLServerCpu + +exclude_query = [ 'SQLServerRequests' , 'SQLServerSchedulers'] + + + +#Change the influxDB settings to point to your InfluxDB install +#[[outputs.influxdb_v2]] + ## The URLs of the InfluxDB cluster nodes. + ## + ## Multiple URLs can be specified for a single cluster, only ONE of the + ## urls will be written to each interval. + ## urls exp: http://127.0.0.1:8086 + #urls = ["http://influxdb:8086"] + + ## Token for authentication. +# token = "DPc148KA6E79yRKmID6lKbeh-9jpEcUqRoAKFUdmlsEIemy7HGAKlCL3Bq3I6anzfHP7rIWQIFo9DniQzoz8TQ==" + + ## Organization is the name of the organization you wish to write to; must exist. +# organization = "sqlmonitor" + + ## Destination bucket to write into. +# bucket = "sqlbucket" +[[outputs.influxdb]] + database = "telegraf" + urls = ["http://10.0.0.22:8086"] + +# if you want sparate databases, use namepass which will direct output metrics to specific databases +#[[outputs.influxdb]] +# database = "mssql_metrics" +# urls = ["http://localhost:8086"] +# namepass = ["sqlserver*"] + +#[[outputs.influxdb]] +# database = "docker_metrics" +# urls = ["http://localhost:8086"] +# namepass = ["*_docker"] +