Skip to content

Commit e31a8ac

Browse files
committed
Advanced sources ingestion documentation
1 parent b8aae39 commit e31a8ac

File tree

3 files changed

+123
-1
lines changed

3 files changed

+123
-1
lines changed

docs/05-ingest-custom-sources.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Ingest Custom Sources into Sentinel-Kit Indexer
2+
3+
**Sentinel-Kit** natively supports multiple direct log ingestion modes by placing log files in the subdirectories of `/data/log_ingest_data`.
4+
It also includes an HTTP forwarder for JSON-formatted log ingestion — see the [Ingest logs](04-ingest-logs.md) section for details.
5+
6+
However, for advanced use cases, you may want to create your own custom ingestion source.
7+
Sentinel-Kit uses **Fluent Bit** as its log ingestion engine, which can be directly extended to handle additional sources.
8+
9+
---
10+
11+
## Data Inputs and Parsers
12+
13+
All Fluent Bit configuration files are loaded from the `/config/fluentbit_server` directory.
14+
The main configuration file is `fluent-bit.conf`, which references other configuration files as needed.
15+
16+
It is recommended to create one configuration file per log source type for better readability and maintainability.
17+
Each existing ingestion configuration in Sentinel-Kit can be found in this same directory.
18+
19+
---
20+
21+
## Data Filters and Transformations
22+
23+
Data transformations can be applied using Fluent Bit’s native filters, or through custom code extensions using **Lua scripts**.
24+
You can also use the **`exec`** plugin to execute shell commands directly within the container.
25+
26+
Several working examples are already available within existing Sentinel-Kit source configurations.
27+
For more advanced usage, refer to the [official Fluent Bit documentation](https://docs.fluentbit.io/manual) and community resources.
28+
29+
---
30+
31+
## Output to Elasticsearch
32+
33+
By default, logs are forwarded to **Elasticsearch** using the following configuration:
34+
35+
```bash
36+
[OUTPUT]
37+
Name es
38+
Match __SETUP_YOUR_INPUT_TAG_HERE__
39+
Host sentinel-kit-db-elasticsearch-es01
40+
Port 9200
41+
Buffer_Size 5M
42+
Logstash_Format On
43+
Logstash_Prefix __SET YOUR ELASTICSEARCH INDEX PATTERN HERE__
44+
Logstash_DateFormat %Y.%m.%d
45+
Type _doc
46+
Time_Key @timestamp
47+
Replace_Dots On
48+
Suppress_Type_Name On
49+
Retry_Limit False
50+
TLS On
51+
TLS.Verify Off
52+
HTTP_User elastic
53+
HTTP_Passwd ${ELASTIC_PASSWORD} # Do not modify this line — it is injected via environment variables for authentication
54+
```
55+
56+
## Applying Configuration Changes
57+
58+
To activate your new Fluent Bit configuration, include it in the main `fluent-bit.conf` file:
59+
60+
```bash
61+
# Fluent Bit service configuration
62+
[SERVICE]
63+
Flush 1
64+
Daemon off
65+
Log_Level debug
66+
Parsers_File parsers.conf
67+
HTTP_Server On
68+
HTTP_Listen 0.0.0.0
69+
HTTP_Port 2020
70+
Health_Check On
71+
HTTP_Buffer_Size 1048576
72+
73+
@include /fluent-bit/etc/logs-evtx.conf
74+
@include /fluent-bit/etc/logs-auditd.conf
75+
@include /fluent-bit/etc/logs-json.conf
76+
@include /fluent-bit/etc/logs-http.conf
77+
# ==> Add your new configurations below using @include directives
78+
```
79+
80+
You do not need to restart the entire stack. Restarting the Fluent Bit service is sufficient:
81+
82+
```bash
83+
docker compose restart sentinel-kit-server-fluentbit
84+
```
85+
86+
## Verifying and Debugging
87+
88+
You can check Fluent Bit logs to confirm that your configuration is working correctly or to debug issues:
89+
90+
```bash
91+
docker logs -f sentinel-kit-server-fluentbit
92+
```
93+
94+
These logs will provide detailed information about configuration loading, parsing, and any encountered errors.

docs/06-monitor-services.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Monitoring Sentinel-Kit Services
2+
3+
Sentinel Kit includes a set of monitoring services that are enabled when the `internal-monitoring` profile is added to your `COMPOSE_PROFILES` in the `.env` file. These services rely on Prometheus, which is queried by Grafana.
4+
5+
By default, Grafana is accessible at:
6+
**[https://grafana.sentinel-kit.local](https://grafana.sentinel-kit.local)**
7+
8+
### Access Credentials
9+
10+
The access credentials for Grafana can be customized in the `.env` file:
11+
```bash
12+
GF_SECURITY_ADMIN_USER=sentinel-kit_grafana_admin
13+
GF_SECURITY_ADMIN_PASSWORD=sentinel-kit_grafana_password
14+
```
15+
### Initial Setup
16+
17+
In its default configuration, Sentinel-Kit does not include any custom dashboards. However, the services for `fluentbit`, `mysql`, and `elasticsearch` are already configured within the platform. You can access all available metrics under the `metrics` section, and it is also possible to filter by service (jobs).
18+
19+
![Sentinel-Kit Grafana](img/sentinel-kit_grafana.png)
20+
21+
### Importing Additional Dashboards
22+
23+
You can import many additional dashboards from the official [Grafana website](https://grafana.com/grafana/dashboards/).
24+
25+
### Performance Consideration
26+
27+
**Warning**: On systems with limited memory or CPU resources, it is recommended to avoid enabling the `internal-monitoring` profile to ensure optimal performance.

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ Sentinel Kit server launches as a `docker-compose` stack and exposes the followi
1515
* [Custommize your stack, credential, elastic cluster...](02-customize-stack.md)
1616
* [Create a first admin account](03-create-admin-user.md)
1717
* [Ingest logs](04-ingest-logs.md)
18-
* [Monitor services](05-monitor-services.md)
18+
* [Ingest custom sources](05-ingest-custom-sources.md)
19+
* [Monitor services](06-monitor-services.md)

0 commit comments

Comments
 (0)