Configuration¶
logbee.Backend functionality can be customized by updating the Configuration\logbee.json file.
A full example of the configuration file can be found on https://github.com/catalingavan/logbee-app/blob/main/logbee.Backend/logbee.json.
LogbeeFrontendConfigurationFilePath¶
The path to the Logbee.Frontend configuration file. The value can be absolute or relative.
{
    "LogbeeFrontendConfigurationFilePath": "../../logbee.Frontend/Configuration/logbee.json"
}
LogbeeBackendUrl¶
The root URL pointing to the Logbee.Backend application.
{
    "LogBeeBackendUrl": "http://logbee-backend.myapp.com/"
}
LogbeeBackend.BasicAuth.Password¶
The Basic HTTP authentication scheme password used to connect to Logbee.Backend application.
{
    "LogbeeBackend.BasicAuth.Password": "_LogbeeBackend_authorization_password_"
}
Database¶
{
    "Database": {
        "Provider": "MongoDb",
        "MongoDb": {},
        "AzureCosmosDb": {}
    }
}
| Database.Provider | |
|---|---|
| MongoDb | Sets the database provider to MongoDB. | 
| AzureCosmosDb | Sets the database provider to Azure CosmosDB. | 
| Database.MongoDb | 
|---|
| Required when “Database.Provider” is “MongoDb”. | 
| Database.AzureCosmosDb | 
|---|
| Required true when “Database.Provider” is “AzureCosmosDb”. | 
Database.MongoDb¶
Configuration settings for connecting to the MongoDB server.
{
    "Database": {
        "MongoDb": {
            "ConnectionString": "mongodb://localhost:27017?socketTimeoutMS=5000&connectTimeoutMS=5000",
            "DatabaseName": "LogbeeBackend"
        },
    }
}
Database.AzureCosmosDb¶
Configuration settings for connecting to Azure Cosmos DB.
{
    "Database": {
        "AzureCosmosDb": {
            "ApplicationRegion": "West Europe",
            "ConnectionString": "https://cosmos-db-name.documents.azure.com:443/;AccountKey=_accountKeyValue_;",
            "DatabaseName": "LogbeeBackend",
            "AzureStorageAccountConnectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=_accountKeyValue_;EndpointSuffix=core.windows.net"
        }
    }
}
FileStorage¶
{
    "FileStorage": {
        "Provider": "MongoDb",
        "MaximumFileSizeInBytes": 2097152,
        "MongoDb": {},
        "Azure": {}
    }
}
| FileStorage.Provider | |
|---|---|
| MongoDb | Sets the files storage provider to MongoDB. | 
| Azure | Sets the files storage provider to Azure Storage container. | 
| FileStorage.MaximumFileSizeInBytes | 
|---|
| Specifies the maximum file size (in bytes) which can be uploaded. | 
| FileStorage.MongoDb | 
|---|
| Required  when “FileStorage.Provider” is “MongoDb” | 
| FileStorage.Azure | 
|---|
| Required  when “FileStorage.Provider” is “Azure” | 
FileStorage.MongoDb¶
Configuration for saving file blobs to MongoDb.
{
    "FileStorage": {
        "MongoDb": {
            "ConnectionString": "mongodb://localhost:27017?socketTimeoutMS=5000&connectTimeoutMS=5000",
            "DatabaseName": "LogbeeBackend"
        }
    }
}
FileStorage.Azure¶
Configuration used to connect to Azure Storage account.
{
    "FileStorage": {
        "Azure": {
            "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=_accountKeyValue_;EndpointSuffix=core.windows.net"
        }
    }
}
CreateRequestLog¶
{
    "CreateRequestLog": {
        "ValidateApplicationKeys": true,
        "SaveInputStreamAsFileIfLengthGte": 5000,
        "Ignore": {},
        "Obfuscate": {},
        "Truncate": {},
        "Throttle": {}
    }
}
| CreateRequestLog.ValidateApplicationKeys | 
|---|
| If true, the  "ApplicationId"and"OrganizationId"are validated against existing records from the LogBee.Frontend database.This is useful if you want to prevent processing logs from applications which have been deleted in the LogBee.Frontend user-interface, but are still running. | 
| CreateRequestLog.SaveInputStreamAsFileIfLengthGte | 
|---|
| If Request.InputStream content exceeds the length defined here, the value will be saved as a blob file. This helps prevent saving excessively large objects in the database. | 
CreateRequestLog.Ignore¶
{
    "CreateRequestLog": {
        "Ignore": {
            "UrlPathPatterns": [ "(?si).js$", "(?si).css$", "(?si).map$", "(?si).xml$", "(?si).php$", "(?si).ttf" ],
            "ResponseContentTypePatterns": [ "(?si)^application/javascript", "(?si)^image/", "(?si)^application/font-" ]
        }
    }
}
| Ignore.UrlPathPatterns | 
|---|
| An array of Regex patterns used to identify requests which should be ignored based on the url path. | 
| Ignore.ResponseContentTypePatterns | 
|---|
| An array of Regex patterns used to identify requests which should be ignored based on the  Response.Content-Typeheader. | 
CreateRequestLog.Obfuscate¶
{
    "CreateRequestLog": {
        "Obfuscate": {
            "IsEnabled": true,
            "ObfuscateInputStream": false,
            "Placeholder": "<obfuscated>",
            "Patterns": [ "(?si)pass" ]
        }
    }
}
| Obfuscate.IsEnabled | |
|---|---|
| true | Request parameters are parsed and any matching properties will be obfuscated. | 
| false | Obfuscation service is disabled. | 
| Obfuscate.ObfuscateInputStream | |
|---|---|
| true | Request.InputStreamwill be parsed and any matching properties will be obfuscated.This method is expensive and can affect the latency of the application. | 
| false | Request.InputStreamwill not be parsed. | 
| Obfuscate.Placeholder | 
|---|
| Placeholder used to replace the sensitive properties matched by the Regex patterns. | 
| Obfuscate.Patterns | 
|---|
| An array of Regex patters which are used to identify potential sensitive data. | 
CreateRequestLog.Truncate¶
Configuration used to truncate request log payloads.
Before saving to database, the request log will be truncated using the limits provided by this configuration.
{
    "CreateRequestLog": {
        "Truncate": {
            "Files": {
                "Limit": 5
            },
            "LogMessages": {
                "Limit": 100,
                "MessageMaxLength": 10000
            },
            "Exceptions": {
                "Limit": 6,
                "ExceptionMessageMaxLength": 500
            },
            "CustomProperties": {
                "Limit": 10,
                "KeyMaxLength": 20,
                "ValueMaxLength": 100
            },
            "Keywords": {
                "Limit": 6,
                "KeywordMinLength": 5,
                "KeywordMaxLength": 30
            },
            "RequestHeaders": {
                "Limit": 20,
                "KeyMaxLength": 100,
                "ValueMaxLength": 1000
            },
            "RequestCookies": {
                "Limit": 5,
                "KeyMaxLength": 100,
                "ValueMaxLength": 100
            },
            "RequestQueryString": {
                "Limit": 30,
                "KeyMaxLength": 100,
                "ValueMaxLength": 1000
            },
            "RequestFormData": {
                "Limit": 30,
                "KeyMaxLength": 100,
                "ValueMaxLength": 1000
            },
            "RequestServerVariables": {
                "Limit": 30,
                "KeyMaxLength": 100,
                "ValueMaxLength": 1000
            },
            "RequestClaims": {
                "Limit": 30,
                "KeyMaxLength": 100,
                "ValueMaxLength": 1000
            },
            "ResponseHeaders": {
                "Limit": 30,
                "KeyMaxLength": 100,
                "ValueMaxLength": 1000
            }
        }
    }
}
CreateRequestLog.Throttle¶
{
    "CreateRequestLog": {
        "Throttle": {
            "Rules": [
                {
                    "IsEnabled": false,
                    "Organizations": ["a754e353-a0f9-48ae-ad11-66470c70d0bf"],
                    "Applications": ["26e1cf75-5ad7-49cc-b48e-798b49dc41ba"],
                    "RemoteIpAddresses": ["2.127.71.193", "228.137.250.192"],
                    "Limits": [
                        {
                            "RequestLimit": 1,
                            "IntervalInSeconds": 5,
                            "StatusCodeLt": 400
                        }
                    ]
                }
            ]
        }
    }
}
| Throttle.Rules[] | 
|---|
| A list of throttle rules to be applied when receiving a request log. A rule can specify only one of  Organizations,ApplicationsorRemoteIpAddressesfilters.If a rule has no filters specified, the rule will apply for all the incoming requests. | 
| Throttle.Rules[] | |
|---|---|
| IsEnabled | Specifies if the rule is enabled. | 
| Organizations | An array of organization ids for which the rule will apply. | 
| Applications | An array of application ids for which the rule will apply. | 
| RemoteIpAddresses | An array of IP addresses for which the rule will apply. | 
| Limits[] | A list of throttle limits to be applied for the rule. | 
| Throttle.Rules[].Limits[] | |
|---|---|
| RequestLimit | Specifies how many requests should be accepted in the specified interval of time. | 
| IntervalInSeconds | Specifies the interval of time, in seconds, when the request limit is calculated. | 
| StatusCodeLt | Specifies the “< Status Code” for which the request limit is applied. | 
UrlTokenization¶
{
    "UrlTokenization": {
        "IgnoreTokenizationUrlPathPatterns": [ "(?si)^\/[0-9]+$" ],
        "PathComponentTokenization": {
            "Characters": [ "%", " ", ":", ",", ";", "+", "%", "&", "#", "(", ")", "@", "=", "<", ">", "{", "}", "\"", "'" ],
            "Patterns": [ "(?si)(?:\\D*\\d){3}" ]
        },
    }
}
| UrlTokenization.IgnoreTokenizationUrlPathPatterns | 
|---|
| An array of Regex patterns for which the url tokenization will not be activated. Example: [ "(?si)^\/home\/error-(?:[0-9])+$" ]
Because the url "/Home/Error-404" is matched by the regex, url tokenization will not be activated.
"/Home/Error-404" ---> "/Home/Error-404"
 | 
