- 5 minutes to read

A fully populated configuration file (Pickup Service)

Below is a fully populated configuration file using all sources with all options (a real-world example would probably not use all possible sources). Copy and paste as required to fit for your use case.

Info

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

The default path to the configuraiton file is in the example below:

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

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

{
  "Environment": "Test",
  "Debug": false,
  "Version": "3.6",
  "CultureInfo": "sv-SE",
  "ActiveMQs": [
    {
      "Enabled": true,
      "LogApi": "http://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60;TrustServerCertificate=True",
      "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}"
        }
      ]
    }
  ],
  "AMQPs": [
    {
      "Enabled": true,
      "LogAPI": "http://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60;TrustServerCertificate=true",
      "ConnectionString": "amqp://localhost:5672",
      "Username": "artemis",
      "Password": "artemis",
      "Queue": "a1",
      "DeadLetterQueue": "DLQ",
      "ReplaceRules": [
        {
          "Name": "Fix End Point real customer id to {customerId}",
          "ReplaceName": true,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ],
  "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
    }],
  "BlobContainers": [
    {
      "Enabled": true,
      "LogAPI": "http://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "BlobStorageConnectionString": "DefaultEndpointsProtocol=https;AccountName=xyz;AccountKey=xyz==;EndpointSuffix=core.windows.net",
      "ContainerName": "nodinitelogevents",
      "BackoutContainerName": "nodinitelogeventsbackout",
      "DisableCheckAccessRights": false,
      "RemoveEmptyBlobs": false,
      "ReplaceRules": []
    }
  ],
  "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
    }],
  "Folders": [
    {
      "Enabled": true,
      "LogApi": "https://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60;TrustServerCertificate=True",
      "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}"
        }
      ]
    }
  ], 
  "MSMQs": [
    {
      "Enabled": true,
      "LogApi": "https://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60;TrustServerCertificate=True",
      "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}"
        }
      ]
    }
  ], 
  "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
    }],   
  "ServiceBusQueues": [
    {
      "Enabled": true,
      "LogAPI": "https://localhost/Nodinite/LogAPI/",
      "UseConfigurationDatabase": true,
      "ConfigurationDatabaseConnectionString": "Server=.;Database=NodiniteConfig_Dev;Integrated Security=SSPI;Connection Timeout=60;TrustServerCertificate=True",
      "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}"
        }
      ]
    }
  ],     
  "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
Pickup Service

Install Log Agent - Pickup Service
JSON Log Event