From 433e73c7a7b8aefea97961c014cf4d130294a24a Mon Sep 17 00:00:00 2001 From: Curtis Badke Date: Fri, 31 Oct 2014 15:07:13 -0600 Subject: [PATCH] Add necessary configuration files for use by unit tests. --- .gitignore | 3 ++ .../config/newrelic.json | 7 ++++ .../config/plugin.json | 42 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/newrelic.json create mode 100644 src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/plugin.json diff --git a/.gitignore b/.gitignore index fb3261f..74864b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # Configuration files newrelic.json plugin.json +# but track test config files +!src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/newrelic.json +!src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/plugin.json # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) [Bb]in/ diff --git a/src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/newrelic.json b/src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/newrelic.json new file mode 100644 index 0000000..08642d9 --- /dev/null +++ b/src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/newrelic.json @@ -0,0 +1,7 @@ +{ + "license_key": "FooGuid", + "log_level": "info", + "log_file_name": "newrelic_plugin.log", + "log_file_path": "logs", + "poll_interval": "45" +} diff --git a/src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/plugin.json b/src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/plugin.json new file mode 100644 index 0000000..6c46f67 --- /dev/null +++ b/src/NewRelic.Microsoft.SqlServer.Plugin.Tests/config/plugin.json @@ -0,0 +1,42 @@ +{ + "agents": [ + { + "_comment": "This is an example of how you would monitor an on-premises SQL instance, remove this section if you are not using SQL Server or duplicate this section if you have multiple servers.", + "type": "sqlserver", + "name": "Local", + "connectionString": "Server=.;Database=master;Trusted_Connection=True;", + "includeSystemDatabases": "true", + "_includesComment": "An array of JSON objects containing a property 'name' which is the name of the database you would like to include in your monitoring.", + "includes": [ + { "name": "Northwind", "displayName": "Southbreeze" }, + { "name": "tempdb", "displayName": "tempdb" }, + { "name": "master", "displayName": "master" }, + { "name": "model", "displayName": "model" }, + { "name": "msdb", "displayName": "msdb" } + ], + "excludes": [ + + ] + }, + { + "_comment": "This is an example of how you would monitor an on-premises SQL instance, remove this section if you are not using SQL Server or duplicate this section if you have multiple servers.", + "type": "sqlserver", + "name": "Important Server", + "connectionString": "Server=192.168.10.123,1234;Database=master;User Id=foo;Password=bar;", + "excludes": [ + { "name": "foo", "displayName": "foo" }, + { "name": "bar", "displayName": "bar" } + ] + }, + { + "_comment": "This is an example of how you would monitor a SQL Azure instance, remove this section if you are not using SQL Azure or duplicate this section if you have multiple servers.", + "type": "azure", + "name": "CloudFtw", + "connectionString": "Server=zzz,1433;Database=CloudFtw;User ID=NewRelic;Password=aaa;Trusted_Connection=false;Encrypt=true;Connection Timeout=30;", + "excludes": [ + { "name": "foo", "displayName": "foo" }, + { "name": "bar", "displayName": "bar" } + ] + } + ] +}