- 4 minutes to read

A fully populated configuration file

Below is a fully populated configuration file using all sources with all options (a real-world example would probably not use all possible sources, remove as you find fit for your case).

The configuration file is named Settings.json and exists in the root folder of your installation.

The default path is:

C:\Program Files\Nodinite\Logging Agent - Pickup Service\Settings.json

The configuration file (Settings.json), is in JSON format.

{
  "Environment": "Test",
  "Debug": false,
  "Version": "2.3",
  "CultureInfo": "sv-SE",
  "Folders": [
    {
      "Enabled": true,
      "LogApi": "https://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60",
      "Folder": "C:\\Temp\\Nodinite.LogAgent.PickupService.Test",
      "BackoutFolder": "C:\\Temp\\BackoutFiles",
      "RemoveEmptyFiles": true,
      "Filter": "*.json",
      "IncludeChildFolders": false,
      "ExcludeChildFolders": [
        {
          "Name": "C:\\Temp\\Nodinite.LogAgent.PickupService.Test\\NotMe"
        }
      ],
      "ReplaceRules": [
        {
          "Name": "Fix End Point real customer id to {customerId}",
          "ReplaceName": false,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ],
  "ActiveMQs": [
    {
      "Enabled": true,
      "LogApi": "http://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60",
      "ActiveConsumers": 4,
      "ConnectionString": "tcp://127.0.0.1:61616",
      "Username": "system",
      "Password": "manager",
      "Queue": "Nodinite.LogAgent.PickupService.Test",
      "DeadLetterQueue": "Nodinite.LogAgent.PickupService.Test.DLQ",
      "ReplaceRules": [
        {
          "Name": "Fix End Point real customer id to {customerId}",
          "ReplaceName": false,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ],
  "MSMQs": [
    {
      "Enabled": true,
      "LogApi": "https://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60",
      "ActiveConsumers": 4,
      "Server": "localhost",
      "Queue": "Nodinite.LogAgent.PickupService.Test",
      "DeadLetterQueue": "Nodinite.LogAgent.PickupService.Test.DLQ",
      "ReplaceRules": [
        {
          "Name": "Fix End Point real customer id to {customerId}",
          "ReplaceName": false,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ],  
  "ServiceBusQueues": [
    {
      "Enabled": true,
      "LogAPI": "https://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": true,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60",
      "ConnectionString": "Endpoint=sb://nodinite.com/servicebus.windows.net/;SharedAccessKeyName=yoursecretkey;SharedAccessKey=ib2+ofZaFyEhbwzgn1nAhw2XDY3UVc1JefdlGgLGIbb=",
      "Queue": "pickup",
      "ReplaceRules": [
        {
          "Name": "Fix End Point real customer id to {customerId}",
          "ReplaceName": false,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ],
  "PostgreSQLs": [
    {
      "Enabled": true,
      "LogAPI": "http://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "ConnectionString": "Server=name.databases.appdomain.cloud;Port=31902;Database=ibmclouddb;User Id=ibm_cloud_user;Password=yoursecretpassword;SSLMode=Prefer;Trust Server Certificate=true",
      "MaxRowsLimit": 500,
      "ReplaceRules": null
    }],
    "EventHubs": [
    {
      "Enabled": true,
      "LogAPI": "http://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "EventHubConnectionString": "Endpoint=sb://replaceme.servicebus.windows.net/;SharedAccessKeyName=somename;SharedAccessKey=replaceme-1337=;EntityPath=replaceme",
      "EventHubName": null,
      "StorageContainerName": "event-hub-replaceme",
      "StorageAccountName": "replaceme",
      "StorageAccountKey": "replaceme-42=",
      "ReplaceRules": null
    }],
      "AnypointMQs": [
                      {
      "Enabled": true,
      "LogAPI": "http://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "ActiveConsumers": 1,
      "Username": "nodinite-reader",
      "Password":"1337",
      "Environment": "prod",
      "EnvironmentId" : "f7a16b7b-1337-4cb5-93ba-1e5289f707ec",
      "OrganizationId": "75ec82b6-f930-4ea2-1337-7c56ee24c9d3",
      "UseConnectedApp": true,
      "IsEuPanel": false,
      "ClientId": "9186414a9dc4dfc94c4ccf670d25e4e",
      "ClientSecret": "replaceme",
      "RegionId": "eu-west-1",
      "Queue": "LogEvents",
      "DeadLetterQueue": "LogEvents.dlq",
      "ReplaceRules": null
    }],
     "SQLServers": [
        {
      "Enabled": true,
      "LogAPI": "http://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "ConnectionString": "Server=name.databases.appdomain.cloud;Port=31902;Database=ibmclouddb;User Id=ibm_cloud_user;Password=yoursecretpassword;SSLMode=Prefer;Trust Server Certificate=true",
      "MaxRowsLimit": 500,
      "ReplaceRules": null
    }]                      
}

Next Step

Configure

Install Log Agent - Pickup Service
JSON Log Event