Browse Source

feat(docs): 添加Elasticsearch模块文档

pull/1049/head
feijie 1 year ago
parent
commit
48ef1b6c06
  1. 61
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/README.EN.md
  2. 6
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/README.md
  3. 44
      aspnet-core/framework/elasticsearch/LINGYUN.Abp.Elasticsearch/README.EN.md
  4. 6
      aspnet-core/framework/elasticsearch/LINGYUN.Abp.Elasticsearch/README.md
  5. 50
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/README.EN.md
  6. 6
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/README.md

61
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/README.EN.md

@ -0,0 +1,61 @@
# LINGYUN.Abp.AuditLogging.Elasticsearch
[简体中文](./README.md) | English
Elasticsearch implementation for the audit logging module.
## Features
* ElasticsearchAuditLogManager - Implements IAuditLogManager, managing audit logs with Elasticsearch
* ElasticsearchSecurityLogManager - Implements ISecurityLogManager, managing security logs with Elasticsearch
## Module Dependencies
```csharp
[DependsOn(typeof(AbpAuditLoggingElasticsearchModule))]
public class YouProjectModule : AbpModule
{
// other
}
```
## Configuration Options
* AbpAuditLoggingElasticsearchOptions.IndexPrefix - Index prefix, default is 'auditlogging'
* AbpAuditLoggingElasticsearchOptions.IndexSettings - Elasticsearch index settings
## Multi-tenancy Support
When integrated with the tenant module, the index will switch based on the tenant:
- For tenant-specific data: `{prefix}-{index}-{tenantId}`
- For host data: `{prefix}-{index}`
## appsettings.json
```json
{
"AuditLogging": {
"Elasticsearch": {
"IndexPrefix": "auditlogging"
}
}
}
```
## Features
1. Audit Log Management
- Store and retrieve audit logs in Elasticsearch
- Support for entity change tracking
- Flexible querying with various filters
- Support for extra properties
2. Security Log Management
- Store and retrieve security logs in Elasticsearch
- Support for security-related events tracking
- Comprehensive querying capabilities
3. Index Management
- Automatic index initialization
- Support for custom index settings
- Multi-tenant index isolation

6
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/README.md

@ -1,5 +1,7 @@
# LINGYUN.Abp.AuditLogging.Elasticsearch # LINGYUN.Abp.AuditLogging.Elasticsearch
简体中文 | [English](./README.EN.md)
审计模块 Elasticsearch 实现 审计模块 Elasticsearch 实现
ElasticsearchAuditLogManager 实现了 IAuditLogManager, 审计日志由ES管理 ElasticsearchAuditLogManager 实现了 IAuditLogManager, 审计日志由ES管理
@ -33,6 +35,4 @@ public class YouProjectModule : AbpModule
"IndexPrefix": "auditlogging" "IndexPrefix": "auditlogging"
} }
} }
} }
```

44
aspnet-core/framework/elasticsearch/LINGYUN.Abp.Elasticsearch/README.EN.md

@ -0,0 +1,44 @@
# LINGYUN.Abp.Elasticsearch
[简体中文](./README.md) | English
Abp Elasticsearch integration module, providing a global singleton IElasticClient interface for access.
## Module Dependencies
```csharp
[DependsOn(typeof(AbpElasticsearchModule))]
public class YouProjectModule : AbpModule
{
// other
}
```
## Configuration Options
* AbpElasticsearchOptions.FieldCamelCase Whether fields use camelCase format, default is false
* AbpElasticsearchOptions.NodeUris ES endpoints, multiple endpoints separated by , or ;
* AbpElasticsearchOptions.TypeName Document type name, default is _doc
* AbpElasticsearchOptions.ConnectionLimit Maximum connection limit, see NEST documentation for details
* AbpElasticsearchOptions.UserName Connection username, see NEST documentation for details
* AbpElasticsearchOptions.Password User password, see NEST documentation for details
* AbpElasticsearchOptions.ConnectionTimeout Connection timeout, see NEST documentation for details
## appsettings.json
```json
{
"Elasticsearch": {
"NodeUris": "http://localhost:9200"
}
}
```
## Features
* Provides a global singleton IElasticClient interface for unified Elasticsearch access
* Supports multiple node configurations for cluster deployment
* Supports basic authentication
* Configurable field naming convention (camelCase)
* Customizable connection settings including timeout and connection limits
* Compatible with NEST client features

6
aspnet-core/framework/elasticsearch/LINGYUN.Abp.Elasticsearch/README.md

@ -1,5 +1,7 @@
# LINGYUN.Abp.Elasticsearch # LINGYUN.Abp.Elasticsearch
简体中文 | [English](./README.EN.md)
Abp Elasticsearch集成,提供全局唯一IElasticClient访问接口 Abp Elasticsearch集成,提供全局唯一IElasticClient访问接口
## 模块引用 ## 模块引用
@ -30,6 +32,4 @@ public class YouProjectModule : AbpModule
"Elasticsearch": { "Elasticsearch": {
"NodeUris": "http://localhost:9200" "NodeUris": "http://localhost:9200"
} }
} }
```

50
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/README.EN.md

@ -0,0 +1,50 @@
# LINGYUN.Abp.Logging.Serilog.Elasticsearch
[简体中文](./README.md) | English
Elasticsearch implementation of the ILoggingManager interface, retrieving log information from Elasticsearch.
## Module Dependencies
```csharp
[DependsOn(typeof(AbpLoggingSerilogElasticsearchModule))]
public class YouProjectModule : AbpModule
{
// other
}
```
## Configuration Options
* AbpLoggingSerilogElasticsearchOptions.IndexFormat - Must match the IndexFormat in Serilog configuration, otherwise the correct index cannot be located
## Features
1. Log Retrieval
- Retrieve logs from Elasticsearch using ILoggingManager interface
- Support for various log levels (Debug, Information, Warning, Error, Critical)
- Automatic mapping between Serilog and Microsoft.Extensions.Logging log levels
2. Object Mapping
- Automatic mapping of Serilog entities to application entities
- Maps SerilogException to LogException
- Maps SerilogField to LogField with unique ID support
- Maps SerilogInfo to LogInfo with proper log level conversion
## appsettings.json
```json
{
"Logging": {
"Serilog": {
"Elasticsearch": {
"IndexFormat": "logstash-{0:yyyy.MM.dd}"
}
}
}
}
```
## Important Notes
The IndexFormat configuration must be consistent between your Serilog settings and this module's configuration to ensure proper log retrieval. The default format is "logstash-{0:yyyy.MM.dd}".

6
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/README.md

@ -1,5 +1,7 @@
# LINGYUN.Abp.Logging.Serilog.Elasticsearch # LINGYUN.Abp.Logging.Serilog.Elasticsearch
简体中文 | [English](./README.EN.md)
ILoggingManager 接口的ES实现, 从ES中检索日志信息 ILoggingManager 接口的ES实现, 从ES中检索日志信息
## 模块引用 ## 模块引用
@ -27,6 +29,4 @@ public class YouProjectModule : AbpModule
} }
} }
} }
} }
```
Loading…
Cancel
Save