| UrlTokenization.PathComponentTokenization.Characters | 
|---|
| If an url path contains any of the specified characters in this array, the path will be considered a parameter. Example: [ ":" ]
Because the url path "/D1:P7:00A" contains ":" character, it will be considered a parameter.
"/api/reports/generate/D1:P7:00A" ---> "/api/reports/generate/{0}"
 | 
| UrlTokenization.PathComponentTokenization.Patterns | 
|---|
| An array of Regex patterns used to identify parameters inside url paths Example: [ "(?si)(?:\\D*\\d){3}" ]
Because the url path "/APP-002" is matched by the regex (contains 3 digits), it will be considered a parameter.
"/api/reports/generate/APP-002" ---> "/api/reports/generate/{0}"
 | 
TimeToLive¶
Specifies for how long the captured logs and other data entities should be kept in database.
The time to live value can be specified in Days, Hours or Minutes.
{
    "TimeToLive": {
        "RequestLog": [
            {
                "StatusCodeLt": 400,
                "Minutes": 2880
            },
            {
                "StatusCodeLt": 500,
                "Hours": 96
            },
            {
                "StatusCodeLt": 600,
                "Days": 6
            }
        ],
        "AlertDefinitionInvocation": {
            "Days": 30
        },
        "ApplicationAlert": {
            "Days": 30
        },
        "ApplicationChartData": {
            "Days": 30
        },
        "ApplicationData": {
            "Days": 30
        },
        "ApplicationEndpoint": {
            "Days": 30
        },
        "ApplicationException": {
            "Days": 30
        },
        "ApplicationUsage": {
            "Days": 180
        },
        "ApplicationUser": {
            "Days": 30
        },
        "HttpRefererDestination": {
            "Days": 30
        },
        "HttpRefererSource": {
            "Days": 30
        }
    }
}
ApplicationSettings¶
ApplicationSettings.DeleteApplicationDataByExpiryDate¶
{
    "ApplicationSettings": {
        "DeleteApplicationDataByExpiryDate": {
            "MaximumDurationInMilliseconds": 5000,
            "TriggerIntervalInMinutes": 180
        }
    }
}
| DeleteApplicationDataByExpiryDate.TriggerIntervalInMinutes | 
|---|
| Specifies the interval of time in which the delete application data service is executed. | 
ApplicationSettings.ProcessQueues¶
{
    "ApplicationSettings": {
        "ProcessQueues": {
            "MaximumDurationInMilliseconds": 5000,
            "TriggerIntervalInSeconds": 10,
            "Take": 100
        }
    }
}
| ProcessQueues.TriggerIntervalInSeconds | 
|---|
| Specifies the interval in which the entities saved in memory (queue) should be inserted in database. | 
| ProcessQueues.Take | 
|---|
| Specifies how many items from queue should be processed at the specified interval of time. | 
ApplicationSettings.ProcessAlerts¶
{
    "ApplicationSettings": {
        "ProcessAlerts": {
            "MaximumDurationInMilliseconds": 5000,
            "TriggerIntervalInSeconds": 10
        }
    }
}
| ProcessAlerts.TriggerIntervalInSeconds | 
|---|
| Specifies the interval in which the alerts are evaluated against the received request logs. | 
ApplicationSettings.DeleteLocalLogFiles¶
{
    "ApplicationSettings": {
        "DeleteLocalLogFiles": {
            "CreatedMoreThanNDaysAgo": 3,
            "TriggerIntervalInHours": 6
        }
    }
}
| DeleteLocalLogFiles.CreatedMoreThanNDaysAgo | 
|---|
| The number of days after which local log files should be deleted. | 
| DeleteLocalLogFiles.TriggerIntervalInHours | 
|---|
| The interval (in hours) at which the cleanup process runs. | 
For technical support, questions or any feedback, please feel free to send us a message and we will get back to you.