This service is responsible for storing & serving audit events.
The compoment has to be deployed on per broker basis.
- Clone the repository anywhere in filesystem.
- Create an
appsettings.dev.json
file insrc/Lykke.Snow.AuditService
directory. (Please refer to Configuration section.) - Add an environment variable
SettingsUrl
with value ofappsettings.dev.json
- Corresponding VPN (dev, test) must be activated prior to running the project.
- Run the project
- RabbitMQ Broker
- MSSQL Database
Kestrel configuration may be passed through appsettings.json, secrets or environment. All variables and value constraints are default. For instance, to set host URL the following env variable may be set:
{
"Kestrel__EndPoints__Http__Url": "http://*:5010"
}
- RESTART_ATTEMPTS_NUMBER - number of restart attempts. If not set int.MaxValue is used.
- RESTART_ATTEMPTS_INTERVAL_MS - interval between restarts in milliseconds. If not set 10000 is used.
- SettingsUrl - defines URL of remote settings or path for local settings.
The component uses Serilog for logging. The configuration is passed through appsettings.Serilog.json
file.
Here is an example:
{
"serilog": {
"Using": [
"Serilog.Sinks.File",
"Serilog.Sinks.Async"
],
"minimumLevel": {
"default": "Debug"
},
"writeTo": [
{
"Name": "Async",
"Args": {
"configure": [
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:u}] [{Level:u3}] - [{Application}:{Version}:{Environment}] - {info} {Message:lj} {NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"outputTemplate": "[{Timestamp:u}] [{Level:u3}] - [{Application}:{Version}:{Environment}] - {info} {Message:lj} {NewLine}{Exception}",
"path": "logs/snow/service.log",
"rollingInterval": "Day"
}
}
]
}
}
],
"Enrich": [
"FromLogContext",
"WithMachineName",
"WithThreadId",
"WithDemystifiedStackTraces"
],
"Properties": {
"Application": "AuditService"
}
}
}